code
stringlengths
2
1.05M
window.TMPL = { issueModal: "\ <div class='modal'>\ <div class='modal-header'>\ <button href='#' class='close' data-dismiss>x</button>\ <h3>Hey <em>{{username}}</em>! You were just awarded \ this awesome badge!</h3>\ </div>\ <div class='modal-body'>\ <h4>{{bad...
Template.header.created = function () { Session.set('isActive', false); Session.set('showLogin', false); }; Template['header'].helpers({ showLogin: function () { return Session.get('showLogin'); }, isActive: function () { return Session.get('isActive') ? 'active' : ''; }, animateClass: function (...
"use strict"; var url = require("url"); var Config = require("./Config"); var Context = require("./Context"); var Contracts = require("../Declarations/Contracts"); var Channel = require("./Channel"); var TelemetryProcessors = require("../TelemetryProcessors"); var CorrelationContextManager_1 = require("../AutoCollectio...
'use strict'; /** * @namespace */ var VJS = VJS || {}; /*** Imports ***/ VJS.cameras = VJS.cameras || require('./cameras/cameras'); VJS.core = VJS.core || require('./core/core'); VJS.extras = VJS.extras || require('./extras/extras'); VJS.geometries = VJS.geometries || require('./geometries/geometries'); VJS.helpe...
;(function ( $, window, document, undefined ) { var pluginName = "clear", defaults = { }; function Plugin( element, options ) { this.element = element; this.options = $.extend( {}, defaults, options ); this._defaults = defaults; this._name = pluginName; ...
module.exports = function ( karma ) { karma.set({ /** * From where to look for files, starting with the location of this file. */ basePath: '../', /** * This is the list of file patterns to load into the browser during testing. */ files: [ <% scripts.forEach( function ( fil...
goog.module('test_files.decorator_nested_scope.decorator_nested_scope');var module = module || {id: 'test_files/decorator_nested_scope/decorator_nested_scope.js'};/** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ class SomeService { } /** * @return {void} */ function main() { cla...
const livingBeings = { init: function (state) { this.species = state.species return this }, getSpecies: function () { return this.species } } const plantae = Object.create(livingBeings) plantae.init = function (state) { this.species = state.species return this } const ...
module.exports = { description: 'does not tree-shake unknown tokens', options: { acorn: { plugins: { doTestExpressions: true } }, acornInjectPlugins: [ acorn => { acorn.plugins.doTestExpressions = function doTestExpressions(instance) { instance.extend( 'parseExprAtom', superF => ...
angular.module("adExtreme") .service('RestService', function(HttpRequestService) { var restFactory = {}; var urlInicial = "https://ad-extreme-projeto.herokuapp.com"; restFactory.find = function(url, callback) { HttpRequestService(urlInicial + url, "GET", {}, callback); }; restFactory.add = function(url, d...
import leafletImage from 'leaflet-image'; import LMap from './map'; import { getMapPanelHeightDiff } from './ui'; const freeDraw = new FreeDraw({ mode: FreeDraw.ALL }); /** * * @param {*} imageID * @param {*} imageClasses */ export function generateMapViewScreenshot(id, imageClasses) { const alt = 'Map vie...
/** * 登录js */ /* // 没个js文件都要用这段代码包着, 相当于document ready $(function () { }); */ $(function () { // test // console.log($); var loginBox = $('#j-login-box'); var uname = loginBox.find('.username'); var upwd = loginBox.find('.password'); var vCode = loginBox.find('.verify-code'); var btnSubmit = loginB...
/* Manifest * * - &Create variable references * - &Autoload gulp plugins * - &Load common gulp utilities * - &Create comments for minified files * - &Lint the code * - &Minify and bundle the JavaScript * - &CSS Preprocessing * - &Minify and bundle the CSS * - &Bundle the JS, CSS, and compress imag...
(function () { 'use strict'; let XHRLoader = require('../util/XHRLoader'); module.exports = function(gltf, description, done) { // load shader source XHRLoader.load({ url: description.uri, responseType: 'text', success: source => { descr...
import * as lamb from "../.."; import { wannabeEmptyObjects } from "../../__tests__/commons"; describe("ownPairs / pairs", function () { var baseFoo = Object.create({ a: 1 }, { b: { value: 2 } }); var foo = Object.create(baseFoo, { c: { value: 3 }, d: { value: 4, enumerable: true } }); ...
function encode(string) { const lookupTable = {}; let charValue = 122; // 'z' char const maxWordSize = 5; let currentWordSize = 0; let output = ''; let currentChar = ''; const lowerCaseString = string.toLowerCase(); // ignore uppercase // setup the table for easy lookup // from 'a' to 'z' for (let...
import test from 'ava'; import purifyHtml from './purifyHtml.js'; test('purifyHtml return same string if no tags present', t => { t.is(purifyHtml('Hello world'), 'Hello world'); }); test('return same string if no tags present', t => { t.is(purifyHtml('Hello world'), 'Hello world'); }); test('should remove so...
var scm = new Scm.Core("node"), bg = new Scm.Layer(), psM = new Scm.Layer(), ship = new Scm.Layer(), psB = new Scm.Layer(); scm.push(bg, psM, ship, psB); var path = "parallaxScrolling/misc/"; bg.setBackgroundImg(path+"bg.jpg"); psB.setParallaxScrolling("left", 5, path+"psBig1.png", path+"psBig2.png", path+"psBig...
export { default } from './TodoHeaderContainer.js';
import React, { Component } from 'react' const md5 = require('md5') const dateformat = require('dateformat') const base64 = require('Base64') class RadioType extends Component { constructor (props) { super(props) this.state = { data: [], pageNum: 1, imgUrl: location.search.split('=')[1] ...
var {expect} = require('chai'); var {addClass} = require('../dist/cloud-utils'); describe('#addClass() 为元素添加某个 class', function () { it('应该添加 class 到元素', function () { var element = {className: 'box flex'}; addClass(element, 'flex1'); expect(element.className).to.eql('box flex flex1'); }); it('不应该...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ $('[data-toggle="tooltip"]').tooltip(); $(document).ready(function () { if ($('#datatable-list').length) { $('#datatable...
'use strict'; var should = require('should'); var app = require('../../app'); var request = require('supertest'); describe('GET /api/reservations', function() { it('should respond with JSON array', function(done) { request(app) .get('/api/reservations') .expect(200) .expect('Content-Type', /j...
/** * @file valuelistcontext.js * @brief Value list context menu * @author Medhi BOULNEMOUR (INRA UMR1095) * @date 2018-02-26 * @copyright Copyright (c) 2016 INRA/CIRAD * @license MIT (see LICENSE file) * @details */ let Marionette = require('backbone.marionette'); let View = Marionette.View.extend({ tagN...
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /************************************************************* * * MathJax/extensions/mml2jax.js * * Implements the MathML to Jax preprocessor that locates <math> nodes * within the text of a document ...
// Import dependencies const webpack = require('webpack'); const path = require('path'); const NodeObjectHash = require('node-object-hash'); const ManifestPlugin = require('webpack-manifest-plugin'); const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin'); const WebpackMd5Hash = require('webpack-md5-hash'...
const dotenv = require('dotenv'); dotenv.config(); module.exports = { secret: String(process.env.SECRET) };
/** * * FUNCTION: resetCols * * * DESCRIPTION: * - Resets chart column elements. * * * NOTES: * [1] * * * TODO: * [1] * * * LICENSE: * MIT * * Copyright (c) 2015. Athan Reines. * * * AUTHOR: * Athan Reines. kgryte@gmail.com. 2015. * */ 'use strict'; /** * FUNCTION: resetCols() * Resets column elements. * * @retu...
import React, { Component, PropTypes } from 'react' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import CarsList from '../../components/CarsList/CarsList' import * as Actions from '../../actions/cars' import './Cars.scss' class Cars extends Component { constructor (props){ sup...
var logger = require("loggero").create("service/linker"); var inherit = require("../inherit"); var Module = require("../module"); var Service = require("../service"); function Link(context) { Service.call(this, context); } inherit.base(Link).extends(Service); Link.prototype.canProcess = function(moduleMeta) {...
Polymer({ is: 'moi-send-client-request-button', properties: { text: String, loadingText: String, sendRequestApi: String, ids: { type: Array, value: function() { return []; } } }, onClick: function() { this.prevText = this.text; this.text = this.loadingText; ...
/* eslint-env mocha */ import React from 'react'; import chai, { expect } from 'chai'; import chaiEnzyme from 'chai-enzyme'; import { shallow, mount } from 'enzyme'; import sinon from 'sinon'; import sinonChai from 'sinon-chai'; import TextArea from './'; chai.use(sinonChai); chai.use(chaiEnzyme()); describe('TextAr...
0X04;
import React from 'react'; import { render } from '@testing-library/react'; import ConnectedHome from '.'; import { Provider } from 'react-redux'; import configureStore from 'store'; import { toggleWindowFocus, toggleNotificationEnabled, toggleSoundEnabled } from 'actions/app'; import { receiveEncryptedMessage } from '...
// DESCRIPTION: Virtual services REST & SOAP // MAINTAINER: Didier Kimès <didier.kimes@gmail.com> var debug = require('debug')('imock:server:models:groups') var util = require('../models/util') /** * * List of groups * * @param {object} req * @param {function} callback */ module.exports.list = function...
/*global require:true */ var bowler = require('../lib/bowler.js'); exports['awesome'] = { setUp: function(done) { // setup here done(); }, 'no args': function(test) { // test.expect(1); // // tests here // test.equal(bowler.awesome(), 'awesome', 'should be awesome.'); test.don...
'use strict'; /** * @ngdoc service * @name tagsInputConfig * @module ngTagsInput * * @description * Sets global configuration settings for both tagsInput and autoComplete directives. It's also used internally to parse and * initialize options from HTML attributes. */ tagsInput.provider('tagsInputConfig', funct...
var spec = function () { return jasmine.getEnv().currentSpec; }; var handsontable = function (options) { var currentSpec = spec(); currentSpec.$container.handsontable(options); currentSpec.$container[0].focus(); //otherwise TextEditor tests do not pass in IE8 return currentSpec.$container.data('handsontable'...
"use strict"; const favicon = require("serve-favicon"); const bodyParser = require("body-parser"); const express = require("express"); const path = require("path"); const cors = require("cors")({ origin: "*", methods: "GET,POST,OPTIONS", allowedHeaders: "X-Requested-With, Content-Type, Accept, Origin" }); module.e...
/* globals console, Mustache */ let _nails_forms = function() { var base = this; // -------------------------------------------------------------------------- base.__construct = function() { // @todo: move into CDN module base.initMultiFiles(); base.initCharCounters(); }; ...
'use strict'; var browserSync = require('browser-sync'); var gulp = require('gulp'); gulp.task('serve:stage', ['build:prod'], function () { browserSync.init(['./build/app/**'], { server: { baseDir: './build/app' }, injectChanges: false, files: ['./build/app/js/**/*.js'...
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModu...
/** * @module scroll-spec * @author yiminghe@gmail.com */ KISSY.use("dd/base,dd/plugin/constrain", function (S, DD, Constrain) { var Draggable = DD.Draggable, Gesture= S.Event.Gesture, $ = S.all; window.scrollTo(0, 0); var ie = document['documentMode'] || S.UA['ie']; describe("con...
import * as React from 'react'; import PropTypes from 'prop-types'; import NextLink from 'next/link'; import { useRouter } from 'next/router'; import Button from '@mui/material/Button'; import Divider from '@mui/material/Divider'; import { styled, alpha } from '@mui/material/styles'; import List from '@mui/material/Lis...
{ switch (B.length) { case 1: return encloseBasis1(B[0]); case 2: return encloseBasis2(B[0], B[1]); case 3: return encloseBasis3(B[0], B[1], B[2]); } }
'use strict'; var express = require('express'), path = require('path'), fs = require('fs'), mongoose = require('mongoose'), passport = require('passport'); /** * Main application file */ // Default node environment to development process.env.NODE_ENV = process.env.NODE_ENV || 'development'; // App...
export default target => typeof target === "object" && target !== null && target.cheerio && "length" in target;
import { inject as service } from '@ember/service'; import fetch from 'fetch'; import Component from '@ember/component'; import { isPresent } from '@ember/utils'; import vkbeautify from 'vkbeautify'; import ENV from 'bracco/config/environment'; import FileReader from 'ember-file-upload/system/file-reader'; export defa...
'use strict'; const Command = require('../../Command.js'); const ConclaveChallengeEmbed = require('../../embeds/ConclaveChallengeEmbed.js'); const values = ['all', 'day', 'week']; /** * Displays the currently active Invasions */ class ConclaveChallenges extends Command { /** * Constructs a callable command ...
var BEM = require('bem'), Q = BEM.require('q'), PATH = require('path'), FS = require('fs'), shmakowiki = require('shmakowiki'), MD = require('marked'), HL = require('highlight.js'), mkdirp = require('mkdirp'); process.env.YENV = 'production'; process.env.BEM_I18N_LANGS = 'en ru'; process.en...
var text_area_f_s = '\t' var text_area_s_s = '\n' text_area_bis = []; $(document).ready(function () { $.ajaxSetup({ beforeSend: function (xhr, settings) { if (!csrfSafeMethod(settings.type) && sameOrigin(settings.url)) { xhr.setRequestHeader("X-CSRFToken", csrftoken); ...
/** * Módulo secundario donacionesApp.nuevoDonante. * Dependencias: ninguna. * @author Roberto Sottini <robysottini@gmail.com> */ (function() { 'use strict'; angular .module('donacionesApp.nuevoDonante', []); })();
const affairGroups = { "Wahlen": "1", "Geschäft des Bundesrates": "1", "Geschäft des Parlaments": "1", "Parlamentarische Initiative": "1", "Motion": "1", "Postulat": "2", "Dringliche Interpellation": "2", "Interpellation": "2", "Anfrage": "3", "Dringliche Anfrage": "3", "Dringliche Einfache Anfrag...
import * as constants from './constants'; import { jday, invjday, } from './ext'; import twoline2satrec from './io'; import { propagate, sgp4, gstime, } from './propagation'; import dopplerFactor from './dopplerFactor'; import { degreesLat, degreesLong, geodeticToEcf, eciToGeodetic, eciToEcf, e...
(function($) { /** * Auto-growing textareas; technique ripped from Facebook * * http://github.com/jaz303/jquery-grab-bag/tree/master/javascripts/jquery.autogrow-textarea.js */ $.fn.autogrow = function(options) { return this.filter('textarea').each(function() { ...
import React, { Component, PropTypes } from 'react' import classNames from 'classnames' import {Nav, NavItem, Grid, Row, Col, Table, Glyphicon, Button} from 'react-bootstrap' export default class DataTools extends Component { render(){ return ( <Grid> {this.props.children} </Grid> ); } }...
/** * Created by Jeng on 2016/1/8. */ define(function () { return ["$scope", "OrderAPI", "$modal", "$ugDialog","ExpressAPI","$filter", function($scope, OrderAPI, $modal, $ugDialog,ExpressAPI,$filter){ $scope.orderList = []; $scope.pageInfoSetting = { pageSize:10, pageNum:1 ...
/*! * jQuery JavaScript Library v1.4.2 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. ...
import d3 from 'd3'; export default function update(el, data, isMain){ console.warn('update'); var width = el.clientWidth; var height = el.clientHeight; var count = data.length; var barWidth = width/count; var barColor = 'rgba(25, 183, 226, 0.1)'; var barBorderColor = '#01afde'; var meanColor = '#ff545...
var passport = require('passport'), BasicStrategy = require('passport-http').BasicStrategy, config = require('../config'); passport.use(new BasicStrategy(function (username, password, done){ if (username === config.username && password === config.password) return done(null, {auth: true}); retu...
var Person = (function () { function Person(firstName, lastName, age) { var self = this; self.firstname = firstName; self.lastname = lastName; self.fullname = self.firstname + ' ' + self.lastname; self.age = age; } // validations: function validateName(name) { ...
module.exports = [ "Piazza", "Strada", "Via", "Borgo", "Contrada", "Rotonda", "Incrocio" ];
import i18n from '../../managers/i18n' i18n.register( 'zh-Hans', { uploader: '文件上传', selectFile: '选择文件', fileTypeInvalid: '文件的类型不符合要求', fileSizeInvalid: '文件的大小不符合要求', tooManyFiles: '文件的数量超过限制', uploadSuccess: '上传成功!', uploadFailure: '上传失败', remove: '移除', retry: '重试', replace...
var Update = function (model, version) { this.model = model; this.previous_version = version; }; Update.from = function (model, version) { return new Update(model, version); }; Update.prototype.to = function (version, migration) { return this.model.find({schema_version: this.previous_version}).exec(func...
export default function setSelectionRange (containerEl, start, end) { var charIndex = 0 var range = document.createRange() range.setStart(containerEl, 0) range.collapse(true) var nodeStack = [containerEl] var node var foundStart = false var stop = false while (!stop && (node = nodeStack.pop())) { if (node.n...
var express = require('express'); var path = require('path'); var logger = require('morgan'); var bodyParser = require('body-parser'); var cors = require('cors') var index = require('./routes/index'); var auth = require('./routes/auth'); var app = express() app.use(logger('dev')); app.use(bodyParser.json()); app.us...
import React, { PropTypes, Component } from 'react'; import Gravatar from 'react-gravatar'; import { Link, browserHistory } from 'react-router'; class ScheduleItem extends Component { constructor() { super(); this.onClickAcceptAction = this.onClickAcceptAction.bind(this); this.onClickRejectAction = thi...
class Title extends React.Component { render() { return <h1>{this.props.title}</h1>; } } ReactDOM.render(<Title title="Hello world" />, document.getElementById("root"));
(function () { const themeStorage = new Proxy(localStorage, { get: function (target, prop) { return function (...args) { return target[prop + "Item"]("dark-mode", ...args); }; }, }); const skin_dir = "/assets/css/skins/"; const themes = { dark: "dark.css", light: "default.css...
/* global $, APP, config, Strophe*/ var Moderator = require("./moderator"); var EventEmitter = require("events"); var Recording = require("./recording"); var SDP = require("./SDP"); var Settings = require("../settings/Settings"); var Pako = require("pako"); var StreamEventTypes = require("../../service/RTC/StreamEventT...
import { actions } from '../constants/actions'; import { statuses } from '../constants/statuses'; import fetch from 'isomorphic-fetch'; export function loginStarted() { return { type: actions.LOGIN, status: statuses.PENDING }; } export function loginFailed(errorMsg) { return { type: actions.LOGIN, ...
'use strict'; module.exports = require('../showcase').extend({ data: { ref: 'services', title: 'Services' } });
'use strict'; var log = require('debug')('temply:cms-render-customer-list'); var moment = require('moment'); module.exports = function(data, $element, callback) { if (!data) { callback(); return; } var customers = data[0].clients; var $option = $element.find('option'); customers.forEach(function(c...
import $ from 'jquery'; import d3 from 'd3'; import Tools from 'components/tools/tools'; import React, { Component } from 'react'; import './timeBattery.scss'; class TimeBattery extends Component { constructor(props) { super(props); } componentDidMount() { let year = new Date().getFullYear...
define(["app/api/review/participants"], function (participants) { return { Participants: participants } });
/** * @fileoverview Blog utilities for routing. * @author Jak Wings * @license The MIT License (MIT) * @preserve Copyright (c) 2013 Jak Wings */ 'use strict'; (function (window) { // only available for browser which supports specified history APIs var isBrowser = typeof window !== 'undefined' && window.docum...
var Chaplin = require('chaplin') class Application extends Chaplin.Application { initialize(options) { this.initRouter(options.routes, options) this.initDispatcher(options) this.initLayout(options) this.start() } initLayout(options) { this.layout = new Chaplin.Layout({title: options.title...
Model.articleModel = function(exports){ exports.config = { fields : [ {name:'title',type:'string',validation:'unique'}, {name: 'time', type: 'datatime',defaultValue: 'now()'}, {name:'desc',type:'string',defaultValue:''}, {name:'content',type:'string',defaultValue:''}, {name:'username...
/** * Ternific Copyright (c) 2014 Miguel Castillo. * * Licensed under MIT */ define(function(require, exports, module) { "use strict"; var _ = brackets.getModule("thirdparty/lodash"); var extensionUtils = brackets.getModule("utils/ExtensionUtils"); var Promise = require("no...
var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res) { res.render('login', { title: 'VelvetSpider' }); }); module.exports = router;
+(function($admin, $) { var self = $admin.Validator = this; var private = {}, protected = {}, pages = {}; var $HB, $DM; var _construct = function() { console.log('Admin.Validator constructor'); $HB = $admin._parent; $DM = $HB.DataManager; }; var _init = function() { // Our parent already ...
function demo() { cam ( 90, 20, 100 ); world = new OIMO.World({ timestep: 1/60, iterations: 8, broadphase: 2, // 1: brute force, 2: sweep & prune, 3: volume tree worldscale: 1, random: true, info:true // display statistique }); var i, x, y, z, s, b...
import PropTypes from 'prop-types' import React from 'react' import enhanceClickOutside from 'react-click-outside' import Menu from 'part:@lyra/components/menus/default' import styles from './styles/SpaceSwitcher.css' import {CONFIGURED_SPACES} from '../util/spaces' import {state as urlState} from '../datastores/urlSta...
(function (exports) { 'use strict'; var Syntax = { AssignmentExpression: 'AssignmentExpression', ArrayExpression: 'ArrayExpression', BlockStatement: 'BlockStatement', BinaryExpression: 'BinaryExpression', BreakStatement: 'BreakStatement', CallExpression: 'CallExp...
import React from "react"; import { LgMeats, MdSearch } from "@crave/farmblocks-icon"; import { FULLSCREEN } from "../../constants/variants"; import useToggle from "../../utils/useToggle"; import NavItem from "./NavItem"; export default { title: "SideNav/NavItem", component: NavItem }; export const NavItems = () => ...
'use strict'; /* * Layout Header: Member * * Used to control the member layout header and top navigtion. */ angular.module('app.elements.memberHeader', []) .controller('MemberHeaderCtrl', ['$scope', 'UserSession', 'AuthService', 'siteSystemVariables', function ($scope, UserSession, AuthService,...
import React from "react" import $ from 'jquery' import {List, ListItem, Heading} from "spectacle" import {esNext} from '../data/' const getListItem = ({ name, spec }) => <ListItem textColor='tertiary' key={name + spec}>{name}</ListItem> export default class NewFeatures extends React.Component { componentDidMount(...
var path = require('path'), argv = require('yargs').argv, _ = require('lodash'), webpack = require('webpack'); var playgroundPath = __dirname, rootPath = path.join(playgroundPath, '..'), modulesPath = path.join(rootPath, 'node_modules'), cwd = process.cwd(); var resolvePath = function(userPath...
import React from 'react' import { Image } from 'shengnian-ui-react' const ImageExampleAvatar = () => ( <div> <Image src='/assets/images/wireframe/square-image.png' avatar /> <span>Username</span> </div> ) export default ImageExampleAvatar
IntlMessageFormat.__addLocaleData({locale:"ebu",pluralRuleFunction:function(a,e){return"other"}});
/* * Copyright (c) 2015-2017 Steven Soloff * * This is free software: you can redistribute it and/or modify it under the * terms of the MIT License (https://opensource.org/licenses/MIT). * This software comes with ABSOLUTELY NO WARRANTY. */ 'use strict' const ejs = require('ejs') const express = require('expres...
import DomainResourceSerializer from 'ember-fhir/serializers/domain-resource'; export default DomainResourceSerializer.extend({ attrs: { identifier: { embedded: 'always' }, effectivePeriod: { embedded: 'always' }, useContext: { embedded: 'always' }, jurisdiction: { embedded: 'always' }, contact: ...
/* @flow */ /* eslint-disable import/no-duplicates */ import { Emitter, CompositeDisposable } from 'atom' import type { TextEditor, Disposable, Notification } from 'atom' import * as Helpers from './helpers' import * as Validate from './validate' import { $version, $activated, $requestLatest, $requestLastReceived } f...
/* 把指定的字符串翻译成 pig latin。 Pig Latin 把一个英文单词的第一个辅音或辅音丛(consonant cluster)移到词尾,然后加上后缀 "ay"。 如果单词以元音开始,你只需要在词尾添加 "way" 就可以了。 */ function translate(str) { var consonant_array = ["c","p","gl"]; var new_str = ""; if(consonant_array.indexOf(str.substr(0,2)) !== -1){ new_str = str.substr(2) + str.substr(0,2) +"ay"; ...
/*! unwrapped.js ~ v0.1.0-alpha ~ created by Dylan Waits ~ https://github.com/waits/unwrapped */ (function() { 'use strict'; window.typeOf = function(object) { return Object.prototype.toString.call(object).slice(8, -1); }; })(); (function() { 'use strict'; window.id = function(str) {return document.getElementB...
/* * mobile buttonMarkup tests */ (function($){ module("jquery.mobile.buttonMarkup.js"); test( "header buttons should have the header class", function() { var headerButton1 = $("#header-button-1"), headerButton2 = $("#header-button-2"); ok((headerButton1.hasClass("ui-btn-left") && headerButton2.ha...
define(['jsonUtils'], /** * Set to "backwards compatibility mode" (for pre version 2.0) for CommonUtils. * * This function re-adds deprecated and removed functions and * properties to the CommonUtils instance. * * NOTE that once set to compatibility mode, it cannot be reset to ...
// LICENSE : MIT "use strict"; const EventEmitter = require("events"); const REPOSITORY_CHANGE = "REPOSITORY_CHANGE"; import MemoryDB from "./adpter/MemoryDB"; import Video from "../domain/Video"; export class VideoRepository extends EventEmitter { constructor(database = new MemoryDB()) { super(); /...
// All code points in the `Kannada` script as per Unicode v5.1.0: [ 0xC82, 0xC83, 0xC85, 0xC86, 0xC87, 0xC88, 0xC89, 0xC8A, 0xC8B, 0xC8C, 0xC8E, 0xC8F, 0xC90, 0xC92, 0xC93, 0xC94, 0xC95, 0xC96, 0xC97, 0xC98, 0xC99, 0xC9A, 0xC9B, 0xC9C, 0xC9D, 0xC9E, 0xC9F, 0xCA0, 0xCA1, 0xCA2, 0xCA3, 0xC...
import React, { Component } from 'react' import { StyleSheet, Text, View, ToolbarAndroid, ToastAndroid, TouchableOpacity, Image, BackHandler, Clipboard, ListView, Animated, Easing, Vibration } from 'react-native' import {rvDB} from '../rvAPI' import ParsedText from 'react-native-parsed-text' ...