code stringlengths 2 1.05M |
|---|
import React from 'react';
import * as CharacterActions from '../../../actions/CharacterActions';
import { Label, Panel, ListGroup, ListGroupItem, Button, FormControl, Form, FormGroup, Radio } from 'react-bootstrap';
import IdentityFeature from './IdentityFeature'
export default class Identity extends React.Component... |
// Regular expression that matches all symbols in the Alphabetic Presentation Forms block as per Unicode v3.2.0:
/[\uFB00-\uFB4F]/; |
import memoize from 'async-memo-ize'
import axios from 'axios'
import './style.css'
const USERNAME = 'aboutlo'
const findStarsByUsername = async (username, date) => {
const groupByLanguage = (memo, repo) => {
if (!memo[repo.language]) {
memo[repo.language] = []
}
memo[repo.language].push(repo)
... |
module.exports = function(responseHandlerFn){
var self = this;
if(typeof(responseHandlerFn) === 'function'){
throw new Error('[mvcx] Invalid response handler function specified.');
}
this.handler = responseHandlerFn;
};
|
'use strict';
(function() {
var module = angular.module('app');
toastr.options = {
"closeButton": false,
"debug": false,
"positionClass": "toast-bottom-right",
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"ex... |
(function moduleExporter(name, closure) {
"use strict";
var entity = GLOBAL["WebModule"]["exports"](name, closure);
if (typeof module !== "undefined") {
module["exports"] = entity;
}
return entity;
})("UserAgent", function moduleClosure(global /*, WebModule, VERIFY, VERBOSE */) {
"use strict";
// --- technical ... |
import scene from '../store/scene.js';
import formatNumber from '../utils/formatNumber.js';
export default DegreeWindowViewModel;
function DegreeWindowViewModel(name, list, connectionType, id) {
this.id = id;
this.className = 'degree-results-window';
this.list = list;
this.nodeName = name;
this.degreeNumber... |
function CategoryBrowserDraggableObject(elmId) {
this.id = elmId;
return this;
}
CategoryBrowserDraggableObject.prototype.getDragDataById = function(id) {
id = id.replace(/imageFor/, "");
var categoryBrowserItem = document.getElementById(id);
return {
'id' : id,
'className' : categoryBrowserIt... |
import _ from 'lodash';
import {get, post} from 'help/fetchHelp';
export const SHOW_MASK = 'SHOW_MASK';
export const CHANGE_SUBMENU = 'CHANGE_SUBMENU';
export const CHANGE_MENUITEM = 'CHANGE_MENUITEM';
const INSERT_USERCONF = 'INSERT_USERCONF';
const READ_USERCONF = 'READ_USERCONF';
export function showMask(mask) {
r... |
module.exports = function(options) {
var limit = options.urlLimit || 10000,
loader = 'url-loader?limit='+limit;
if (options.minimize) {
loader = loader + '!img?progressive=true';
}
return {
module: {
loaders: [{
test: /\.(png|jpg|jpeg|gif|svg)$/,
loader: ... |
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
//
// Added 4D noise
// Joshua Koo zz85nus@gmail.com
/**
* You can pass in a random num... |
"use strict";
var LocalFilter = (function () {
function LocalFilter() {
}
LocalFilter.filter = function (data, field, search, customFilter) {
var filter = customFilter ? customFilter : this.FILTER;
return data.filter(function (el) {
var value = typeof el[field] === 'undefined' ||... |
const httpUtil = require('./http-util');
const util = require('../util/utils');
const controllerUtils = require('./controller-utils');
const path = require('path');
const mappings = require('./mappings');
module.exports = function(serverLocation) {
return function(req, res) {
httpUtil.setupIncoming(req, re... |
import * as React from 'react'
import MenuItem from './MenuItem'
class Sidebar extends React.Component {
constructor() {
super()
this.state = {current: 'overview'}
}
handleClick(page) {
this.setState({current: page})
}
render() {
var boundClick = this.handleClick.bind(this)
return (
<div classNa... |
version https://git-lfs.github.com/spec/v1
oid sha256:44c4f622c5e8f80e93d404ec339ae1c8d35052b7a54cebc69b5390ea018b21e2
size 9871
|
version https://git-lfs.github.com/spec/v1
oid sha256:37575df2f96d8f08375d1b02e2603741bb3cbe643be662e253e0719b5cd482ad
size 2197
|
version https://git-lfs.github.com/spec/v1
oid sha256:700da43e56472c9025bd9ef3d3fa32558c5a675680a16e8a09c5cb819d601707
size 11555
|
version https://git-lfs.github.com/spec/v1
oid sha256:0b4a6607846284183b78eae795285a1358aa6a3d29026dbac3881695d0271047
size 380
|
module.exports = function (ctx) {
ctx.src = ctx.src + '<!-- postProcessor -->'
return ctx
}
|
/*!
* bootstrapp-datetime.js v1.0.0
*
* Copyright (c) 2012, Nathanaël Mariani <github@nmariani.fr>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if(typeof Bootstrapp == "undefined") {
var Bootstrapp = {};
}
Bootstrapp.DateTime ... |
angular.module('playnesti.services', [])
.factory('getData', function($http){
return function(param, done) {
console.log(param);
$http({method: 'GET', url: 'http://private-d6e02-playnesti.apiary-mock.com/'+param+'?callback=JSON_CALLBACK'})
.success(function(data, sta... |
/*
Fathom - Browser-based Network Measurement Platform
Copyright (C) 2011-2016 Inria Paris-Roquencourt
International Computer Science Institute (ICSI)
See LICENSE for license and terms of usage.
*/
/**
* @fileoverfiew Debug page helper script to fetch and render stats
* ... |
'use strict';
angular.module('newsCentralApp')
.factory('User', function ($resource) {
return $resource('/api/users/:id/:controller', {
id: '@_id'
},
{
changePassword: {
method: 'PUT',
params: {
controller:'password'
}
},
get: {
method: 'G... |
// Generated by CoffeeScript 1.6.2
var bodyMethods, querystring, rpc;
rpc = require('stream-rpc');
querystring = require('querystring');
bodyMethods = ['POST', 'PUT', 'PATCH'];
module.exports = function() {
var client;
client = rpc();
client.request = function(options, callback) {
var request;
reque... |
//
//Deletes element to the tree(Inorder predesessor) step by step.
//
//subtreeTag:To determine what situation,
//oriIndex:Index of node of original place,
//oriNode:Node of original place,
//leftIndex:Index of node of left child,
//leftNode:Node of left child,
//rightIndex:Index of node of right child... |
'use strict'
// design-state main module
// require design-state modules
const dgnStateModelValidation = require('./dgnStateModelValidation.js')
const dgnStateOverview = require('./dgnStateOverview.js')
const addDgnStateComponent = require('./addDgnStateComponent.js')
const addDgnStateEdge = require('./addDgnStateEdg... |
'use strict';
const assert = require('assert');
const constants = require('../../src/constants.js');
const connect = require('../../src/protocol/connect.js');
describe('protocol/connect', () => {
it('should loopRespond 554 on DENY', done => {
connect(() => Promise.reject({
code: constants.deny
}), {
loopRe... |
define([
'/wp-content/uploads/audiolandscape/tree.js',
'/wp-content/uploads/audiolandscape/pointLight.js'
],
function(
treeBuilder,
pointLight
){
'use strict';
function buildDetailItem(position, type){
var detailItem;
if(type === 'tree'){
detailItem = treeBuilder();... |
// config/auth.js
// expose our config directly to our application using module.exports
module.exports = {
'jawboneAuth' : {
'clientID' : 'NDWjbOplTJY', // your App ID
'clientSecret' : 'd74cfa3ac728c7c482f9568bd305b581df817791',
'authorizationURL' : 'https://jawbone.com/auth/oauth2/auth... |
export default () => (
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 247.46 247.46'>
<path
fill='#FFF'
d='M246.744 13.984c-1.238-2.626-3.881-4.301-6.784-4.301H7.5c-2.903 0-5.545 1.675-6.784 4.301-1.238 2.626-.85 5.73.997 7.97l89.361 108.384v99.94c0 2.595 1.341 5.005 3.545 6.373 1.208.749 2.579 ... |
var mongoose = require("mongoose")
var eventModel = require("../models/EventModel.js")
module.exports = app => {
app.get("/api/trainings", async (req, res) => {
eventModel.Event
.find({
$or: [
{ Type: "Technical" },
{ Type: "Softskills" },
{ Type: "Infrastructure" }
... |
const AkairoError = require('../../util/AkairoError');
const AkairoHandler = require('../AkairoHandler');
const Inhibitor = require('./Inhibitor');
const { isPromise } = require('../../util/Util');
/**
* Loads inhibitors and checks messages.
* @param {AkairoClient} client - The Akairo client.
* @param {AkairoHandle... |
import Ember from 'ember';
const {
getOwner,
Service,
String: { underscore }
} = Ember;
const DRUPAL_FIELD_PREFIX = 'field_';
export default Service.extend({
init() {
let config = getOwner(this).resolveRegistration('config:environment');
this._super(...arguments);
this.map = config.drupalEntityMo... |
'use strict';
const chai = require('chai');
const expect = chai.expect;
const Support = require('./support');
const DataTypes = require('../../lib/data-types');
const dialect = Support.getTestDialect();
const Sequelize = Support.Sequelize;
const current = Support.sequelize;
const _ = require('lodash');
describe(Suppo... |
module.exports = function (list) {
var buttons = {
els: undefined,
clear: function () {
for (var i = 0, il = buttons.els.length; i < il; i++) {
list.utils.classes(buttons.els[i]).remove('asc')
list.utils.classes(buttons.els[i]).remove('desc')
}
},
getOrder: function (btn) {... |
/* eslint-disable ghost/ember/alias-model-in-controller */
import Controller from '@ember/controller';
import {computed} from '@ember/object';
import {inject as service} from '@ember/service';
import {task} from 'ember-concurrency';
export default Controller.extend({
settings: service(),
store: service(),
... |
(function () {
'use strict';
angular.module('zenubu.ngStrap.dropdown', [
'mgcrea.ngStrap.dropdown',
'ngSanitize'
])
.config(function ($dropdownProvider) {
angular.extend($dropdownProvider.defaults, {
html: true,
placement: 'bottom',
... |
Class Task {
constructor(name){
this.name = name;
this.completed = false;
};
complete (){
console.log('complete task:' + this.name)
};
save (){
console.log('save task:' + this.name)
};
}
module.exports = Task; |
module.exports = {
// auth
'/login': 'AuthController.login',
'/logout': 'AuthController.logout',
'post /login': 'AuthController.post_login',
// tags
'/tags/:tag': 'TagsController.tag',
'/': 'HomeController.index',
'/:seo_name': 'PostController.article',
'/:seo_name/edit': 'PostController.edit_articl... |
(function (g) {
/* === */
var ReactElement = function (type, key, props) {
this.type = type;
this.key = key;
this.props = props;
};
var ReactClass = function () {};
ReactClass.prototype.render = function () {};
ReactClass.prototype.setState = function (newState) {
... |
(function() {
var root;
root = this;
root.currentBounds = [];
L.GeoJSON.d3 = L.GeoJSON.extend({
initialize: function(geojson, options) {
this.geojson = geojson;
options = options || {};
options.layerId = options.layerId || ("leaflet-d3-layer-" + (Math.floor(Math.random() * 101)));
... |
import { dirname, isAbsolute, resolve } from 'path';
import { readFileSync } from 'fs';
import parser from 'css-parse';
import camelize from 'to-camel-case';
const defaultOptions = {};
const RULE = 'rule';
const DECLARATION = 'declaration';
const styleSheetConstants = {
'hairline-width': 'require(\'react-native\').S... |
(function () {
"use strict";
console.log("##Map Set");
// Sets
var s = new Set();
s.add("hello").add("goodbye").add("hello");
console.log(s.size === 2);
console.log(s.has("hello"));
// Maps
var m = new Map();
m.set("hello", 42);
m.set(s, 34);
console.log(m.get(s) == 34... |
// #20
"use strict";
var request = require("request");
var url = require('url');
var host = "http://localhost:28408/E2E/";
var ID;
function EMPTY_LIST_TEST_FACTORY(callback) {
return function (error, response, body) {
if (error) throw error;
let results = JSON.parse(body);
expect(response).to.have.prope... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
errorHandler = require('./errors'),
Menusection = mongoose.model('Menusection'),
_ = require('lodash');
/**
* Create a Menusection
*/
exports.create = function(req, res) {
var menusection = new Menusection(req.body);
menusection.... |
namespace.lookup('org.startpad.trie.test').defineOnce(function (ns) {
var trieLib = namespace.lookup('org.startpad.trie');
var ptrieLib = namespace.lookup('org.startpad.trie.packed');
ns.coverageTargets = [trieLib, ptrieLib];
var mark = 0;
function countNodes(node) {
if (node._m === mark)... |
var version = {
updateInterval: 600000,
intervalId: null
}
/**
* Checks the version and refreshes the page if a new version has been pulled
*/
version.checkVersion = function () {
$.ajax({
type: 'GET',
url: 'controllers/hash.php',
success: function (data) {
// The githash variable is located in index.ph... |
/**
* A set of algorithm to generate maps
* @module
*/
define(["map/mapTile", "structure/neutralStructure", "log"], function(MapTile, NeutralStructure, Log) {
/**
* A set of algorithm to generate maps
* @alias module:map/mapGenerator
* @class
* @param {number} mapSiz... |
(function() {
/**
* We can bootstrap like this: angular.bootstrap("#cseWidget", ['cseWidget']), which looks
* for the element with id="cseWidget". However the jqlite version of angular only supports
* element tags so without jquery this will raise "selectors not implemented" exception. To
* solv... |
import { objectUtil } from './utiljs.js';
/**
* @constructor
*/
const Saveable = function() {
// An object containing state that can be passed to JSON.stringify for serialization and loaded by JSON.parse.
// Any previous state will be cleared completely when loading.
this.saveState = {};
// An obje... |
'use strict';
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils... |
/**
* Created by dean on 15/8/25.
*/
$(function () {
// Tabs
$('#tabMenuCategory, #tabMenuCategory-1, #tabMenuCategory-2,#tabMenuCategory-3, #tabMenuCategory-4, ' +
'#tabMenuCategory-5, #tabMenuCategory-6, #tabMenuCategory-7, #tabMenuCategory-8, #tabMenuCategory-9,' +
'#tabMenuGroup-1,#tabMenu... |
const brcast = require('brcast')
module.exports = function createSubscriptions (sse, db) {
const broadcast = brcast()
broadcast.subscribe(data => {
sse.send({
event: 'fair-analytics-event',
data
})
})
broadcast.subscribe(data => {
db.storeEvent(data)
})
return broadcast
}
|
import React from 'react';
import { render } from 'react-dom';
import Application from './components/Application';
import firebase from './firebase';
require('./style.scss');
render(<Application/>, document.getElementById('application'));
|
var o = require('./o-bootstrap.js');
var o_objectType = require('./o-objectType.js');
module.exports = o.simpleObjectType = (function(){
"use strict";
return o_objectType.subtype({
name: 'o.simpleObjectType',
validate: function (val) {
return (val.constructor === Object) ? true : ... |
// --------------------------
// actions
// --------------------------
// local storage
export const ACTION_STORAGE_LOCAL_DESTROYED = 'STORAGE_LOCAL_DESTROYED';
export const ACTION_STORAGE_LOCAL_INDEXED = 'STORAGE_LOCAL_INDEXED';
export const ACTION_STORAGE_LOCAL_STORED = 'STORAGE_LOCAL_STORED';
expor... |
version https://git-lfs.github.com/spec/v1
oid sha256:9459bf4f3a6798e3658a7df5e78193f51cb3ec337066d241f08eb6a5aef59b69
size 1311
|
/*
Copyright by Denys Khanzhiyev
See license text in LICENSE file
*/
// Load configuration
var cfg = require("../config").cfg;
// Require modules
var
fb_binding = require("../../firebird.js");
exports.SyncConnection = function (test) {
test.expect(3);
var conn = fb_binding.createConnection();
conn.conne... |
let Logger = require('./logger'),
Settings = require('./settings'),
channelProvider = require('./channelProvider'),
timeHelper = require('./timeHelper');
module.exports = {
/**
* Constructs a rich embed for a giveaway message
*/
createGiveawayEmbed : function (client, giveaway){
l... |
//////////////////////////////////////////////////////////////////////////
// //
// This is a generated file. You can view the original //
// source in your browser if your browser supports source maps. //
// Source maps are s... |
(function () {
'use strict';
angular.module('article')
.factory('BlogServ', function ($q, url, $http, users, $rootScope, $firebaseObject, $firebaseArray, lastEditorPost) {
function setLastBlogBinding(articles) {
var blogs = _.where(articles, {isPublic: true});
... |
'use strict';
/*jslint indent: 2 */
/*global jQuery, Modernizr */
|
import React, {Component} from 'react';
class SearchBar extends Component {
constructor(props){
super(props);
this.state = {term: ''};
}
onInputChange(term){
this.setState({term});
this.props.onSearchTermChanged(this.state.term);
}
render() {
return (
... |
import _ from 'lodash';
import React, { Component } from 'react';
import numeral from '../utils/index';
export default class CandidateCard extends Component {
renderPendukung(pendukung){
if (pendukung === '-')
return (<p>Caleg independen, tidak ada dukungan partai</p>);
return (
<ul>
{pen... |
var plantillas = plantillas || {};
plantillas.reservas_tabla = '<table class="mis-reservas-table-view"><thead><tr>'
+'<th>Deporte</th>'
+'<th>Pista</th>'
+'<th>Fecha</th>'
+'<th>Hora</th>'
+'<th>Precio</th>'
+'<th>Luz</th>'
+'<th> </th... |
/*jslint evil: true */
'use strict';
var assert = require('assert');
var urlparse = require('url').parse;
var urlformat = require('url').format;
var escape = require('querystring').escape;
module.exports = {
toArray: function(obj){
if(Array.isArray(obj)) {
return obj;
}
if(obj) {
return [obj... |
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
import './app.css';
const store = configureStore();
render(
<Provider store={store}>
<R... |
window.project_title = "CLEWS Uganda";
window.project_settings = {
"indicator": {
"unique": false,
"iparam": true,
"preselect": ["_IRR_Sugarcane", "Area_IRR"]
},
"gw": {
"unique": true,
"preselect": [100]
},
"sw": {
"unique": true,
"preselect": [20]
},
"climate": {
"uni... |
'use strict'
import { expect } from '../../util/karma-setup'
import { receiptItems } from '../receipt.receiptItems'
import { AC } from '../actions'
// ***
// *** appState.receipt.receiptItems reducer tests
// ***
describe('appState.receipt.receiptItems reducer tests', () => {
it('should handle... |
// Calculates the bearing between two points in meter
function bearingBetween(p1, p2) {
var l1 = p1[0] * (Math.PI / 180);
var l2 = p2[0] * (Math.PI / 180);
var f1 = p1[1] * (Math.PI / 180);
var f2 = p2[1] * (Math.PI / 180);
var y = Math.sin(l2 - l1) * Math.cos(f2);
var x =
Math.cos(f1) * Math.sin(f2) -
... |
'use strict';
var chai = require('chai'),
should = chai.should(),
expect = chai.expect,
winston = require('winston');
describe('default logger', function () {
var logger = require('../lib/default-logger');
var originalLog = logger.logger.log;
beforeEach(function () {
logger.logger.log... |
// (function() {
// var section = document.querySelectorAll(".row");
// var sections = {};
// var i = 0;
//
// Array.prototype.forEach.call(section, function(e) {
// sections[e.id] = e.offsetTop;
// });
//
// window.onscroll = function() {
// unfortunately this doesn't work in REACT
// alert('dj... |
'use strict';
function Expander(rule) {
function isArray(v) {
return Object.prototype.toString.call(v) === '[object Array]';
}
function isStr(v) {
return typeof v === 'string';
}
function isObject(v) {
return typeof v === 'object';
}
function flat(v, set) {
if (isArray(v)) {
fla... |
var os = require('os')
var path = require('path')
var pathExists = require('path-exists')
var mkdir = require('mkdirp')
var nugget = require('nugget')
var homePath = require('home-path')
var mv = require('mv')
var debug = require('debug')('electron-download')
var npmrc = require('rc')('npm')
module.exports = function ... |
define(function(require, exports, module) {
var Backbone = require('backbone');
var ClientCollection = require('./client-collection');
var User = require('../model/user');
var _ = require('_');
var FriendShips = ClientCollection.extend({
constructor: function GCFriendS... |
/**
* Created by ZHAN on 2016/3/25.
*/
//不需要刷新
//蓄水池
var ArcFurnace = ArcFurnace || {};
ArcFurnace.Actor = ArcFurnace.Actor || {};
ArcFurnace.Actor.StoragePool = fabric.util.createClass(ActorsBase, {
// 开关 Onoff
initialize: function (canvas, X, Y, Width, Height, RotateAngle, Flip, centerPX, centerPY) {
... |
// All symbols in the `Bassa_Vah` script as per Unicode v9.0.0:
[
'\uD81A\uDED0',
'\uD81A\uDED1',
'\uD81A\uDED2',
'\uD81A\uDED3',
'\uD81A\uDED4',
'\uD81A\uDED5',
'\uD81A\uDED6',
'\uD81A\uDED7',
'\uD81A\uDED8',
'\uD81A\uDED9',
'\uD81A\uDEDA',
'\uD81A\uDEDB',
'\uD81A\uDEDC',
'\uD81A\uDEDD',
'\uD81A\uDEDE',... |
// Generated by CoffeeScript 1.6.3
(function() {
var ObjectId, OrganizationMethods, PageResult, bcrypt, errors, isObjectId, mongoose, _,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
_ = require('underscore-ext');
errors = require('some-errors');
PageResult = require... |
/*
* jsGrid v1.4.1 (http://js-grid.com)
* (c) 2016 Artem Tabalin
* Licensed under MIT (https://github.com/tabalinas/jsgrid/blob/master/LICENSE)
*/
(function(window, $, undefined) {
var JSGRID = "JSGrid",
JSGRID_DATA_KEY = JSGRID,
JSGRID_ROW_DATA_KEY = "JSGridItem",
JSGRID_EDIT_ROW_DATA... |
import Pop from 'heyui/plugins/pop';
import utils from 'heyui/utils/utils';
const Default = {
trigger: 'click',
html: true,
placement: 'bottom-start',
template: `<div role="select" class="h-dropdown"><div class="h-dropdown-inner"></div></div>`,
innerSelector: '.h-dropdown-inner',
preventOverflow: true,
t... |
import data from 'scripts/controllers/data.js';
import {addReview} from 'scripts/controllers/add-review-event.js';
import {addRating} from 'scripts/controllers/rate-movie-event.js';
var movie;
export function renderMovieDetails(id){
var $mainContent = $('#main-content');
data.movies.getAllMoviesFromDataBase(... |
import { connect } from 'react-redux';
import { setScenarioSelection } from 'actions/nexlocageetool';
import ScenarioSelect from './ScenarioSelect';
const mapStateToProps = state => ({
additionalData: state.datasetPage.additionalData,
dataset: state.nexlocageetool.dataset,
scenario: state.nexlocageetool.scenario... |
import { IPMAP_SELECTED, IPMAP_REMOVED } from 'ipmaps/actions/'
export default function(state = null, action) {
switch (action.type) {
case IPMAP_SELECTED:
return action.payload;
case IPMAP_REMOVED:
return null;
}
return state;
}
|
(function ($) {
Ss_input.fileSystem = [];
Ss_input.fileSystemHandlers = [];
Ss_input.storageTypes['fileSystem'] = Ss_input.Plugin.extend({
type: 'corePlugins',
defaults: {
allowed: ['jpg', 'jpeg', 'png'],
scriptsPath: '',
rootPath: '',
respons... |
'use strict';
var grunt = require('grunt');
/*
======== 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, expected, [message])
test.notEqual(actua... |
/**
* Early Childhood Development App
* @copyright 2016 Global Consent Ltd
* Civvals, 50 Seymour Street, London, England, W1H 7JG
* @author Werner Roets <werner@io.co.za>
*/
import { NativeModules } from 'react-native'
/**
* Bind to the native Android Sentry functions
*/
export default NativeModules.ReactNative... |
var ajgenesis = require('../..'),
path = require('path');
// Model to use
var model = require('./model.json');
// File transform
ajgenesis.createDirectory('./build');
var templatename = path.join(__dirname, 'HelloWorldJava.tpl');
var filename = path.join(path.join(__dirname, 'build'), 'HelloWorld.v... |
/* ==========================================================================
Helpers.js - JS Shims, helpers
Consider using one of these libraries to provide support for
javascript's natives across browsers
* https://github.com/kriskowal/es5-shim
* http://lodash.com/
* http://sugarjs.com/
=======... |
// 3 Write a JavaScript function that finds how many times a substring is contained in a given text (perform case insensitive search).
function onSearchInString() {
printInElement('', true);
var string = "We are living in an yellow submarine. We don't have anything else. Inside the submarine is very tight. So... |
var test = require('../').test;
test('too many', function(assert) {
assert.plan(2);
assert.equal(1, 1, 'too easy');
assert.looseEqual(1, '1', 'loose equality should be checked explicitly');
assert.comment('making one assertion over the plan...');
assert.deepLooseEqual({a: 1}, {a: '1'}, 'also for de... |
/**
* @name Photo Module
* @description Takes care of every action a photo can handle and execute.
* @author Tobias Reich
* @copyright 2014 by Tobias Reich
*/
photo = {
json: null,
getID: function() {
var id;
if (photo.json) id = photo.json.id;
else id = $(".photo:hover, .photo.active").attr("data-i... |
/**
* Javascript file to parse event data from the GW2 API
* which enables the use of event-based notifications.
**/
/*
The MIT License (MIT)
Copyright (c) 2013 Mathieu De Coster
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ... |
/**
* Created with JetBrains WebStorm.
* User: C01t
* Date: 8/15/13
* Time: 10:59 PM
* To change this template use File | Settings | File Templates.
*/
setFileHandler('txt', function (content, config, path) {
return 'jade.globals = jade.globals || {}; __ASSETS["' + AssetsCache[path] + '"] = ' + JSON.stringif... |
// Copyright (c) 2011 Romain Vallet <romain.vallet@gmail.com>
// Licensed under the MIT license, read license.txt
// The dynamic loading of images in Picasa Web Albums makes it difficult to handle with this extension.
// The function that "prepares" a link has been isolated (prepareImgLink) and is called whenever the
... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose');
var errorHandler = require('./errors');
var Diagram = mongoose.model('Diagram');
var Group = mongoose.model('Group');
var _ = require('lodash');
var chartBuilder = require('pcnchart');
var pdf = require('html-pdf');
function formatDiagr... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = R... |
/*
* spa.data.case.case_45.js
* case for data
* 干货案例 45 - 挽回老公的心,让婚姻走出“出轨”阴影
*/
/*jslint browser : true, continue : true,
devel : true, indent : 2, maxerr : 50,
newcap : true, nomen : true, plusplus : true,
regexp : true, sloppy : true, vars : false,
white : ... |
var assert = require('assert')
var fs = require('fs')
var Promise = require('promise')
var script = require('../')
var src = fs.readFileSync(__dirname + '/fixture/script.js', 'utf8')
var a = {}, b = {}, c = {}
var ac = 0, bc = 0, cc = 0
script(src, {
first: function () {
ac++
return new Promise(function (re... |
/* Copy from https://github.com/segmentio/xml-parser with a little modifcation*/
/**
* Expose `parse`.
*/
// module.exports = parse;
exports.parse = parse;
/**
* Parse the given string of `xml`.
*
* @param {String} xml
* @return {Object}
* @api public
*/
function parse(xml) {
xml = xml.trim();
// strip... |
/* global jest describe beforeEach it expect */
jest.dontMock('../components/Option');
jest.dontMock('../style/option');
import React from 'react';
import Shallow from 'react-test-renderer/shallow';
// Babel would move an import in front of the jest.dontMock. That's why require
// is used instead of import.
const Op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.