code stringlengths 2 1.05M |
|---|
angular.module('app.controllers')
.controller('tabsCtrl', function($window, $http, activeTab) {
var vm = this;
vm.tabs = [
{name: 'achievements', link: 'achievements'},
{name: 'leaderboards', link: 'leaderboards'},
{name: 'timeCard', link: 'timeCard'},
{name: 'accuracy card', link: 'accuracyCard'},... |
'use strict';
angular.module('myApp.blog', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/blog', {
templateUrl: 'views/blog/blog.html',
controller: 'BlogCtrl as blog'
});
}])
.controller('BlogCtrl', [function() {
this.title = "Blog";
this.de... |
'use strict'
// Key codes (that will be the crappy part to maintain)
const keys = {
end: [
'\u0003', // CTRL+C
'\u0004', // CTRL+D
],
escape: [
'\u001b', // ESCAPE
],
left: [
'\u001b\u005b\u0044', // ←
],
right: [
'\u001b\u005b\u0043', // →
],
up: [
'\u001b\u005b\u0041', // ↑
],
down: [
'\u001... |
import * as React from 'react';
import loadScript from 'docs/src/modules/utils/loadScript';
import { useTheme } from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';
import { useNoSsrCodeVariant } from 'docs/src/modules/utils/codeVariant';
import { useUserLanguage } from 'docs/src/module... |
version https://git-lfs.github.com/spec/v1
oid sha256:6fa6fdf70f93edf3c978b8c472049b8336377575598ef7b9a4e3a1767fb0e294
size 2277
|
'lang sweet.js';
// true
export syntax sach = function (ctx) {
return #`true`;
}
// false
export syntax galat = function (ctx) {
return #`false`;
}
// if
export syntax agar = function (ctx) {
let ifparam = ctx.next().value
let ifblock = ctx.next().value;
let warnas = ctx.next();
let result = ... |
<-- Error 401: Access Denied -->> |
define(['exports', 'aurelia-loader', 'aurelia-metadata'], function (exports, _aureliaLoader, _aureliaMetadata) {
'use strict';
exports.__esModule = true;
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be... |
import React from 'react'
const Counter = ({count, boldButtons, onClick}) =>
<button
onClick={onClick}
style={{fontWeight: boldButtons ? 'bold' : 'normal'}}
>
{count}
</button>
Counter.propTypes = {
id: React.PropTypes.number.isRequired,
count: React.PropTypes.number.isRequired,
boldButtons: R... |
define(function() {
return function(controller) {
var login = new kony.ui.FlexContainer({
"clipBounds": true,
"isMaster": true,
"height": "100%",
"id": "login",
"isVisible": true,
"layoutType": kony.flex.FREE_FORM,
"left": "... |
/**
* The bounds for the areas of the Header
* Offset from the start of header, not memory address, e.g. 0x04 would actually be 0x0104
*/
const bounds = {
entry: [0x00, 0x04],
logo: [0x04, 0x34],
title: [0x34, 0x44],
publisher: [0x44, 0x46],
superGameBoy: [0x46, 0x47],
type: [0x47, 0x48],
romSize: [0x4... |
import React, { Component } from 'react'
import { Button, Col, Container, Form, FormGroup, FormText, Label, Input, Row } from 'reactstrap'
import { createUrl } from '../../api/utils'
import { Intro } from '../Homepage'
class FinishSteam extends Component {
state = {
acceptInvite: null,
}
component... |
// Module
// ------
// A simple module system, used to create privacy and encapsulation in
// Marionette applications
Marionette.Module = function(moduleName, app, options){
this.moduleName = moduleName;
this.options = _.extend({}, this.options, options);
// Allow for a user to overide the initialize
... |
/* Func:
Kind of like the JQuery's Deferreds. But with some extra funtions to track down the status of those deferred tasks, which is convinent for debugging.
Properties:
[ Public ]
<NUM> FLAG_FUTURE_NOT_YET = The flag marking the future is not yet settled
<NUM> FLAG_FUTURE_IS_OK = The flag marking the future ... |
$.support.cors = true
function APIRequest(request, data, callback) {
var fulldata = "requestType="+request+"&"+data;
$.ajax({
url: "http://127.0.0.1:9987/api",
type: "post",
crossDomain: true,
dataType: 'json',
data : fulldata,
async: true,
success: callback,
error: function (jqXHR, textSta... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
(this["webpackJsonp@visa/vds-react"]=this["webpackJsonp@visa/vds-react"]||[]).push([[147],{1659:function(s,t,a){s.exports=a.p+"static/media/illustration-spotlight-plane-dark.08345be3.svg"}}]);
//# sourceMappingURL=147.33780dc4.chunk.js.map |
var Readable = require('stream').Readable;
var rs = Readable();
var c = 97;
rs._read = function () {
rs.push(String.fromCharCode(c++));
if (c > 'z'.charCodeAt(0))
rs.push(null);
};
rs.pipe(process.stdout); |
import React, {PropTypes} from 'react'
import { NavDropdown, MenuItem } from 'react-bootstrap'
import { connect } from 'react-redux'
import i18next from 'i18next'
import { browserHistory } from 'react-router'
import { CurrentUser } from '../mixins'
import { refresh, signOut }from '../actions/oauth'
import { ajax } fro... |
var express = require("express");
var app = express();
app.use(function(request, response, next) {
if(request.url == "/") {
response.send("Welcome to the homepage!");
}else {
next();
}
});
app.use(function(request, response, next) {
if(request.url == "/about") {
response.send("Welcome to the about... |
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["color", "title"];
import React from 'react';
import PropTypes from 'prop-types';
export var BlockquoteIcon = function BlockquoteIcon(_ref) {
var col... |
(function (define) {
define(function (require) {
var jsonpath = require('../lib/jsonpath');
var undef;
return nested;
/**
*
* If the jsonPath specifies a property that cannot be navigated,
* the missing parameter is called. If there is no missing parameter,
* an Error is thrown.
* @param {Function} ge... |
'use strict';
var React = require('react-native');
var Button = require('apsl-react-native-button');
var {
StyleSheet,
Text,
View,
} = React;
var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center'
},
textStyleUp: {
color: 'white'
},
butt... |
import React, { Component, PropTypes } from 'react';
import Radium, { Style } from 'radium';
import { type, breakpoint, layout } from './vars'
@Radium
class Styles extends Component {
render() {
return (
<Style rules={{
html: {
boxSizing: 'border-box',
fontSize: type.bodySize,
... |
'use strict';
module.exports = {
app: {
title: 'CERBERUS',
description: 'CerberuSoft',
keywords: 'Software'
},
port: process.env.PORT || 3000,
udpPort: 6000,
templateEngine: 'swig',
sessionSecret: 'MEAN',
sessionCollection: 'sessions',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/boots... |
import React from "react";
import { mount } from "enzyme";
import { Portal } from "../Portal";
describe("Portal", () => {
it("should render in node on mount", () => {
const node = document.createElement("div");
let div = null;
const wrapper = mount(
<Portal node={node}>
<div ref={x => (div... |
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.HTMLGroup = function ( dom ) {
THREE.Group.call( this );
this.type = 'HTMLGroup';
/*
dom.addEventListener( 'mousemove', function ( event ) {
console.log( 'mousemove' );
} );
dom.addEventListener( 'click', function ( event ) {
console.log(... |
'use strict';
// Configuring the Directions module
angular.module('courses').run(['Menus',
function(Menus) {
// Set top bar menu items
//Menus.addMenuItem('topbar', 'Teachers', 'teachers', 'dropdown', '/teachers(/create)?',false,['admin']);
//Menus.addMenuItem('topbar', '基础数据管理', 'basemenus', 'dropdown', ... |
return jSQL;
});
|
/**
* Created by zuozhuo on 2017/5/12.
*/
const webpack = require('webpack');
const shelljs = require('shelljs');
const fs = require('fs');
const Path = require('path');
const jsdom = require('jsdom');
function getFile(filePath) {
return Path.join(__dirname, filePath);
}
function outputFileExists(filePath) {
... |
import {useView, inject} from 'aurelia-framework';
import {Registry} from 'shared/registry';
@useView('shared/showcase.html')
@inject(Registry)
export class Index {
constructor(registry) {
this.registry = registry;
}
configureRouter(config, router) {
this.router = router;
return this.registry.load... |
var path = require('path')
var fs = require('fs')
var nodeModules = {}
fs.readdirSync('node_modules')
.filter(function (x) {
return ['.bin'].indexOf(x) === -1
})
.forEach(function (mod) {
nodeModules[mod] = 'commonjs ' + mod
})
module.exports = ... |
(function (t) {
// hr
t.add("This value should be false.", "Ova vrijednost treba biti neto\u010dna (false).", "validators", "hr");
t.add("This value should be true.", "Ova vrijednost treba biti to\u010dna (true).", "validators", "hr");
t.add("This value should be of type {{ type }}.", "Ova vrijednost treba biti tipa {{... |
//----------------------------------------------------------------------------------
// Microsoft Developer & Platform Evangelism
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
// EITHER EXPRESSED OR IMPLIED, INCLUDING ... |
var path = require('path');
module.exports = {
src: {
ts: path.join(__dirname, 'src/index.ts'),
scss: path.join(__dirname, 'src/index.scss'),
html: path.join(__dirname, 'src/index.html')
},
output: {
dev: {
js: 'main-dev.js',
directory: 'build-dev',
... |
'use strict';
var fs = require('fs-extra'),
path = require('path'),
CoreMailer,
CoreExtension,
CoreUtilities,
CoreController,
appSettings,
appenvironment,
mongoose,
mailerSettingsFile = path.join(process.cwd(), 'content/config/extensions/periodicjs.ext.mailer/transport.json'),
mailerSettingJSON = fs.readJson... |
/**
* Helper that loads a CSS file (i.e. LINK tag).
*
* @returns {Function} a function for loading LINKs into the current <code>document</code>:
* <code>loadLink(href : String, rel : String, callback : Function)</code>
*
* where
* <code>href</code>: (String) the URL for the LINK
* <code>re... |
angular.
module('phonecatApp').
config(['$locationProvider', '$routeProvider',
function config($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routeProvider.
when('/phones', {
template: '<phone-list></phone-list>'
}).
when('/phones/:phoneId', {
template: '<pho... |
---
---
class Slider {
constructor(elem) {
this.active = 0;
this.viewport = elem.querySelector(".slides-viewport");
this.slides = elem.querySelectorAll(".slide");
}
findNext() {
if(this.active + 1 >= this.slides.length) return 0;
return this.active + 1;
... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
glo... |
const should = require("should");
const ziffer = require("..");
describe("Option: digits", () => {
it("Should default to null", () => {
const n = ziffer();
n.format(123.456).should.equal("123,456");
});
it("Should accept a string with 10 symbols to replace from 0 to 9", () => {
const n = ziffer();
n.form... |
'use strict'
require('babel-core/register')
require('babel-polyfill')
const describe = require('mocha-sugar-free').describe
const it = require('mocha-sugar-free').it
const expect = require('chai').expect
const { audioPlay, audioPlaying, audioPause, audioPaused, audioEnded,
audioRegister, audioUnregister, audio... |
export default function findProjectsWithWorkPlans() {
return {
query: `
query {
findProjectsWithWorkPlans {
id,
name
},
}
`,
}
}
|
define(
[
"jquery",
"cfgs",
"core/core-modules/framework.event",
"core/core-modules/framework.dict",
"core/core-modules/framework.ajax",
'core/core-modules/framework.util'
],
function ($, cfgs, event, dict, ajax, util) {
var readStyle = function (keyword) {
if (cfgs.... |
(function () {
var dM = angular.module('aqb.dir');
// dM
})(); |
/*
Component: Collision
Calls a callback when colliding with another entity
*/
(function () {
'use strict';
var Scene = require('../scene');
var Component = require('../component');
module.exports = (function() {
// Inherit from the Component class
Component.extend(Collision);
... |
#!/usr/bin/env babel-node
import fs from 'fs';
import path from 'path';
import schema from '../data/schema';
import { graphql } from 'graphql';
import { introspectionQuery, printSchema } from 'graphql/utilities';
(async() => {
const result = await (graphql(schema, introspectionQuery));
if (result.errors) {
consol... |
function ask() {
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question("What do you think of Node.js? ", function(answer) {
// TODO: Log the answer in a database
myanswer = answer
console.log("Thank you for your valuable... |
const convertSourceMap = require('convert-source-map')
const libCoverage = require('istanbul-lib-coverage')
const libSourceMaps = require('istanbul-lib-source-maps')
const fs = require('fs')
const Hash = require('./hash')
const path = require('path')
// TODO: write some unit tests for this class.
function SourceMaps (... |
/**
* @license Copyright (c) 2014, smrtlabs
* For licensing, see LICENSE
*/
"use strict";
var assert = require("chai").assert,
cached = require("gulp-cached"),
esformatter = require("gulp-esformatter"),
eslint = require("gulp-eslint"),
fs = require("fs"),
gulp = require("gulp"),
istanbul = ... |
import * as React from 'react';
type AlignType = 'left' | 'center' | 'right';
type ColumnKey = string | number;
export type Cell = {
isScrolling?: boolean,
align?: AlignType,
className?: string,
highlighted?: bool,
width: number,
minWidth?: number,
maxWidth?: number,
height: number,
cell?: string | ... |
var randTree = new Tree();
function generate() {
for (var i = 0; i < 3; ++i) {
var children, n;
randTree.root.addChild({name: i});
randTree.root.children()[i].addChild();
if (Math.random() * 2 > 1) {
randTree.root.children()[i].addChild();
}
if ... |
var OptionParser, argv, coffeecup, compile, fs, handle_error, log, options, path, switches, usage, write;
coffeecup = require('./coffeecup');
fs = require('fs');
path = require('path');
log = console.log;
OptionParser = require('coffee-script/lib/coffee-script/optparse').OptionParser;
argv = process.argv.slice(2)... |
'use strict';
(function(module) {
const homeController = {};
homeController.render = function() {
//reset active tab
$('.tab').removeClass('active');
$('.tab:first').addClass('active');
$('hr').show();
$('.tab-content').hide();
$('#intro').fadeIn();
}
module.homeController = homeCont... |
/**
* Definition for a binary tree node.
* function TreeNode(val) {
* this.val = val;
* this.left = this.right = null;
* }
*/
// TreeNode定义
function TreeNode(val) {
this.val = val;
this.left = this.right = null;
};
// 判断是否为有效数
var isValid = function(val) {
if (val || val === 0) {
retur... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.11.4-master-5034a04
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.button
* @description
*
* Button
*/
angular
.module('material.components.button', [ 'mater... |
var _ = require('lodash');
function getCurrentNamespace(parentNamespace, tasks) {
if (_.isEmpty(parentNamespace) && _.isEmpty(tasks.namespace)) {
return '';
} else if (_.isEmpty(parentNamespace)) {
return tasks.namespace + '.';
} else if (_.isEmpty(tasks.namespace)) {
return parentN... |
const { AbstractLiteralEntry } = require('./AbstractLiteralEntry');
class NameEntry extends AbstractLiteralEntry {
constructor (value) {
super('name', value);
}
}
module.exports.NameEntry = NameEntry;
|
/*!
* customize-engine-uglify <https://github.com/nknapp/customize-engine-uglify>
*
* Copyright (c) 2016 Nils Knappmeier.
* Released under the MIT license.
*/
'use strict'
var _ = require('lodash')
var uglify = require('uglify-js')
var orderFiles = require('./lib/orderFiles')
module.exports = {
schema: require... |
Grailbird.data.tweets_2019_08 =
[
{
"created_at": "Sat Aug 31 19:14:49 +0000 2019",
"id": 1167878427598176300,
"id_str": "1167878427598176257",
"text": "@i96jms @tabamatu Aaaahhh. We missed you by a few hours. Have a fab evening.",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
... |
/*
Next-Gen Events
Copyright (c) 2015 - 2021 Cédric Ronvel
The MIT License (MIT)
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 right... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
errorHandler = require('./errors.server.controller.js'),
mongoose = require('mongoose'),
passport = require('passport'),
User = mongoose.model('User');
/**
* List of Users
*/
exports.userList = function(req, res) {
User.find().sort('-crea... |
'use strict';
// Setting up route
angular.module('users').config(['$stateProvider',
function($stateProvider) {
// Users state routing
$stateProvider.
state('update-prof-pic', {
url: '/update-prof-pic',
templateUrl: 'modules/users/views/update-prof-pic.client.view.html'
}).
state('upload-prof-pic... |
require('./proof')(1, prove)
function prove (async, okay) {
var strata = createStrata({ directory: tmp, leafSize: 3, branchSize: 3 })
async(function () {
serialize(__dirname + '/fixtures/propagate.before.json', tmp, async())
}, function () {
strata.open(async())
}, function () {
... |
/*
* jQuery Iframe Transport Plugin 1.5
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2011, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/*jslint unparam: true, nomen: true */
/*global define, window, document */
(funct... |
import 'babel-polyfill';
import {
getScriptNameList,
getScript,
createScript,
renameScript,
updateScript,
deleteScript
} from '../aiRepoService.js';
beforeEach(() => {
global.localStorage.getItem.mockReset();
global.localStorage.setItem.mockReset();
global.localStorage.clear.mockReset();
global.loc... |
import axios from 'axios';
import { Message } from 'element-ui';
import store from '../store';
import { getToken } from 'utils/auth';
const base_api = "http://m.ctrip.com/restapi/soa2/11796"
// 创建axios实例
const service = axios.create({
baseURL: base_api || process.env.BASE_API, // api的base_url
timeout: 5000 ... |
import React from 'react';
import injectSheet from 'react-jss';
// import { compose, withHandlers, withState } from 'recompose';
const styles = {
AutoComplete: {
textAlign: 'center',
},
ComboBox: {},
ListBox: {
listStyle: 'none',
margin: '0',
padding: '0',
},
ListItem: {
border: '1px so... |
'use strict';
const debug = require('debug')('Backend-Portfolio:message-router.js');
const Router = require('express').Router;
const jsonParser = require('body-parser').json();
const createError = require('http-errors');
const bearerAuth = require('../lib/bearer-auth-middleware.js');
const Message = require('../mode... |
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import HomePage from './components/home/HomePage';
import AboutPage from './components/about/AboutPage';
import CoursesPage from './components/course/CoursesPage';
import ManageCoursePage from './components/... |
// ------------------------------------
// Constants
// ------------------------------------
// export const GAME_SHOW_NOTIFICATION = 'GAME_SHOW_NOTIFICATION'
// export const COUNTER_DOUBLE_ASYNC = 'COUNTER_DOUBLE_ASYNC'
// ------------------------------------
// Actions
// ------------------------------------
// expo... |
({
baseUrl: "modules",
paths: {
'ceylon/language/1.1.0/ceylon.language-1.1.0':'../assets/js/ceylon.language-1.1.0'
},
name: "main",
out: "main-built.js"
}) |
module.exports = {
root: true,
plugins: ['prettier', '@typescript-eslint'],
extends: ['tui/es6', 'plugin:prettier/recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
parser: 'typescript-eslint-parser',
},
env: {
browser: true,
node: tru... |
import React from 'react'
import renderer from 'react-test-renderer'
import { ButtonBase, IconButton, Button } from '../../lib'
test('Button.js component renders without crashing', () => {
const component = renderer.create(
<Button>I am a button</Button>
)
expect(component).toMatchSnapshot()
})
te... |
import {
bootstrapDiagram,
inject
} from 'test/TestHelper';
import { forEach } from 'min-dash';
import distributeElementsModule from 'lib/features/distribute-elements';
import modelingModule from 'lib/features/modeling';
function expectRanges(rangeGroups, expectedRanges) {
expect(rangeGroups).to.have.length(e... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M17 4h3v16h-3V4zM5 14h3v6H5v-6zm6-5h3v11h-3V9z"
}), 'SignalCellularAltSharp'); |
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'you-rockstar',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'wit... |
datab = [{},{"Application Entity":{"colspan":"1","rowspan":"1","text":"STORAGE-SCU"},"Role":{"colspan":"1","rowspan":"1","text":"SCU"},"Default AE Title":{"colspan":"1","rowspan":"1","text":"EX_STORE_SCU"},"Default TCP/IP Port":{"colspan":"1","rowspan":"1","text":"None"}},{"Application Entity":{"colspan":"1","rowspan":... |
/**
* Allows configuration of wip and schedule state mapping for kanban columns
*
* @example
* Ext.create('Ext.Container', {
* items: [{
* xtype: 'kanbancolumnsettingsfield',
* value: {}
* }],
* renderTo: Ext.getBody().dom
* });
*
*/
Ext.de... |
import { combineReducers } from 'redux';
import CardsReducer from './reducer_cards';
const rootReducer = combineReducers({
cards: CardsReducer
});
export default rootReducer;
|
/*
Ratings and how they work:
-2: Extremely detrimental
The sort of ability that relegates Pokemon with Uber-level BSTs into NU.
ex. Slow Start, Truant
-1: Detrimental
An ability that does more harm than good.
ex. Defeatist, Normalize
0: Useless
An ability with no net effect during a singles battle.
ex... |
/* @flow */
import _ from 'lodash/fp';
/* ARRAY */
/**
* _.chunk
*/
(_.chunk(2, ['a', 'b', 'c', 'd']): Array<Array<string>>);
(_.chunk(2)(['a', 'b', 'c', 'd']): Array<Array<string>>);
(_.chunk(2, null): Array<Array<any>>);
// $ExpectError
(_.chunk(2, ['a', 'b', 'c', 'd']): Array<Array<void>>);
// $ExpectError
(_.c... |
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* This file was added automatically by CKEditor builder.
* You may re-use it at any time to build CKEditor again.
*
* If you would like to build CKEdi... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as actions from '../../actions';
class ArtistEdit extends Component {
constructor(props) {
super(props);
this.state = {};
}
componentWillMount() {
this.props.findArtist(this.props.params.id);
}
componentW... |
export const PI2 = 2.0 * Math.PI
export const HALF_PI = Math.PI * 0.5
export const DEG2RAD = Math.PI / 180.0
export const RAD2DEG = 180.0 / Math.PI
export const EPS = 10e-6
// Constants
/*
* Lineary interpolates between a->b, using n as a weight
*/
export const mix = (n, a, b) => a * (1 - n) + b * n
/*
* Linearly... |
import { SET_IS_CREATING_LINE_SPOT } from '../actions';
export default function IsCreatingLineSpot(state = false, action) {
switch (action.type) {
case SET_IS_CREATING_LINE_SPOT:
return action.payload;
default:
return state;
}
}
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const { resolve } = require('path');
// Which files should be excluded from the compilation?
const exclude = /node_modules/;
const include = [];
// Loaders respond differently depending on the NODE_ENV environment variable
const p = process.env.NODE_ENV... |
require('../example-utils').listModuleAndTests(__dirname + '/foo.js', __filename);
var proxyquire = require('../../proxyquire')
, assert = require('assert')
, foo
;
// no overrides yet, so path.extname behaves normally
foo = proxyquire('./foo', __dirname, {});
assert.equal(foo.extnameAllCaps('file.txt'), '.TXT'... |
(function(JsSIP) {
var Exceptions;
/**
* @namespace Exceptions
* @memberOf JsSIP
*/
Exceptions= {
/**
* Exception thrown when a valid parameter is given to the JsSIP.UA constructor.
* @class ConfigurationError
* @memberOf JsSIP.Exceptions
*/
ConfigurationError: (function(){
var exception = func... |
// http://jsbin.com/ozebIvu/2/edit
//////////////////////////////////
//ClipsJS
//////////////////////////////////
/**!
* MagnumJS - ClipsJS Template Factory v0.1
* https://github.com/magnumjs
*
* @description Fast simple Html template to javascript function cache
* Includes Staples.js
* https://github.com/magnum... |
import React from 'react';
export default class ImgFigure extends React.Component {
// 构造函数
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
// 单击处理函数
handleClick(e) {
// 判断是否居中;居中就执行翻转操作;否则执行居中操作
if (this.props.arrange.isCenter) {
this.props.inverse();
}
... |
//=============================================================================
// feature detection
//=============================================================================
ua = function() {
var ua = navigator.userAgent.toLowerCase(); // should avoid user agent sniffing... but sometimes you just gotta do wh... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import Main from './app/components/Main';
class T13 extends React.Component {
constructor(props) {
super(props... |
module.exports = function ( grunt ) {
/**
* Load required Grunt tasks. These are installed based on the versions listed
* in `package.json` when you do `npm install` in this directory.
*/
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-... |
(function() {
/*************************************************************************************/
var ASTHelper = Firecrow.ASTHelper;
var Command = Firecrow.N_Interpreter.Command;
var ValueTypeHelper = Firecrow.ValueTypeHelper;
var CommandGenerator = Firecrow.N_Interpreter.CommandGenerator =
{
... |
var searchData=
[
['game_5fstate_5flose',['GAME_STATE_LOSE',['../merge_2tank_8cpp.html#a4cc39f049df62b331976f9a4482bd3eaa6a015920aa14873056d9e7b167259851',1,'GAME_STATE_LOSE(): tank.cpp'],['../tank_8cpp.html#a4cc39f049df62b331976f9a4482bd3eaa6a015920aa14873056d9e7b167259851',1,'GAME_STATE_LOSE(): tank.cpp']... |
'use strict';
var _ = require('underscore');
var winston = require('winston');
module.exports = function(level) {
level = 5 - level;
var levels = {
trace: 0,
"debug": 1,
"info": 2,
"warn": 3,
"error": 4,
"silent": 5
};
if(level > 5) level = 5;
if(level < 1) level = 0;
var lookup ... |
/*
* Set focus on element when the value of the show-focus attribute is true
*/
instaLurker.directive('showFocus', ['$timeout', function($timeout) {
return {
link:function(scope, element, attrs) {
scope.$watch(attrs.showFocus,
function (newValue) {
$timeout(... |
'use strict';
function UsuarioResource(CrudResourceFactory) {
return CrudResourceFactory('/api/usuario', 'Usuario');
}
angular.module('erpapp.usuario.services', ['grails'])
.factory('UsuarioResource', UsuarioResource);
|
angular.module('myApp.manage', ['ngRoute']).config([
'$routeProvider', function($routeProvider)
{
$routeProvider.when('/manage/:type/:route_key', {
templateUrl: 'sections/routes/manage/manage.html',
controller: 'manageCtrl'
});
}
]).controller('manageCtrl', function($... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.