code stringlengths 2 1.05M |
|---|
var searchData=
[
['fifo_2ec',['FIFO.c',['../_f_i_f_o_8c.html',1,'']]],
['fifo_2eh',['FIFO.h',['../_f_i_f_o_8h.html',1,'']]]
];
|
// Test dependencies are required and exposed in common/bootstrap.js
require('../common/bootstrap');
exports['Tessel.prototype.erase'] = {
setUp: function(done) {
this.erase = sinon.spy(Tessel.prototype, 'eraseScript');
this.logWarn = sinon.stub(log, 'warn', function() {});
this.logInfo = sinon.stub(log... |
$(document).ready( function () {
$('#datatables10').dataTable( {
"sScrollX": "200%",
"bScrollCollapse": true,
"sScrollY": "420px",
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "../../../../assets/datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.sw... |
$(function () {
$("body").niceScroll(); //滚动条
clearCookie();
function Footcss() {
var $Hei = $(window).height() - 100;
if ($Hei < 560) {
$("#foot").css("position", "static")
$("#login_con").css("margin-top", "150px");
} else {
$("#foot").removeAt... |
import schema from './index'
import { allValid, allInvalid } from '../../../test/utils'
const validModuleConfigs = [
// #0
{ alias: { foo: 'bar' } },
// #1
{ alias: { foo: 'bar' } },
// #2
{ root: 'foo' },
// #3
{ root: ['foo', 'bar'] },
// #4
{ modulesDirectories: ['node_modules', 'bower_foo']... |
YUI.add("multiselect-test", function (Y) {
var suite = new Y.Test.Suite({
name: "components Generation Suite"
}),
testCase = new Y.Test.Case({
name: "inputex-multiselect field generation test",
testGeneration: function () {
Y.log("testGeneration",'debu... |
module.exports = module.exports = require('../../es/array/flat');
|
/**
* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
// This file contains style definitions that can be used by CKEditor plugins.
//
// The most common use for it is the "stylescombo" plugin, which shows a combo
... |
ccmValidateBlockForm = function() {
if ($('#field_1_textbox_text').val() == '') {
ccm_addError('Missing required text: title');
}
if ($('#field_2_textbox_text').val() == '') {
ccm_addError('Missing required text: speed');
}
if ($('select[name=field_3_select_value]').val() == '' || $('select[name=field_3_se... |
'use strict';
var
assert = require('chai').assert,
spec = require('api-first-spec'),
localhost = require('./localhost');
var API = spec.define({
"endpoint": "/api/projects",
"method": spec.Method.GET,
"request": {
"contentType": spec.ContentType.URLENCODED,
},
"response": {
"contentType": sp... |
/* global describe, it, expect, beforeEach, integration */
/* eslint camelcase: 0, no-invalid-this: 0 */
describe('immunity', function() {
integration(function() {
describe('when a card has immunity', function() {
beforeEach(function() {
const deck = this.buildDeck('lannister', ... |
'use strict';
var _get = require('babel-runtime/helpers/get')['default'];
var _inherits = require('babel-runtime/helpers/inherits')['default'];
var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default'];
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['d... |
'use strict';
const crypto = require('crypto');
const DEFAULT_SALT_SIZE = 32;
/**
* @classdesc Base class for hashing algorithm classes
*/
class BaseHash {
/**
* @constructor
* @param {Object} [hashData] Previously stored hash data (from Hash.toJSON)
* @param {string} encoding The encoding used for con... |
/**
* Test: class Block
*/
"use strict";
var ce = require("../index.js");
module.exports = {
testCreateTrue: function (test) {
var errors = {
"One": true
},
block = new ce.Block(errors),
e;
test.ok(block.created);
test.equals(typeof bl... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.17/esri/copyright.txt for details.
//>>built
define("esri/dijit/metadata/nls/th/i18nArcGIS",{documentTypes:{arcgis:{caption:"\u0e04\u0e33\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.17/esri/copyright.txt for details.
//>>built
define("esri/dijit/metadata/base/transform/Transformer",["dojo/_base/declare","dojo/_base/lang","dojo/has","dijit/_WidgetBase","../../../../kernel"],function(a,b,c,... |
/*
* Copyright (c) 2013 Adobe Systems Incorporated. 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 ri... |
const WebSocket = require('ws');
const eventEmitter = require('events');
const findTarget = (servers) => {
// console.log(servers[0].openSockets, servers[1].openSockets, servers[2].openSockets);
let target = null;
for (let i = 0; i < servers.length; i += 1) {
if (target === null && servers[i].active) target ... |
var crypto = require('crypto');
var querystring = require('querystring');
var util = require('util');
var url = require('url');
var async = require('async');
var restify = require('restify');
var commonLib = require('../_common');
var ErrorCode = commonLib.ErrorCode;
var SDKPluginBase = commonLib.SDKPluginBase;
var ... |
/**
* Created by Administrator on 2014/12/18.
*/
var bunyan = require('bunyan');
var path = require('path');
function defaultServerLoggerCfg(level) {
var infoLv = 'info';
if (level) {
infoLv = level;
}
return {
name: 'server',
streams: [
{
type: 'ro... |
((typeof exports !== "undefined" && exports !== null) ? exports : this)["Viz"] = function(src, format) {
var Module = {};
Module["return"] = "";
Module["print"] = function(text) {
Module["return"] += text + "\n";
}
|
(function(d){var a="I",b="mt-MT",c=d.cultures,f=c.en,g=f.calendars.standard,e=c[b]=d.extend(true,{},f,{name:b,englishName:"Maltese (Malta)",nativeName:"Malti (Malta)",language:"mt",numberFormat:{percent:{pattern:["-%n","%n"]},currency:{pattern:["-$n","$n"],symbol:"€"}},calendars:{standard:d.extend(true,{},g,{firstDay:1... |
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy... |
cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
{
"id": "cordova-plugin-device.device",
"file": "plugins/cordova-plugin-device/www/device.js",
"pluginId": "cordova-plugin-device",
"clobbers": [
"device"
]
},
{
... |
describe('Master of Whispers', function() {
integration({ isMelee: true }, function() {
describe('applying intrigue claim', function() {
beforeEach(function() {
const deck = this.buildDeck('stark', [
'A Noble Cause',
'Sansa Stark (Core)', '... |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const NotificationSimCardAlert = (props) => (
<SvgIcon {...props}>
<path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 15h-2v-2h2v2zm0-4h-2V8h2v5z"/>
</SvgIcon>
);
NotificationSimCardAlert.displayName = 'Notification... |
var assert = require('assert');
var sift = require('../sift');
var ObjectID = require('bson').pure().ObjectID;
describe(__filename + '#', function () {
[
// $eq
[{$eq:5}, [5,'5', 6], [5]],
['5', [5,'5', 6], ['5']],
[false, [false,'false', true], [false]],
[true, [1, true], [true]],
... |
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Route | admin dashboard ', function(hooks) {
setupTest(hooks);
test('it exists', function(assert) {
var route = this.owner.lookup('route:admin-dashboard');
assert.ok(route);
});
});
|
/* globals msgStream */
Meteor.methods({
setReaction(reaction, messageId) {
if (!Meteor.userId()) {
throw new Meteor.Error(203, 'User_logged_out');
}
let message = RocketChat.models.Messages.findOneById(messageId);
if (!Meteor.call('canAccessRoom', message.rid, Meteor.userId())) {
throw new Meteor.Erro... |
// Prevent polyfilled JS Shadow DOM in Dartium
// We need this if we want Dart code to be able to interoperate with Polymer.js
// code that also uses Shadow DOM.
// TODO(jmesserly): we can remove this code once platform.js is correctly
// feature detecting Shadow DOM in Dartium.
if (navigator.userAgent.indexOf('(Dart)'... |
var assert = require('assert');
var helpers = require('./helpers')
describe('Simple graph shapes', function() {
var core, app
beforeEach(function() {
core = helpers.reset()
global.window = { location: { pathname: 'test/test' } }
require('../../scripts/util')
E2.commands.graph = require('../../scripts/... |
import setupStore from 'dummy/tests/helpers/store';
import Ember from 'ember';
import {module, test} from 'qunit';
import DS from 'ember-data';
import isEnabled from 'ember-data/-private/features';
var env, store, adapter, Post, Comment, SuperUser;
var passedUrl, passedVerb, passedHash;
var run = Ember.run;
var get ... |
var acornToEsprima = require("./acorn-to-esprima");
var traverse = require("babel-core").traverse;
var assign = require("lodash.assign");
var Module = require("module");
var acorn = require("babel-core").acorn;
var path = require("path");
var t = require("babel-core... |
// Copyright (c) 2012-2015 Titanium I.T. LLC. All rights reserved. For license, see "README" or "LICENSE" file.
/* Run JSHint and print results to console */
(function() {
"use strict";
var jshintWrapper = require("./forkable_jshint_wrapper");
var fs = require("fs");
var async = require("async");
var errorTrans... |
var mongoose = require('mongoose');
var defaultValues = require("../../config/defaultValues");
//Entry schema
var claimSchema = mongoose.Schema({
claimid: String,
claim: String,
myid: String,
lastUpdated: {
type: Date,
default: Date.now
},
yes: {
type: Number,
d... |
(function() {
// Reify a timeseries view from JSON
var FlotView = function(json) {
// Extract state from JSON
view.View.call(this, json);
this.query = json.query;
this.title = json.title;
this.max = json.max || null;
this.graphType = json.graphType || 'line';
this.stac... |
import Ember from 'ember';
var get = Ember.get;
export default {
resolveLocale: function(container) {
var application = container.lookup('application:main');
var locale = application.localeStream.value();
var defaultLocale = application.defaultLocale;
var localeSet = container.lookupFactory('locale:... |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
sourcemap: 'none'
},
dist: {
files: {
'dist/material-bootstrap.css' : 'src/material.scss'
}
}
},
cssmin: {
options: {
report: 'gzip'
},
dist: {
s... |
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route('index', { path: '/' });
this.route('post', { path: '/:post_id' }, function () {
this.route('detail', { path: '/' });
this.route('... |
module.exports = function(req,res){
req.assert('email', 'E-mail inválido.').isEmail();
req.assert('password', 'Sua senha deve conter 6 a 10 caracteres.').len(6,10);
var validacaoErros = req.validationErrors() || [];
if(validacaoErros.length > 0){
validacaoErros.forEach(function(e){
req.flash('erro', e.msg);
... |
import LanguageDetector from 'i18next-browser-languagedetector';
import environment from '../../environment';
let LanguageDetectionService = new LanguageDetector(null, {
order: ['querystring', 'navigator']
});
LanguageDetectionService._detect = LanguageDetectionService.detect;
LanguageDetectionService.detect = funct... |
/*global Stem, Backbone*/
// Trivial Backbone model to track search input.
Stem.Models = Stem.Models || {};
(function () {
'use strict';
Stem.Models.Search = Backbone.Model.extend({
// Define the default properties of a model.
defaults: {
label: '',
placeholder: '',... |
'use strict';
const common = require('../common');
if (common.isWindows) {
// No way to send CTRL_C_EVENT to processes from JS right now.
common.skip('platform not supported');
}
const assert = require('assert');
const spawn = require('child_process').spawn;
process.env.REPL_TEST_PPID = process.pid;
const child =... |
import minimist from 'minimist';
const argv = minimist(process.argv.slice(2));
// CLI options
const enabled = {
// Disable source maps when `--prod`
maps: !argv.prod,
// Fail styles task on error when `--prod`
failStyleTask: argv.prod,
// Fail due to ESLint warnings only when `--prod`
failESLint: argv.pro... |
(function($, undefined){
var arraySlice = Array.prototype.slice,
default_opts = {
display_mode: 'book',
curPageIndex: 1,
zoom: 1,
show_selector_fac: 0.5,
book_mode_fist_page_odd: true,
auto_select_display_mode: true,
auto_resizable: true,
moveable: true,
background: '#ffffff',
... |
import {bindingMode} from './binding-mode';
import {connectable} from './connectable-binding';
import {enqueueBindingConnect} from './connect-queue';
import {sourceContext, targetContext} from './call-context';
export class BindingExpression {
constructor(observerLocator, targetProperty, sourceExpression,
mode, ... |
//npm run test-unit './src/components/select/test/Select.test.js'
/**
* Select test
* @author heifade
*/
import React, { Component } from 'react';
import { shallow, mount, render } from 'enzyme';
import { expect, should } from 'chai';
import Select from '../Select';
import Option from '../Option';
import OptGroup f... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'... |
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)... |
import Link from 'next/link'
import { RichText } from 'prismic-reactjs'
import Avatar from '../components/avatar'
import Date from '../components/date'
import CoverImage from './cover-image'
export default function PostPreview({
title,
coverImage,
date,
excerpt,
author,
slug,
}) {
return (
<div>
... |
/**
sprintf() for JavaScript 0.7-beta1
http://www.diveintojavascript.com/projects/javascript-sprintf
Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following cond... |
module.exports = {
plugin: {
translation: require('./translation.plugin.js')
}
};
|
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unl... |
// Copyright (c) 2017 Uber Technologies, Inc.
//
// 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... |
// THREEx.KeyboardState.js keep the current state of the keyboard.
// It is possible to query it at any time. No need of an event.
// This is particularly convenient in loop driven case, like in
// 3D demos or games.
//
// # Usage
//
// **Step 1**: Create the object
//
// ```var keyboard = new THREEx.KeyboardState();``... |
/**
* @file
* Task: Lint: scss Files.
*/
/* global module */
module.exports = function (gulp, plugins, options) {
'use strict';
// Lint scss files.
gulp.task('lint:css', function () {
return gulp.src(options.sass.files)
.pipe(plugins.plumber())
.pipe(plugins.stylelint({
reporters: [... |
// Generated by CoffeeScript 1.6.3
var File, HTML, HTTP, Path, QS, Request, Resources, URL, Zlib, assert,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.pro... |
const path = require('path')
module.exports = {
entry: './js/phoenix.js',
output: {
filename: 'phoenix.js',
path: path.resolve(__dirname, '../priv/static'),
library: 'Phoenix',
libraryTarget: 'umd'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
... |
var get = Ember.get, set = Ember.set, A = Ember.A;
var pager;
module("Bootstrap.Pager", {
setup: function() {
},
teardown: function() {
destroyIfNecessary(pager);
}
});
test("a pager can be created and appended to DOM", function() {
pager = Bootstrap.Pager.create();
appendIntoDOM(pager);
ok(isAppend... |
var mongo = require('mongodb').MongoClient;
/**
* This is used to connect to mongodb.
**/
var dbinfo = require ('./config.json');
var url = 'mongodb://' + dbinfo.user + ':' + dbinfo.password + '@' + dbinfo.location +
':' + dbinfo.port +'/' + dbinfo.name;
/**
* Author: Jason Klamert
* Date: 3/15/2017
* Descri... |
'use strict';
var __chunk_1 = require('./chunk-14c82365.js');
var helpers = require('./helpers.js');
var __chunk_2 = require('./chunk-1bb51959.js');
var __chunk_5 = require('./chunk-13e039f5.js');
var script = {
name: 'BTooltip',
props: {
active: {
type: Boolean,
default: true
},
type: {
... |
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _assertThisInitialized from "@babel/run... |
import _extends from "@babel/runtime/helpers/extends";
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children", "getScrollToLeft", "getScrollToRight", "showArrows", "scrollAnimationDuration", "h... |
"use strict";var colorPointMixin={setVisible:function(o){var i=this,t=o?"show":"hide";i.visible=i.options.visible=Boolean(o),["graphic","dataLabel"].forEach(function(o){i[o]&&i[o][t]()}),this.series.buildKDTree()}},colorSeriesMixin={optionalAxis:"colorAxis",colorAxis:0,translateColors:function(){var o=this,i=this.data.... |
//! moment.js locale configuration
//! locale : italian (it)
//! author : Lorenzo : https://github.com/aliem
//! author: Mattia Larentis: https://github.com/nostalgiaz
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory... |
// Generated by CoffeeScript 1.3.1
var fs;
fs = require('fs');
option('-o', '--output [DIR]', 'directory for compiled code');
task('build:parser', 'rebuild the Jison parser', function(options) {
var code, dir;
require('jison');
code = require('./lib/grammar').parser.generate();
dir = options.output || 'lib';... |
import fs from 'fs-extra'
import path from 'path'
import _ from 'lodash'
import mkdirp from 'mkdirp'
import * as paths from '../../paths'
import * as log from '../log'
import * as Remove from '../../remove';
const buildAssetsDir = "$assets"
const processAsset = function(object, key, buildPath) {
const assetPath = ... |
import '../global.css'
import '../global.scss'
export default function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
}
|
'use strict';
// Init the application configuration module for AngularJS application
var ApplicationConfiguration = (function() {
// Init module configuration options
var applicationModuleName = 'northwind';
var applicationModuleVendorDependencies = ['ngResource', 'ngCookies', 'ngAnimate', 'ngTouch', 'ngSanitize... |
'use strict';
describe('ngMock', function() {
var noop = angular.noop;
describe('TzDate', function() {
function minutes(min) {
return min*60*1000;
}
it('should look like a Date', function() {
var date = new angular.mock.TzDate(0,0);
expect(angular.isDate(date)).toBe(true);
});
... |
var _ = require('underscore');
var keystone = require('../');
/**
* UpdateHandler Class
*
* @param {Object} item to update
* @api public
*/
function UpdateHandler(list, item, req, res, options) {
if (!(this instanceof UpdateHandler)) {
return new UpdateHandler(list, item);
}
this.list = list;
this.item =... |
describe("Controller", function(){
var Users;
var element;
beforeEach(function(){
Users = Spine.Controller.sub();
element = $("<div />");
});
it("should be configurable", function(){
element.addClass("testy");
var users = new Users({el: element});
expect(users.el.hasClass("testy")).toBeT... |
jui.define("util.svg.3d", [ "util.base", "util.math", "util.color" ], function(_, math, color) {
var SVG3d = function() {
// 3D 사각형 그리기
this.rect3d = function(fill, width, height, degree, depth) {
var self = this;
var radian = math.radian(degree),
x1 = 0,
... |
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("codesnippet","tt",{button:"Код өзеген өстәү",codeContents:"Код эчтәлеге",emptySnippetError:"Код өзеге буш булмаска тиеш",language:"Тел",title:"К... |
import {Utilities} from '../utilities';
export let data = {
settings: {
'numericRegex': /^-?(?:\d+)(?:\,\d+)?$/
},
messages: {
'isRequired': 'est obligatoire',
'onValidateCallback': `n'est pas une valeur valide`,
'AlphaNumericOrWhitespaceValidationRule': (newValue, threshold) => {
return `n... |
import selftest from '../tool-testing/selftest.js';
import files from '../fs/files';
import { installNpmModule } from '../isobuild/meteor-npm.js';
const Sandbox = selftest.Sandbox;
const MONGO_LISTENING =
{ stdout: " [initandlisten] waiting for connections on port" };
selftest.define("npm", ["net"], () => {
cons... |
import React, {Component, PropTypes} from 'react';
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {isLoaded as isAuthLoaded} from '../reducers/auth';
import * as authActions from '../actions/authActions';
import {load as loadAuth} from '../actions/authActions';
import {requireServ... |
/* global Tether Drop */
const { extend } = Tether.Utils;
const _Drop = Drop.createContext({
classPrefix: 'tooltip'
});
const defaults = {
position: 'top center',
openOn: 'hover',
classes: 'tooltip-theme-arrows',
constrainToWindow: true,
constrainToScrollParent: false
};
let tooltipCount = 0;
class Too... |
/*******************************************************
* todo-mvc implementation
* siren representor (server)
* May 2015
* Mike Amundsen (@mamund)
* Soundtrack : Motown Classics Gold (2005)
*******************************************************/
/*
REFERENCE:
https://github.com/kevinswiber/si... |
var React = require('react');
var CommentsStore = require('../stores/CommentStore.js');
var CommentActions = require('../commentactions.js');
var BugComment = require('./BugComment.react');
var BugInput = require('./BugInput.react');
function getComments(bugId) {
return {
comments: CommentsStore.getForBug(bugId)
}... |
Template.mediaActions.onRendered(function () {
$('#sortBy').prop('selectedIndex',0);
$('#sortDir').prop('selectedIndex',0);
SortAction.setSortBy( {"uploadedAt": -1});
if(getClientSetting('media-list-style')) {
$('#' + getClientSetting('media-list-style')).addClass('active');
} else {
setClie... |
import * as React from 'react'
import { withRouter } from 'next/router'
class PageA extends React.Component {
goToB() {
this.props.router.push('/b')
}
render() {
return (
<div id="page-a">
<button onClick={() => this.goToB()}>Go to B</button>
</div>
)
}
}
export default withRo... |
//An example of an if/else statement with modulo in the condition
if(222 % 11) {
console.log("The first number is even!");
} else {
console.log("The first number is odd!");
}
|
var app = angular.module('app', ['ngAnimate', 'ngMaterial']);
app.filter('regex', function() {
return function(input, field, regex) {
var patt = new RegExp(regex);
var out = [];
if(input) {
for (var i = 0; i < input.length; i++){
if(patt.test(input[i][field])) ... |
var should = require('should');
var helper = require("../../helper");
var InternNoteManager = require("../../../src/managers/garment-purchasing/intern-note-manager");
var internNoteManager = null;
var DataUtil = require("../../data-util/garment-purchasing/intern-note-data-util");
var validate = require("dl-models").val... |
'use strict';
const BACKGROUND_COLOR = "#0000FF";
const HEIGHT = 40;
const MAX_CATEGORY_COUNT = 5;
const MAX_QUESTION_COUNT = 5;
class Jeopardy extends Rooms.RoomGame {
constructor(room, user, categoryCount, questionCount) {
super(room);
if (room.gameNumber) {
room.gameNumber++;
} else {
room.gameNumber ... |
/**
* VexFlow - Three Voices in single staff tests.
* Copyright Mohit Muthanna 2010 <mohit@muthanna.com>
*/
VF.Test.ThreeVoices = (function() {
var ThreeVoices = {
Start: function() {
var runTests = VF.Test.runTests;
QUnit.module("Three Voice Rests");
runTests("Three Voices - #1", ThreeVoice... |
/**
* San
* Copyright 2016 Baidu Inc. All rights reserved.
*
* @file 主文件
* @author errorrik(errorrik@gmail.com)
* otakustay(otakustay@gmail.com)
* junmer(junmer@foxmail.com)
*/
(function (root) {
// 人工调整打包代码顺序,通过注释手工写一些依赖
// // require('./util/empty');
// // require('./util/extend')... |
/*!
* froala_editor v3.0.0-beta.2 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2019 Froala Labs
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('froala-editor')) :
typeof define === 'f... |
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Responsive presentation and behavior for HTML data panels
//>>label: Panel
//>>group: Widgets
//>>css.structure: ../css/structure/jquery.mobile.panel.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css
define( [ "jquery", "../j... |
var assign = require("object-assign");
/**
* @author Julian Gautier
*/
/**
* Module Dependencies
*/
var util = require("util"),
Emitter = require("events").EventEmitter,
chrome = chrome || undefined,
Encoder7Bit = require("./encoder7bit"),
OneWireUtils = require("./onewireutils"),
SerialPort = null;
try... |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
The value of the internal [[Class]] property of Object prototype object
is "Object"
es5id: 15.2.4_A2
description: >
Getting the value of the internal [[Class]] p... |
/**
* FileTree Translation : french fr_FR
*
* @author Tennaxia
* @translator christophe blin
* @license FileTree Translation file is licensed under the terms of
* the Open Source LGPL 3.0 license. Commercial use is permitted to the extent
* that the code/component(s) do NOT become part of another Open Source... |
import React from 'react'
import { Image, Item } from 'semantic-ui-react'
const ItemExampleItems = () => (
<Item.Group>
<Item>
<Item.Image size='tiny' src='http://semantic-ui.com/images/wireframe/image.png' />
<Item.Content>
<Item.Header as='a'>Header</Item.Header>
<Item.Meta>Descrip... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
ext... |
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//------------------------------------------------------... |
/* global processWebhookMessage */
import { authenticated } from '../../helpers/authenticated';
import schema from '../../schemas/messages/sendMessage.graphqls';
const resolver = {
Mutation: {
sendMessage: authenticated((root, { channelId, directTo, content }, { user }) => {
const options = {
text: content,... |
import {takeLatest, delay} from 'redux-saga';
import {call, put} from 'redux-saga/effects';
import {PAGE_SCHEDULE_UNPREPARE, PAGE_DID_PREPARE, PAGE_WILL_ACTIVATE,
pageDidUnprepare} from '../actions';
export default function*() {
yield takeLatest([PAGE_SCHEDULE_UNPREPARE, PAGE_DID_PREPARE, PAGE_WILL_ACTIVATE... |
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const NullDependency = require("./NullDependency");
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Dependency"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.