code stringlengths 2 1.05M |
|---|
// Generated on 2015-03-06 using
// generator-webapp 0.5.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// If you want to recursively match all subfolders, use:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
// Time how long tasks t... |
import React, { Component } from 'react'
import './Header.scss'
export default class Header extends Component {
render() {
return (
<div className='header'>
<h1>ningjs</h1>
<p>{__('Hello World')}</p>
</div>
)
}
}
|
/* global AFRAME, assert, process, suite, test, setup, sinon, HTMLElement */
var buildData = require('core/component').buildData;
var components = require('index').components;
var helpers = require('../helpers');
var registerComponent = require('index').registerComponent;
var processSchema = require('core/schema').proc... |
import PropTypes from 'prop-types';
import React from 'react';
import cx from 'classnames';
import cxBinder from 'classnames/bind';
import styles from './_styles.scss';
const cxStyles = cxBinder.bind(styles);
export const FlexVideo = ({
containerClassName,
containerStyle,
vimeo,
widescreen,
...restProps,
}... |
var express = require('express');
var app = express();
var server = require('http').createServer(app);
var port = process.env.PORT || 3000;
server.listen(port);
var mongoose = require('mongoose');
var models = require('./models'),
Actor = models.Actor,
Movie = models.Movie;
mongoose.connect('mongodb://localho... |
jQuery(document).ready(function() {
// App.init();
// App.initCounter();
// App.initParallaxBg();
// LoginForm.initLoginForm();
// ContactForm.initContactForm();
// OwlCarousel.initOwlCarousel();
// StyleSwitcher.initStyleSwitcher();
var revapi = jQuery('.fullscreenbanner').revolution({
... |
var Cart = Cart || {};
Cart.init = function() {
};
Cart.addToCart = function(chosenItem) {
var fragment = document.createDocumentFragment();
var div1 = document.createElement('div');
fragment.appendChild(div1);
var div2 = document.createElement('div');
div1.appendChild(div2);
var editBtn =... |
$( function() {
var queryParams = getQueryParams();
var layout = queryParams.layout || '';
var config = null;
switch( layout.toLowerCase() ) {
case 'responsive':
config = createResponsiveConfig();
break;
case 'tab-dropdown':
config = createTabDropdownConfig();
break;
default:
config = createSta... |
var gulp = require('gulp');
var paths = require('../paths');
var watch = require('gulp-watch');
var jadeMarko = require('jade-marko');
// custom jade compilation to Marko
gulp.task('jade:marko', function() {
gulp.src(paths.jade)
.pipe(jadeMarko())
.pipe(gulp.dest('./' + paths.components))
});
gulp.task('jad... |
/*!
* scram-sha1.js - implementation of SCRAM-SHA1 mechanism
*
* Copyright (c) 2013 Matthew A. Miller
*
* 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 w... |
export { default } from 'ember-ui-kit/utils/microstate';
|
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
errorHandler = require('./errors.server.controller'),
Packet = mongoose.model('Packet'),
_ = require('lodash'),
fs = require('fs'),
path = require('path'),
replace = require('replace');
exports.gen = function(req, res){
var paylo... |
import React from 'react';
import cx from 'classnames';
import Player from '../player';
const { PropTypes, Component } = React;
class Progress extends Component {
static propTypes= {
buffered: PropTypes.number,
progress: PropTypes.number,
player: PropTypes.instanceOf(Player),
className: PropTypes.s... |
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("../chain"));
__export(require("./block"));
__export(require("./transaction"));
__export(require("./chain"));
__export(require(".... |
$(document).ready(function() {
console.log($location);
$('body').css({'background-image': 'url("dist/img/'+$location+'.jpg")'});
//Ajax requesting weather information of cities
$.post("controllers/Weather_helper.php", {'post':$location}, function(data){
var formattedJson = $.parseJSON(data);
c... |
(function($, _) {
$(function() {
var drawBoard = function(width, height) {
$('#all-fields').empty();
var cells = _.map(
_.range(height), function(row_i) {
var cells = _.map(
_.range(width), function(col_i) {
return '<div class="cell" id="' + (row_i * width +... |
const DrawCard = require('../../../drawcard.js');
class Right extends DrawCard {
constructor(owner, cardData) {
super(owner, cardData);
this.registerEvents(['onDefendersDeclared']);
}
setupCardAbilities(ability) {
this.persistentEffect({
condition: () => this.controlle... |
/*jshint indent: 4, browser:true*/
/*global L*/
/*
* L.Control.TimeDimension: Leaflet control to manage a timeDimension
*/
L.UI = L.ui = L.UI || {};
L.UI.Knob = L.Draggable.extend({
options: {
className: 'knob',
step: 1,
rangeMin: 0,
rangeMax: 10
//minValue : null,
... |
/*!
* JSMovieclip V1.0 jQuery version
* https://github.com/jeremypetrequin/jsMovieclip
* Copyright 2013 Jeremy Petrequin
* Released under the MIT license
* https://github.com/jeremypetrequin/jsMovieclip/blob/master/MIT-license.txt
*/
(function() {
"use strict";
function JSMovieclip(elmts, params) {
... |
const path = require('path');
const shell = require('shelljs');
const chalk = require('chalk');
const packageJson = require('../package.json');
shell.echo(chalk.bold(`${packageJson.name}@${packageJson.version}`));
shell.echo(chalk.gray('\n=> Clean dist.'));
shell.rm('-rf', 'dist');
const babel = path.join(__dirname... |
'use strict';
// This demonstrates the difference between a synchronous and an asynchronous function call in NodeJS.
var fs = require('fs');
var greet = fs.readFileSync(__dirname + '/50-greet.txt', 'utf8'); // Synchronous file read. I.e. waits til file
... |
import 'whatwg-fetch';
const localStorageMock = (function () {
let store = {};
return {
getItem (key) {
return store[key];
},
setItem (key, value) {
store[key] = value.toString();
},
clear () {
store = {};
}
};
})();
global.__DEV__ = false;
global.localStorage = localS... |
Hyperspace.prototype.addOwnShip = function(data) {
// Create the ship that the current player drives. It differs from all other
// ships in that it has an update loop (called every tick) that takes in
// directions from the keyboard.
var extra = {
ownShip: true,
pressed: {
forward: false,
do... |
'use strict';
var AV = require('leanengine');
var chalk = require('chalk');
var fs = require('fs');
// 兼容Promise/A+
AV.Promise.setPromisesAPlusCompliant(true);
var APP_ID = process.env.LC_APP_ID;
var APP_KEY = process.env.LC_APP_KEY;
var MASTER_KEY = process.env.LC_APP_MASTER_KEY;
if (!(APP_ID && APP_KEY && MASTER_... |
var chai = require('chai');
chai.use(require('chai-change'));
var expect = require("chai").expect;
var should = require('chai').should;
describe("SmlGetProfilePackResponse", function() {
var SmlGetProfilePackResponse = require("../../lib/messages/SmlGetProfilePackResponse");
var Constants = require('../../lib/Cons... |
import version from './version';
import Thread from './thread';
import WorkerBroker from './worker_broker';
const LEVELS = {
silent: -1,
error: 0,
warn: 1,
info: 2,
debug: 3,
trace: 4
};
const methods = {};
function methodForLevel (level) {
if (Thread.is_main) {
methods[level] = m... |
const tintColor = '#29235C'
export default {
tintColor,
tabIconDefault: '#a7aaaa',
tabIconSelected: 'rgba(41, 35, 92, .85)',
tabBar: '#fefefe',
errorBackground: '#e25a36',
successBackground: '#1... |
module.exports = function(app){
app.get('/user',function(req,res){
var user_id = req.param('id');
var connection = app.infra.connectionFactory();
var UserDao = new app.infra.UserDao(connection,user_id);
UserDao.pupilo(function(erros,resultados){
res.render('user/user',{pupilo:resultados});
});
connectio... |
import React, { Component } from 'react';
const VideoDetail = ({ video }) => {
if (!video) {
return <div>Loading...</div>
}
const videoId = video.id.videoId;
const vidUrl = `https://www.youtube.com/embed/${videoId}`;
return (
<div className="video-detail col-md-8">
<d... |
import styled from "styled-components/native";
export default styled.View`
padding-horizontal: 8
`;
|
'use strict';
var directives = angular.module('directiveTutorial.directives', []);
directives.directive('helloWorld', function() {
return {
restrict: 'E',
template: '<div>Hello World!</div>',
replace: true
};
});
directives.directive('helloWorld2', function() {
return {
r... |
'use strict'
describe('Unit Tests', function() {
require('./tests/crossbrowsertesting-platform-status')
})
|
define(["require", "exports", "./mainmenu", "uimanager"], function (require, exports, mainmenu_1, uimanager_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
uimanager_1.uiManager.add(new mainmenu_1.MainMenu());
});
|
'use strict';
(function() {
function AuthService($location, $http, $cookies, $q, appConfig, Util, User) {
var safeCb = Util.safeCb;
var currentUser = {};
var userRoles = appConfig.userRoles || [];
if ($cookies.get('token') && $location.path() !== '/logout') {
currentUser = User.get();
}
var Auth = {... |
/*!
* jQuery - Spectragram by Adrian Quevedo
* http://adrianquevedo.com/ - http://lab.adrianquevedo.com/ - http://elnucleo.com.co/
*
* Dual licensed under the MIT or GPL Version 2 licenses.
* You are free to use this plugin in commercial projects as long as the copyright header is left intact.
*
* This plugin u... |
'use strict';
/**
* Module dependencies.
*/
const mongoose = require('mongoose');
const { wrap: async } = require('co');
const { respond } = require('../utils');
const Article = mongoose.model('Article');
/**
* List items tagged with a tag
*/
exports.index = async(function* (req, res) {
const criteria = { tag... |
/* @flow */
import './Body.css';
import * as React from 'react';
import Footer from './Footer';
import type { Todo } from './Types';
import TodoList from './TodoList';
// Main Component
// --------------
interface Props {
onClearCompletedTodos: () => void;
onDestroyTodo: (Todo: Todo) => void;
onSetTodoTitle: (... |
const areaService = require('../data/entityServices/areaService')
const createArea = (req, res) => {
return areaService.createArea(req.body)
.then(area => {
res.send(area)
})
}
const getAreaById = (req, res) => {
return areaService.getAreaById(req.params.id)
.then(area => ... |
'use strict';
angular.module('ngModuleIntrospector', []);
|
define(function(require, exports, module) {
"use strict";
var assert = require("chai").assert;
var testTools = require("../../testTools");
var cc = require("./cc");
var node = require("./node");
var Group = node.Group;
var Synth = node.Synth;
var ir = C.SCALAR, kr = C.CONTROL, ar = C.AUDIO;
d... |
/*
* grunt-cordova-setup
* https://github.com/juzaun/grunt-cordova-setup
*
* Copyright (c) 2014 Justin Zaun
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*... |
import React from 'react';
import SVG from './svg';
export default class Empty extends React.Component {
render() {
return (
<span>
<SVG
xmlns="http://www.w3.org/2000/svg"
width="917.561"
height="894.44"
viewBox="62.584 127.157 917.561 894.44"
>
... |
// Code generator: generates JS list of all git log fields
import {inspect} from 'util';
import * as fs from 'fs';
import * as Path from 'path';
import {groupBy, each} from 'lodash';
// Copy-pasted from https://git-scm.com/docs/pretty-formats, with all formatting-related codes removed.
const gitLogFieldDocs = `
'%H'... |
const KingsOfSummer = require('../../../../server/game/cards/04.2-CtA/KingsOfSummer.js');
describe('Kings Of Summer', function() {
beforeEach(function() {
this.gameSpy = jasmine.createSpyObj('game', ['addMessage', 'getPlayers', 'on']);
this.plot1 = jasmine.createSpyObj('plot1', ['hasTrait']);
... |
var ListenerProcess = require('./libs/listenerprocess');
var listener = new ListenerProcess();
listener.listenForLogicProcesses('./clients.sock');
// Report back with the number of connected clients we have
setInterval(() => {
process.send({pid: process.pid, client_count: listener.clientCount()});
}, 1000);
/**... |
var rx = require('../bower_components/rxjs/dist/rx.lite.js');
var equipmentProfileAPI = (function(promiseAPI, baseAPIAddress) {
var getAllProfiles = function() {
var url = baseAPIAddress + 'equipmentprofile';
return Rx.Observable.fromPromise(
promiseAPI.get(url, 'text').then(function(response) {
... |
var express = require('express');
var passport = require('passport');
var router = express.Router();
var User = require('../models/user');
router.route('/signin').post(function(req, res) {
var newUser = new User({
username: req.body.username,
mail: req.body.mail,
password: req.body.password
});
ne... |
"use strict";
const log = require('./log');
const proxy = require('./proxy');
const stats = require('./stats');
const block = require('./block');
const transaction = require('./transaction');
const contract = require('./contract');
const account = require('./account');
/**
* @module etherscan/api
*/
/**
* @param {s... |
define (['mmirf/commonUtils','mmirf/viewConstants','mmirf/yield','mmirf/storageUtils','mmirf/contentElement','require' ],
//this comment is needed by jsdoc2 [copy of comment for: function Layout(...]
/**
* The Layout class
* The constructor parses the layout and divides them into containers (headerContents,... |
document.write('<a href="http://www.guilin.com"><img src="docs/images/asd/2010/3.jpg" width="200" height="120" alt="广告"></a>'); |
angular.module('sprite', [
'ngAnimate',
'ngRoute',
'ngResource',
'ui.bootstrap',
'angularFileUpload',
'checklist-model'
]).config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/cssSprite', {
controller: 'cssSpriteCtrl',
templateUrl: 'views/cssSprite.html'
})
.other... |
module.exports = function(lang) {
return require('./'+lang);
}; |
import stackElements from './stack-elements';
import createStackElements from './create-stack-elements';
export default function stack(elements) {
stackElements(createStackElements(elements), "x", "y", "width");
}
//# sourceMappingURL=stack.js.map
|
/**
* Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>
* Build: `lodash modularize underscore exports="node" -o ./underscore/`
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2013 Jeremy Ashkenas, DocumentClou... |
(function(){
'use strict';
console.log('Hello world with AngularJS');
})(); |
// generated on 2017-05-11 using generator-chrome-extension 0.6.1
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import del from 'del';
import runSequence from 'run-sequence';
import {stream as wiredep} from 'wiredep';
const $ = gulpLoadPlugins();
gulp.task('extras', () => {
return gulp.s... |
/*!
* Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
(function($) {
"use strict"; // Start of use strict
// jQuery for page scrolling feature - requires jQuery Easing pl... |
import external from '../../externalModules.js';
import { xhrRequest } from '../internal/index.js';
/**
* This object supports loading of DICOM P10 dataset from a uri and caching it so it can be accessed
* by the caller. This allows a caller to access the datasets without having to go through cornerstone's
* image... |
/* */
module.exports = LinkReader;
var fs = require('graceful-fs');
var inherits = require('inherits');
var Reader = require('./reader');
inherits(LinkReader, Reader);
function LinkReader(props) {
var self = this;
if (!(self instanceof LinkReader)) {
throw new Error('LinkReader must be called as constructor.')... |
(function(){
'use strict';
spoti.service('Tabs',
['GlobalFilter', '$emit', Tabs]);
function Tabs(GlobalFilter, $emit) {
var self = this;
this.tabs = [];
this.state = {selectedIndex: 0};
this.select = function(i) {
self.mute_current_tab();
... |
Template.abstract_input.helpers({
atts() {
return this.atts;
},
name() {
this.atts.name;
},
hasLabel() {
return !!this.label;
},
label() {
return this.label;
},
isRequired() {
return !!this.atts.required;
}
}); |
function PageNav (el, options) {
var $container = $(el),
$target = $('<ul class="pages">'),
$window = $(window),
pageElements = [],
currentContents,
currentIndex = 0,
noImages,
reader;
$container.append($target);
if (options.reader) {
reader = options.reader;
$target.on('click', 'a', function (ev) {
... |
import { applyMiddleware, createStore, compose } from "redux"
import logger from "redux-logger"
import thunk from "redux-thunk"
import promise from "redux-promise-middleware"
// import { composeWithDevTools } from 'redux-devtools-extension';
import reducer from "./reducers"
const composeEnhancers = window.__REDUX_D... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory } from 'react-router';
import App from './components/App';
import Login from './components/Login';
import LOG_IN_KEY from './consts/consts';
import { hasLocalStorageItem } from './utils/localStorageUtils';
import TodoLis... |
'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
var mkdirp = require('mkdirp');
var path = require('path');
module.exports = yeoman.generators.Base.extend({
prompting: function() {
var done = this.async();
// Have Yeoman greet the... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'removeformat', 'eo', {
toolbar: 'Forigi Formaton'
} );
|
export function numbers() {
return [ 0, -0, 1, -1, 1.1, -1.1, Infinity, -Infinity ]
}
export function numberObjects({ Object: _Object }) {
return [ _Object(0), _Object(-0), _Object(1), _Object(-1), _Object(1.1), _Object(-1.1), _Object(Infinity), _Object(-Infinity)]
}
|
$(document).ready(function(){
console.log("It's ready");
}); |
var bleno = require('bleno');
var BlenoPrimaryService = bleno.PrimaryService;
var DeviceInformationService = require('./device-information-service');
var deviceInformationService = new DeviceInformationService();
console.log('SPARK - Smart meter');
bleno.on('stateChange', function(state) {
console.log('on -> stat... |
#!/usr/bin/env node
const axios = require('axios');
const itemHash = 'M4A1-S%20%7C%20Hot%20Rod%20%28Factory%20New%29';
const getApiUrl = (start, end) => `http://steamcommunity.com/market/listings/730/${itemHash}/render?start=${start}&count=${end}¤cy=23&language=english`;
(async () => {
const res = await axi... |
'use strict'
var utils = require('../utils')
/**
* Distribute events within canvas.
*
* - No events may visually overlap.
* - If two events collide in time, they MUST have the same width.
* This is an invariant. Call this width W.
* - W should be the maximum value possible without breaking the previous invari... |
export {LineGraph as LineGraph} from './linegraph';
export {AreaGraph as AreaGraph} from './areagraph';
export {BarGraph as BarGraph} from './bargraph';
export {PieChart as PieChart} from './piechart';
export {ScatterPlot as ScatterPlot} from './scatterplot';
|
/**
* Combinations
*
* Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
*
* For example,
* If n = 4 and k = 2, a solution is:
*
* [
* [2,4],
* [3,4],
* [2,3],
* [1,2],
* [1,3],
* [1,4],
* ]
*/
/**
* @param {number} n
* @param {number} k
* @return ... |
var http = require('http'),
port = process.env.PORT || 8080,
app = require('./app'),
server = require('http').createServer(app()),
io = require('socket.io')(server);
var messages = [];
var users = [];
var storeMessage = function(data){
messages.push(data);
if(messages.length > 10){
messages.shif... |
import {test} from '../qunit';
import {localeModule} from '../qunit-locale';
import moment from '../../moment';
localeModule('en-ie');
test('parse', function (assert) {
var tests = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec... |
import React from "react";
import { mount } from "enzyme";
import { Modal } from "../index";
import renderer from "react-test-renderer";
describe("Test correct render", () => {
it("Test correct render", function() {
const tree = renderer
.create(
<Modal>
<div>
<p>
... |
var React = require('react');
var uiBadge = React.createClass({
propTypes: {
color: React.PropTypes.string,
notification: React.PropTypes.bool,
tag: React.PropTypes.oneOf(['div', 'span'])
},
getDefaultProps: function(){
return {
notification: false,
tag: 'div'
}
},
render: fun... |
module.exports = function(config) {
'use strict';
var browsers = ['Chrome', 'Firefox'];
var reporters = ['clear-screen', 'mocha', 'coverage'];
config.set({
basePath: '',
frameworks: ['mocha', 'sinon-chai'],
files: [
'src/boa.js',
'tests/**/*.coffee'
],
preprocessors: {
'... |
var fs = require('fs'),
path = require('path');
module.exports = function (testname, params, req, done) {
var txt = fs.readFileSync(path.join(__dirname, 'basic.json'), 'utf8'),
data;
try {
data = JSON.parse(txt);
} catch (e) {
return done(e);
}
done(null, data);
};
|
var connect = require("connect"),
connectJade = require("connect-jade");
connect()
.use(connectJade({
root: __dirname + "/views",
defaults: {
title: "MyApp"
}
}))
.use(function(req, res) {
res.render("index", { heading: "Welcome to My App"});
}).listen(3000);
|
//@flow weak
var moment = require('moment-timezone');
var config = require('config')
const { init } = require(`../../../node_modules/devicehive/src/api.js`);
const token = config.DeviceHive.token
var dhNode = null;
var mongoSchedule = null;
var mongoSubs = null;
//var mongodb = require("mongodb").MongoClient;
async f... |
function multiply(first, second) {
return (first * second);
};
module.exports = {multiply};
|
var fs = require('fs');
var os = require('os');
var BrigCore = null;
try {
BrigCore = require('../build/Release/brig.node');
} catch(err) {}
if (!BrigCore) {
var apiVer = process.versions.modules;
var arch = process.arch;
// Support ARM architecture
if (arch == 'arm') {
arch += 'v' + process.config.variable... |
// Backbone.bind.js 1.0.1
// For all details and documentation:
// https://github.com/klypkan/backbone.bind
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['underscore', 'jquery', 'backbone'], factory);
} else ... |
var check = require('check-types');
var code = require('../../../utils/code');
function parseEqualArguments(equal) {
check.verify.string(equal, 'equal is not a string');
var split = code.split(equal);
check.verify.array(split, 'did not get array from', equal);
var result = {
op: split[0],
... |
var React = require('react');
var request = require('superagent');
var RSVPStore = require('../stores/RSVPStore');
var HeroApp = React.createClass({
getInitialState: function() {
return {
user: SydJS.user,
isReady: RSVPStore.isLoaded(),
meetup: RSVPStore.getMeetup(),
rsvp: RSVPStore.getRSVP()
};
},
... |
var uuid = require('node-uuid');
var bucker = require('bucker');
var log = bucker.createLogger({app: 'server.log', console: true}, 'http');
function Session(pie, ws) {
this.pie = pie;
this.user = null;
this.domain = null;
this.id = uuid();
this.ws = ws;
this.domain = this.ws.upgradeReq.headers.... |
/**
* Startup
*/
Meteor.startup(function() {
Session.setDefault('issues', undefined);
Session.setDefault('githubRepo', undefined);
Session.setDefault('githubUser', undefined);
});
/**
* Global functions
*/
// Check if a GitHub repository exists for a given user
function repoExists (user, repo, callback) {
Met... |
module.exports = {
ampEnv: {
attack: {
displayName: "A",
id: "ampEnvAttack",
max: 1, // 1000
min: 0,
step: 0.01, // 10
val: 0.1 // 1
},
decay: {
displayName: "D",
id: "ampEnvDecay",
ma... |
// LICENSE : MIT
"use strict";
import { RuleHelper } from "textlint-rule-helper";
export default function (context) {
const helper = new RuleHelper(context);
const { Syntax, getSource, RuleError, report } = context;
return {
/*
Match pattern
# Header
TODO: quick fix ... |
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
var path = require('path');
var webpack = require('webpack');
var node_modules = path.resolve(__dirname, 'node_modules');
module.exports = {
devtool: 'source-map',
entry: [
'./src/app'
],
output: {
path: path.join(__dirname, 'public/js'),
filename: 'bundle.js',
publicPath: '/'
},
plugins: [... |
/**
* Takes a type and returns a function that constructs a new object of that type.
*/
export const construct = Type => (...args) => new Type(...args);
/**
*
*/
export const delegate = fn => (...args) => fn(...args)(...args);
|
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
TextInput,
ScrollView,
Image,
} from 'react-native';
import Util from './../util';
import List from './list';
class Search extends Component{
render(){
return (
<View style={{height:70, borderBottomWidth:Util.pixel,bo... |
var orm = require('orm');
var prompt = require('prompt');
require('dotenv').load();
var models = require('../models');
orm.connect((process.env.DATABASE_URL || ('postgresql://' +
process.env.PSQL_USER + ':' +
process.env.PSQL_PASS + '@' +
process.env.PSQL_HOST + '/' +
process.e... |
/// <reference types="Cypress" />
context('Spies, Stubs, and Clock', () => {
it('cy.spy() - wrap a method in a spy', () => {
// https://on.cypress.io/spy
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
let obj = {
foo () {},
}
let spy = cy.spy(obj, 'foo').as('anyArgs')
... |
'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProp... |
function editorInitConfig(el,settings){
/*
@el - selector
@settings - object
@settings.theme - string
@settings.mode - string
? - экземпляр этого редактора
Создаёт на странице новый редактор ace
*/
var editor = window.ace.edit(el);
editor.$blockScrolling = Infinity;
if(settings){
editor.setThem... |
import React from 'react';
import Headline from './headline'
import Following from './following'
import ArticlesView from '../article/articlesView'
const Main = () => (
// This is the main view.
// On this view we display the user's avatar, their headline,
// their feed of articles (with a search fiilter),... |
class microsoft_mediacenter_internal_launchmediacenter {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.IntPtr G... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.