code stringlengths 2 1.05M |
|---|
/**
* Created by ndyumin on 20.03.2017.
*/
const {store} = require('../src/');
const sum = (x, y) => x + y;
const mult = (x, y) => x * y;
const compose = (f, d) => (...args) => f(d(...args));
xtest('basic transaction', () => {
/**
0 (init)
|
0 >>(branch)>> 0
+2 (2) -> ... |
module.exports = function (grunt) {
grunt.initConfig({
connect: {
server: {
options: {
port: 9001,
base: 'public/'
}
}
},
watch: {
project: {
files: ['public/**/*.js', 'public/**/*.html', 'public/**/*.json', 'public/**/*.css', 'public/*.html']... |
{
t.$options.props;
for (var n in e) t[n] = null == e[n] ? g : h(e[n], t);
}
|
import { Notifications } from '../../../app/notifications';
import { Subscriptions } from '../../../app/models';
import { msgStream } from '../../../app/lib/server/lib/msgStream';
import { fields } from '.';
Subscriptions.on('change', ({ clientAction, id, data }) => {
switch (clientAction) {
case 'inserted':
cas... |
import path from 'path';
import readGlob from './readGlob';
export default async function listExtensions({
cwd = process.cwd(),
filterNodeModules = true,
showFile = true,
} = []) {
const files = await readGlob('**/*', { cwd, dot: true, nodir: true });
return files.reduce((result, item) => {
if (!filterNo... |
/**
* Created by feng on 16/12/9.
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ListView,
AlertIOS,
TouchableOpacity,
Image,
} from 'react-native';
var Carousel = require('./04-Carousel');
var Newsdetails = require('./NewsDetails');
var I... |
import { serializable, identifier } from 'serializr';
import { BaseDomainStore, DomainModel } from '../../../src';
class ExampleAdvancedUserModel extends DomainModel {
@serializable(identifier()) id;
@serializable name;
}
class ExampleUserService {
fetchAll() {
return fetch('https://jsonplaceholder.typicode... |
import { graphqlQuery } from '../graphql';
export default server => {
server.post('/api/graphql', (schema, request) => {
const batches = JSON.parse(request.requestBody);
return Promise.all(
batches.map(({ query, variables }) => graphqlQuery(query, variables, schema)),
);
});
};
|
const Conflict = require('../../../build/server/game/conflict.js');
const Player = require('../../../build/server/game/player.js');
const DrawCard = require('../../../build/server/game/drawcard.js');
describe('Conflict', function() {
beforeEach(function() {
this.gameSpy = jasmine.createSpyObj('game', ['app... |
require('./html');
require('./scripts');
require('./server');
require('./styles');
require('./watch');
var gulp = require('gulp');
gulp.task('frontend', ['frontend:scripts', 'frontend:styles', 'frontend:html']);
|
System.register([],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){n=function(){function e(e){this.scene=e}return e}(),e("SceneBuilder",n)}}});
//# sourceMappingURL=SceneBuilder.js.map
|
function new_category() {
name = $('#new_category_name').val();
$.ajaxSetup({
beforeSend: function(xhr, settings) {
xhr.setRequestHeader("X-CSRFToken", $("input[name=csrfmiddlewaretoken]").val());
}
});
$.ajax({
type: "POST",
url: "/recipes/new_category/",
... |
(function() {
angular
.module('beercalc')
.config(config);
function config($stateProvider, $urlRouterProvider) {
var profileState = {
url: '/profile',
templateUrl: '/views/profile-view.html',
controller: "ProfileController",
... |
/*
* Copyright (c) 2014-2018 MKLab. All rights reserved.
*
* 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, m... |
import { dev, prod } from './config/webpack/';
import { argv } from 'yargs';
let wpConfig;
switch (argv.env) {
case 'prod':
case 'production': {
wpConfig = prod;
break;
}
case 'st':
case 'stage': {
// TODO
break;
}
default: {
wpConfig = dev;
}
}
export default wpConfig;
|
const limit = require('./limit');
/**
* @kind function
* @name series
* @memberof times
* @param {Number} n
* @param {Function} iteratee
* @returns {Promise}
*/
module.exports = (count, fn, opts) => limit(count, 1, fn, opts);
|
(function () {
'use strict';
var app = angular.module('Fablab');
app.controller('AccountingUserController', function ($scope, UserService,$routeParams, $rootScope,$location, $log) {
$scope.selected = {user: undefined};
$scope.showRole = $rootScope.hasAnyRole('PAYMENT_MANAGE');
$scope.minD... |
var request = require("request");
var sentiment = require("sentiment");
var qs = require("querystring");
var async = require("async");
module.exports = function(a, b) {
var query, cb;
if("function" === typeof a) {
cb = a;
} else if("function" === typeof b) {
query = a;
cb = b;
... |
define(function(require, exports, module) {
var $ = require('$');
var _ = require('underscore');
var Backbone = require('backbone');
var eventBus = require('app-core').Eventbus;
require('select2');
var componentSelect = Backbone.View.extend({
manage : true,
prefix : 'app-com... |
#!/usr/bin/env node
// Using optimist determine engine, test files, and command files
var optimist = require('optimist'),
argv = optimist
['default']('engine', 'vows')
['default']('dir', 'test')
.boolean('no-hints')
['default']('no-hints', false)
.arg... |
// --------- This code has been automatically generated !!! 2017-01-16T16:52:14.069Z
"use strict";
require("requirish")._(module);
/**
* @module opcua.address_space.types
*/
var assert = require("better-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("lib/datamodel/nodei... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { getSelectValue } from './utils'
class ValueGroup extends Component {
render() {
const {
clearInputOnSelect,
getLabel,
inputValue,
isFocused,
labelKey,
options,
placeholder,
showIn... |
import hammerhead from './deps/hammerhead';
import testCafeCore from './deps/testcafe-core';
import testCafeUI from './deps/testcafe-ui';
import cursor from './cursor';
var browserUtils = hammerhead.utils.browser;
var Promise = hammerhead.Promise;
var nativeMethods = hammerhead.nativeMethods;
var positionUtils ... |
var ObjectID = require('mongodb').ObjectID;
var DBRef = require('mongodb').DBRef;
var EventProxy = require('eventproxy');
var EventEmitter = require('events').EventEmitter;
var us = require('underscore');
var fs = require('fs');
var path = require('path');
var db = require('./db');
var ERR = require('../errorcode');
v... |
; $(function() {
"use strict";
$('#section-link').on('singletap', function() {
//all parameters except *url* are optional
axemas.goto({'url':'www/section.html',
'title':'Section'
/* 'stackMaintainedElements': 1000, */
/* 'stackPopEl... |
/*globals jscolor, i18nDefaultQuery */
import _ from 'underscore';
import s from 'underscore.string';
import toastr from 'toastr';
const TempSettings = new Mongo.Collection(null);
RocketChat.TempSettings = TempSettings;
const getDefaultSetting = function(settingId) {
return RocketChat.settings.collectionPrivate.fin... |
import { PropTypes } from 'react';
import { control } from 'leaflet';
import MapControl from './MapControl';
export default class ZoomControl extends MapControl {
static propTypes = {
imperial: PropTypes.bool,
maxWidth: PropTypes.number,
metric: PropTypes.bool,
updateWhenIdle: PropTypes.bool,
};
... |
'use strict'
const path = require('path')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const webpack = require('webpack')
const autoprefixer = require('autoprefixer')
let isDev = process.env.NODE_ENV === 'development'
//设置css modules的模块名更可读,由... |
angular.module('app', ['ngRoute', 'templates'])
.config(function ($routeProvider, $locationProvider) {
$routeProvider.when('/', {
templateUrl: 'home.html',
controller: 'HomeCtrl'
});
$locationProvider.html5Mode(true);
})
.config(function($httpProvider) {
$httpProvider.defaults.headers.... |
'use strict';
// rem :: Number -> Number -> Number !
module.exports = function rem(x) {
return function(y) {
if (y === 0) {
throw new Error('Cannot divide by zero');
} else {
return x % y;
}
};
};
|
#!/usr/bin/env node
/**
* wordpos.js
*
*
* Usage:
* wordpos -p <noun|verb|adj|adv|all> <get|is|lookup> <stdin|words*>
*
* Copyright (c) 2012 mooster@42at.com
* https://github.com/moos/wordpos
*
* Released under MIT license
*/
var program = require('commander'),
_ = require('underscore').... |
'use strict';
/* jasmine specs for controllers go here */
describe('PhoneCat controllers', function() {
describe('PhoneListCtrl', function(){
var scope, ctrl;
beforeEach(module('phonecatApp'));
beforeEach(inject(function($controller) {
scope = {};
ctrl = $controller('PhoneListCtrl', {$scop... |
var smtApp = angular.module('smtApp', ['ui.bootstrap', 'ui.calendar', 'angularMoment','angular-timeline','chart.js','ngAnimate','ui.router']);
smtApp.controller('MainController', ['$scope', '$log', function ($scope, $log) {
$scope.test = "smtApp"
}]) |
var React = require('react');
var Agenda = require('../global/agenda.js');
var SbspOverview = React.createClass({
render: function(){
return (
<div className="">
<div className="main-padding margin-30">
<div className="component-title-box">
<h5 className="center-align"> Tasks... |
(function() {
function hideInfo(el, info) {
return function() {
var caption = el.querySelector('figcaption');
info.className = "";
caption.className = "";
caption.onclick = null;
info.onclick = showInfo(el, info);
};
}
function sh... |
//@todo: document?
module.exports = [
'auth',
'logins',
'pull',
'push',
'sites'
];
|
import keycode from 'keycode';
function scrollTo(el) {
const rect = el.getBoundingClientRect();
const { innerWidth, innerHeight, pageYOffset, pageXOffset } = window;
const top = rect.bottom + pageYOffset;
const left = rect.right + pageXOffset;
const x =
left < pageXOffset || innerWidth + pageXOffset < l... |
function goto_link1(){location.href="http://mp.weixin.qq.com/s?__biz=MzI3MDA4NjAxNQ==&mid=400490584&idx=1&sn=7e3bb395148a1f9a3675c63108a29266&scene=4#wechat_redirect"}function goto_link2(){location.href="http://mp.weixin.qq.com/s?__biz=MzI3MDA4NjAxNQ==&mid=400724251&idx=1&sn=d1a03a31daf29a04f03e60d8389cda93&scene=4#wec... |
module.exports = {
globals: {
__DEV__: true,
__IS_VERTIGO__: false
},
automock: false,
unmockedModulePathPatterns: [
'<rootDir>/node_modules/prop-types',
'<rootDir>/node_modules/create-react-class',
'<rootDir>/node_modules/react',
'<rootDir>/node_modules/r... |
/*
* Character Count Plugin - jQuery plugin
* Dynamic character count for text areas and input fields
* written by Alen Grakalic
* http://cssglobe.com/
*
*
* Updated to work with Twitter Bootstrap 2.0 styles by Shawn Crigger <@svizion>
* http://blog.s-vizion.com
* Mar-13-2011
*
* Copyright (c) 20... |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
development: {
files: {
"public/css/style.css": "public/css/style.less"
}
}
},
watch: {
scripts: {
files: ['public/css/*.less'],
tasks: ['... |
var searchData=
[
['matcher',['matcher',['../class_entitas_1_1_group.html#ae48b92ee4d75ca6ec41d1e1187e3b1a2',1,'Entitas::Group']]]
];
|
var searchData=
[
['main_184',['main',['../_ninja_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97',1,'Ninja.cpp']]],
['makeempty_185',['makeEmpty',['../class_binary_heap.html#ae1d3eb2f5b4fdddcd0d4f0eda4a74ebe',1,'BinaryHeap::makeEmpty()'],['../class_binary_heap___four_ints.html#a5205fb4581fad5ba22013cc77af56670',1,'Bin... |
define(['jquery', 'GenomeClassifierTrainingSet', 'base/js/namespace', 'narrativeMocks'], (
$,
GenomeClassifierTrainingSet,
Jupyter,
Mocks
) => {
'use strict';
describe('The GenomeClassifierTrainingSet widget', () => {
let $div = null;
beforeEach(() => {
jasmine.Ajax.i... |
'use strict'
const Promise = require('bluebird')
const { RESTv2 } = require('../../index')
const _isEmpty = require('lodash/isEmpty')
const { args: { apiKey, apiSecret }, debug, debugTable, readline } = require('../util/setup')
async function execute () {
const rest = new RESTv2({
apiKey,
apiSecret,
tra... |
/**
* exec
* @dependency :
jquery
fes.vendor.js
fes.util.js
fes.app.js
*
*/
(function($){
// datepicker
if ( $('.datepicker').length ) FES.datepicker();
// gnb
if ( $('.gnb').length ) FES.gnb();
// buttonToggler
if ( $('.buttonToggler').length ) FES.buttonToggler();
// tooltip
if ( $('.tooltipT... |
/* ==========================================================================
* ./config/helmet.js
*
* Helmet Config
* ========================================================================== */
export function updateHelmetProps(url, title, description) {
return {
title,
meta: [
{
name: '... |
// Generated by CoffeeScript 1.6.2
(function() {
var Configuration, Daemon, Installer, usage, util, _ref;
_ref = require(".."), Daemon = _ref.Daemon, Configuration = _ref.Configuration, Installer = _ref.Installer;
util = require("util");
process.title = "power";
usage = function() {
console.error("usa... |
var model = {
icons : {
defalt: {
label: 'map-icon-map-pin',
icon: {
path: MAP_PIN,
fillColor: '#1998F7',
fillOpacity: 1,
strokeColor: '',
strokeWeight: 0
}
},
home: {
label: 'map-icon-map-pin',
ico... |
require('../sass/auth.scss');
require('jquery');
require('bootstrap-sass/assets/javascripts/bootstrap.js');
require('jquery-validation');
require('js-cookie');
require('bootstrap-switch');
var Login = function () {
var $loginForm = jQuery('.login-form');
var $passwordReminderForm = jQuery('.forget-form');
... |
ModuleTemplates = {
shortEvent: {
"name": "Feedback",
"number": 1,
"eventId": "XXX",
"startTime": "YYY",
"endTime": "ZZZ",
"wizard": {
"steps": [
{
"stepName": "Profil",
"stepTemplate": {
... |
/* global malarkey:false, moment:false */
import { config } from './index.config';
import { xConfig } from './xconfig.config';
import { xSites } from './sites.config';
import { xCurrency } from './sites.config';
import { xDecimals } from './sites.config';
import { xGetDeals } from './sites.config';
import { ... |
import {stripIndent} from 'common-tags'
import FlexSchemaError from '../Error';
import type from './type';
export const preprocessSchemaDefault = ({schema, builtinDataTypes}) => {
switch(type(schema.default)) {
case 'undefined':
case 'function':
case schema.type:
break;
default:
if(builtinDataTypes.incl... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define("require exports ../../../../core/tsSupport/assignHelper ../../../../core/tsSupport/generatorHelper ../../../../core/tsSupport/awaiterHelper ../../../../Col... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define(["require","exports","dojo/i18n!../nls/Directions","../../../intl","../../../moment"],function(q,d,g,e,p){function f(a){return"esriNAUSeconds"===a||"esriNAU... |
import Ember from 'ember';
import config from './config/environment';
const {
Router: EmberRouter
} = Ember;
const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});
Router.map(function() {
this.route('ember-data-test');
});
export default Router;
|
/*
* AppReducer
*
* The reducer takes care of our data. Using actions, we can change our
* application state.
* To add a new action, add it to the switch statement in the reducer function
*
* Example:
* case YOUR_ACTION_CONSTANT:
* return state.set('yourStateVariable', true);
*/
import { fromJS } from 'imm... |
const processChuck = require('./lib/processChunk')
module.exports = processChuck
|
import { merge } from 'ramda'
import client from './client'
import validate from './validations'
import postback from './postback'
import resources from './resources'
export default merge({
client,
validate,
postback,
}, resources)
|
'use strict';
// Customers controller
var custumersApp = angular.module('customers');
custumersApp.controller('CustomersController', ['$scope', '$stateParams', 'Authentication', 'Customers', '$modal', '$log',
function($scope, $stateParams, Authentication, Customers , $modal, $log) {
// Authenticate the user
t... |
const bcrypt = require('bcrypt')
const roleAdmin = GConfig.role.admin
const saltRounds = 12
/**
* Mongoose schema
*/
const encryptPassword = function (password) {
let salt = bcrypt.genSaltSync(saltRounds)
return bcrypt.hashSync(password, salt)
}
const UserBaseInfoSchema = new GSchema({
username... |
const fs = require('fs')
function render( page ) {
return new Promise(( resolve, reject ) => {
let viewUrl = `./view/${page}`
fs.readFile(viewUrl, "binary", ( err, data ) => {
if ( err ) {
reject( err )
} else {
resolve( data )
}
})
})
}
module.exports = render
... |
import React from 'react';
import PropTypes from 'prop-types';
// Components
import VizzWysiwyg from '@vizzuality/wysiwyg';
import FormElement from './FormElement';
class Wysiwyg extends FormElement {
constructor(props) {
super(props);
if (typeof window === 'undefined') {
return;
}
this.stat... |
System.register(['angular2/core', 'angular2/router', '../search-service/search.service', '../../scroll/scroll.service', '../../pager/pager.component', '../search-form/search-form.component', '../../avatar-component/avatar.component'], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 &... |
import { NativeModules } from 'react-native';
const client_id = process.env.SPOTIFY_CLIENT_ID;
const client_secret = process.env.SPOTIFY_CLIENT_SECRET;
const redirect_uri = process.env.SPOTIFY_REDIRECT_URI;
//Assign our module from NativeModules and assign it to a variable
const SpotifyAuth = NativeModules.SpotifyA... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.8.0r4
*/
/**
* The Slider component is a UI control that enables the user to adjust
* values in a finite range along one or two axes. Typically, the Slider
* control is... |
/**
* @overview datejs
* @version 1.0.0-beta-2014-03-25
* @author Gregory Wild-Smith <gregory@wild-smith.com>
* @copyright 2014 Gregory Wild-Smith
* @license MIT
* @homepage https://github.com/abritinthebay/datejs
*/
/*
2014 Gregory Wild-Smith
@license MIT
@homepage https://github.com/abritinthebay/datejs
2... |
'use strict';
const PipelineAggregationBase = require('./pipeline-aggregation-base');
const ES_REF_URL =
'https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-extended-stats-bucket-aggregation.html';
/**
* A sibling pipeline aggregation which calculates a variety of stats... |
/* eslint no-use-before-define: ["error", "nofunc"] */
import React from 'react'
import { useLocalObservable } from 'mobx-react'
export { createMobxManager, getMobxManager }
const Global = {
managerInstances: {},
}
/**
* @param {string} [storeId]
* Can be used to identify the needed store
* in case m... |
export function getUintSize(value) {
// If size is n, the total bit space is 7 * n space.
// Don't support >32bit integers for now.
if (value < 0) return 5;
if (value < (1 << 7)) return 1;
if (value < (1 << 14)) return 2;
if (value < (1 << 21)) return 3;
if (value < (1 << 28)) return 4;
/* for (let i = ... |
import { spring } from 'react-motion';
export default (gateStatus) => (prevStyles) => [
{
width: spring(
gateStatus
? prevStyles[0].width > 1
? prevStyles[0].width * 0.5
: 0
: prevStyles[0].width < 47
? prevStyles[0].width + 10
: 50
),
},
{
... |
// @flow
import R from 'ramda';
import {
createInMonthSelectors,
createUpToMonthSelectors,
beginningOfMonth,
sumOfAmounts
} from './utils';
import {arraySelector} from 'hw-react-shared';
import type {Transaction} from '../entities/Transaction';
import {TransactionResource} from '../entities/Transaction';
import... |
import validator from 'validator';
function normalizeValidation(validation) {
if (validation.value) return validation;
return {
key: true,
value: validation
};
}
function runValidation(key, validation, value) {
if (validation == null) return null;
// currently only supports:
// is, isURL, isEmail,... |
var bi = require('./bi');
var util = require('./util');
var CHAR = {
'0': 0,
'1': 1,
'2': 2,
'3': 3,
'4': 4,
'5': 5,
'6': 6,
'7': 7,
'8': 8,
'9': 9,
'A': 10,
'B': 11,
'C': 12,
'D': 13,
'E': 14,
'F': 15,
'G': 16,
'H': 17,
'I': 18,
'J': 19,
'K': 20,
'L': 21,
'M': 22,
'N': ... |
jQuery(document).ready(function($){
function initSlider() {
/* галерея speakers */
$('.speakers__gallery').slick({
infinite: false,
dots: false,
arrows: true,
slidesToShow: 3,
slidesToScroll: 1,
// centerMode: true,
centerPadding: '0',
responsive: [
{
... |
'use strict';
var CodeRED = require('../../CodeREDConfig');
module.exports = {
db: {
uri: CodeRED.development.RED_DB,
},
log: {
// Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
format: 'combined',
// Stream defaults to process.stdout
// Uncomment to enable logging to a log on the file sys... |
import { createStore, applyMiddleware, compose } from 'redux';
import { routerMiddleware } from 'react-router-redux';
import thunk from 'redux-thunk';
// import { createLogger } from 'redux-logger';
import rootReducer from '../reducers';
import { isClient, isDebug } from '../../config/app';
/*
* @param {Object} initi... |
'use strict';
var node_website_copier = require('../lib/node-website-copier.js');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expect... |
const x = async ( // some comment
a) => {
return foo(await a);
};
function foo(a) {
return a;
}
|
import Gist from './Gist';
import GistAddForm from './GistAddForm';
var GistBox = React.createClass({
getInitialState: function() {
return {
gists: []
};
},
//this means our main object
addGist: function (username) {
var url = `https://api.github.com/users/${username}/gists`
$.get(url, function(res... |
'use strict';
/**
* Module dependencies.
*/
var url = require('url');
var sfMoviesLogic = require('sf-movies-logic');
/**
* Controller Action for GET.
*/
module.exports.get = function(req, res, next) {
var query = url.parse(req.url, true).query.q;
sfMoviesLogic.search(query, function(err, data) {
next.ifErr... |
/**
@module ember
@submodule ember-metal
*/
// BEGIN IMPORTS
import Ember from 'ember-metal/core';
import isEnabled, { FEATURES } from 'ember-metal/features';
import merge from 'ember-metal/merge';
import {
instrument,
reset as instrumentationReset,
subscribe as instrumentationSubscribe,
unsubscribe as instrum... |
import Masking from "../../../src/js/components/masking";
test('should have component defined', () => {
expect(Masking).toBeDefined();
});
|
var author = React.createClass({
render: function() {
var style = this.props.avatar_url ? {
backgroundImage: `url(${this.props.avatar_url})`
} : {};
return !this.props.login ? null :
<div className="author" style={style}>
{this.props.login}
... |
'use strict';
const testRule = require('stylelint-test-rule-ava');
const rule = require('..');
const messages = rule.messages;
const ruleName = rule.ruleName;
testRule(rule, {
ruleName,
config: [true],
accept: [{
code: ':root { --foo-bar: 1px; }',
}, {
code: ':rOoT { --foo-bar: 1px; }',
}, {
c... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Type is a standardization of the various JSON Schema types. It removes the concept
// of a "null" type, and introduces Unions and an explicit Any type. The Any type is
// part of the JSON Schema spec, but it isn't an explicit type.
var Type... |
var TorsoView = require('torso/modules/View'),
galleryTemplate = require('./portfolioGalleryTemplate.hbs');
portfolioPageHeaderView = require('./portfolioPageHeaderView');
/**
* Gallery View
*
* @class GalleryView
*/
module.exports = TorsoView.extend({
tagName: 'main',
className: 'portfolio-page-conten... |
var _ = {
tpl: function (str, dict) {
for (var i in dict) {
str = str.replace(new RegExp('\\{\\{' + i + '\\}\\}', 'g'), dict[i])
}
return str
},
log: function () {
console.log.apply(console, arguments)
},
nodes: function (str) {
var div = document.createElement('div')
div.innerHT... |
angular.module('GooglePickerExample', ['lk-google-picker'])
.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) {
// Configure the API credentials here
lkGoogleSettingsProvider.configure({
apiKey : 'AIzaSyAEu079vZFFeuFjpfWOrcmw2uGxISgmWwI',
clientId : '20787361493-372fi66o31k7t4t2ha3... |
import form from './Form.xml';
import TopComponent from '../TopComponent/TopComponent';
import BackButton from '../BackButton/BackButton';
import UserService from '../../services/UserService/UserService';
import Transport from '../../modules/Transport/Transport';
import Validation from '../../modules/Validator/index... |
{ ...for idx i in Array(10) { if i > 5 { {[i]: i} } else { {[i]: i} } } }
|
RAD.view('view.contributors', RAD.Blanks.View.extend({
url: RAD.application.basePath + 'scripts/views/contributors/contributors.html',
onInitialize: function () {
this.model = RAD.model('contributors');
}
})); |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016-2017 The Regents of the University of California
*
* 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
* wit... |
$(document).ready(function() {
var prices = document.getElementsByClassName("prc");
var qties = document.getElementsByClassName("qty");
for (var i = 0; i < prices.length; i++) {
prices.item(i).addEventListener("change", updateTotal);
qties.item(i).addEventListener("change", updateTotal);
... |
'use strict';
var fs = require('fs'); // file system library to read/write files
var path = require('path'); // path library to help manipulate paths
var UglifyJS = require('uglify-js'); // minify library
module.exports = function (skelly, callback) {
// set the base directory to look for less files
var dir = pat... |
$(document).ready(function () {
$('#sortBMW').click(function () {
$('ol li').css({"color":"red","font-size":"40px","font-family":"Baskerville Old Face"})
})
}) |
'use strict';
export function routes($locationProvider, $urlRouterProvider, $stateProvider) {
$locationProvider.html5Mode(true);
$urlRouterProvider.otherwise('/');
$stateProvider
.state('waisygh', {
url: '/',
views: {
'toolbar': {
template: require('./toolbar/toolbar.tpl.html')... |
export default [
{
name: 'Types',
examples: [
{
name: 'Statistic',
description:
'A statistic can display a value with a label above or below it',
file: 'Statistic',
},
{
name: 'Statistic Group',
description: 'A group of statistics',
f... |
const emojioneOptions = {
styles: {
backgroundImage: 'url(images/emojione.sprites.png)'
}
};
export default emojioneOptions;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.