code stringlengths 2 1.05M |
|---|
import { Component } from 'react'
import Services from 'services'
import fetch from 'isomorphic-fetch'
import _ from 'underscore'
import { connect } from 'react-redux'
import { fetchWeather, refreshChannels } from 'areas/weather/actions'
const mapStateToProps = (state) => {
return {
currentWeather: state.weather... |
var fs = require('fs');
var path = require('path');
var mkpath = require('mkpath');
var utils = require('./Utilities.js');
var winston = require('winston');
var global_mod = require('./item_modules/Global/Global.js');
/*
* create items.json for Connected Vision module
*
* arguments:
* node CreateItemList.js <targe... |
const QRCode = require('qrcode')
module.exports = (query, request) => {
return new Promise(async (resolve) => {
const url = `https://music.163.com/login?codekey=${query.key}`
return resolve({
code: 200,
status: 200,
body: {
code: 200,
data: {
qrurl: url,
... |
'use babel';
import { join } from 'path';
import { provideLinter } from '../lib/index';
const lint = provideLinter().lint;
describe( 'Linting YAML files', () => {
beforeEach( () => {
atom.workspace.destroyActivePaneItem();
waitsForPromise( () => {
return Promise.all( [
atom.packages.activate... |
/* */
var variance = require("./index");
var test = require("tape");
var polygon = require("turf-polygon");
var point = require("turf-point");
var featurecollection = require("turf-featurecollection");
test('variance', function(t) {
var poly1 = polygon([[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]]);
var poly2 = p... |
var jQuery = require('js-toolbox')._jQuery;
var parseString = require('xml2js').parseString;
module.exports.wowJSON = function(req, res, next, callback){
jQuery.ajax({url: "http://www.wowjobs.ca/wowrss.aspx?q=Web+Developer&l=N2T1G8&s=r&sr=25&t=30&f=r&e=&si=A&Dup=H"})
.done(function(xml){
parseString(xml, function ... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Grid, Row, Col } from 'react-flexbox-grid';
class MilitaryComparison extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<Grid fluid>
<Row center="md">
... |
/* Zepto v1.0-4-gf975db7 - zepto ajax data event fx - zeptojs.com/license */
var Zepto = (function() {
var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter,
document = window.document,
elementDisplay = {}, classCache = {},
getComputedStyle = document.de... |
requirejs.config({
baseUrl: '/',
waitSeconds: 15,
urlArgs: 'bust=' + new Date().getTime(),
paths: {
// Libraries
'jQuery': 'bower_components/jquery/dist/jquery.min',
'angular': 'bower_components/angular/angular',
'ngRoute': 'bower_components/angular-route/angular-route',
'ngLocale': 'bower_c... |
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client',
'./src/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
... |
// sample data
//
Ext.define('App.model.Orders.mAbstract',{
extend : 'Ext.data.Model',
requires : 'Ext.data.proxy.Memory',
proxy : {
type : 'memory'
},
constructor : function (data, id, raw, convertedData, parseAssociation) {
this.callParent([data, id, raw, convertedData]);
... |
import React from 'react';
import Relay from 'react-relay'
import { Link } from 'react-router';
class NodeTemplatesList extends React.Component {
constructor (props) {
super(props);
this.state = {
}
}
static propTypes = {
configurationId: React.PropTypes.string,
configuration: React.PropTyp... |
/**
* zrender
*
* @author Kener (@Kener-林峰, linzhifeng@baidu.com)
*
* shape类:多边形
* 可配图形属性:
{
// 基础属性
shape : 'polygon', // 必须,shape类标识,需要显式指定
id : {string}, // 必须,图形唯一标识,可通过'zrender/tool/guid'方法生成
zlevel : {number}, // 默认为0,z层level,决定绘画在哪层canvas中
invisib... |
'use strict';
var dashboardControllers = angular.module('dashboardControllers', []);
dashboardApp.controller('DashboardCtrl', ["$scope",
function DashboardCtrl($scope) {
// table data definitions
$scope.ratesGrid = {rows: 'ratesRows', columns: 'ratesCols'};
$scope.gaugesGrid = {rows: 'gaugesRow... |
for (let fn in fns)
fn();
function getSquares() {
return [for (i of [0, 1, 2]) i*i];
}
|
// All code points in the `Thai` script as per Unicode v9.0.0:
[
0xE01,
0xE02,
0xE03,
0xE04,
0xE05,
0xE06,
0xE07,
0xE08,
0xE09,
0xE0A,
0xE0B,
0xE0C,
0xE0D,
0xE0E,
0xE0F,
0xE10,
0xE11,
0xE12,
0xE13,
0xE14,
0xE15,
0xE16,
0xE17,
0xE18,
0xE19,
0xE1A,
0xE1B,
0xE1C,
0xE1D,
0xE1E,
0xE1F,
0xE20,... |
const fs = require('fs');
const readDir = require('util').promisify(fs.readdir);
const readFile = require('util').promisify(fs.readFile);
const path = require('path');
const mersenne = require('mersenne');
const crypto = require('crypto');
const YAML = require('yamljs');
con... |
'use strict';
const debug = require('debug')('todo:listsRouter');
const getListMidware = require(`${__dirname}/../lib/get-list-middleware`);
// const AppError = require(`${__dirname}/../lib/app-error`);
const listCtrl = require(`${__dirname}/../resources/list/list-controller`);
const listsRou... |
require.ensure([], function(require) {
require("./17.async.js");
require("./34.async.js");
require("./68.async.js");
require("./136.async.js");
});
module.exports = 137; |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
define({widgetLabel:"Thu ph\u00f3ng",zoomIn:"Ph\u00f3ng t\u1edbi",zoomOut:"Thu nh\u1ecf"}); |
var test = require('tape');
var tail = require('../../packages/array-tail');
test('non empty arrays return all but head', function (t) {
t.plan(4);
var testArrays = [
[1, 2, 3, 4, 5],
[[1, 2, 3], [4, 5, 6], [7, 8, 9]],
[{a: 1}, {b: 2}, {c: 3}, {d: 4}],
['a', 1, true, /r/g]
];
testArrays.forEach... |
'use strict';
/**
* Module dependencies.
*/
var init = require('./config/init')(),
config = require('./config/config'),
mongoose = require('mongoose');
/**
* Main application entry file.
* Please note that the order of loading is important.
*/
// Bootstrap db connection
var db = mongoose.connect(config.d... |
/**
* Leaflet SVG circle marker with detachable and draggable label and text
*
* @author Alexander Milevski <info@w8r.name>
* @license MIT
* @preserve
*/
module.exports = require('./src/marker');
|
$(document).ready(function()
{
toastr.success('Congratulations','Repository Has Been Created');
}); |
var Config = exports.Config = require('./config');
var utils = exports.utils = require('./utils');
var Cli = exports.Cli = require('./cli');
var Logger = exports.Logger = require('./logger').Logger;
var logSymbols = exports.logSymbols = require('./logger').logSymbols;
var Commands = exports.Commands = require('./comman... |
import React from 'react';
import _ from 'underscore';
import Reflux from 'reflux';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import {List, ListItem} from 'material-ui/List';
import Checkbox from 'material-ui/Checkbox';
import {grey400} from 'material-ui/styles/colors';
import IconButton from ... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M12 3L1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z" />
, 'SchoolOutlined');
|
var should = require('chai').should(),
rpiTemp = require('../index'),
getTemperature = rpiTemp.getTemperature;
describe('#getTemperature', function() {
it('getting temperature should not fail', function() {
getTemperature("28-000004e23e98", function(value) {
var temperature = parseInt(v... |
export function minWidth(query) {
return window.matchMedia(`(min-width: ${query}`).matches
}
export function maxWidth(query) {
return window.matchMedia(`(max-width: ${query}`).matches
}
// interactions
export { default as dynamicCallback } from './interactions/dynamicCallback';
export { default as inViewport } fr... |
var game = require('../game');
var keyboard = require('./keyboard');
var command = require('../command');
function Controller() {
}
function slash(entity) {
if (keyboard.isPressed('SLASH')) {
entity.trigger("slash");
command.queue.send(new command.Slash());
}
}
function move(dt) {
var speed = 160;
va... |
import React from "react";
import Immutable from "immutable";
import ReactB from "react-bootstrap";
import JobActionCreators from "../actions/jobActionCreators";
function jobHeader() {
return React.DOM.tr({
children: [React.DOM.th({
children: ["ID"]
}), React.DOM.th({
... |
let os = require('os')
let fs = require('fs')
let cp = require('child_process')
let path = require('path')
let mkdirp = require('mkdirp')
let tildify = require('tildify')
let untildify = require('untildify')
module.exports = {
create,
remove
}
let execPath = process.execPath
let daemonFile = `${__dirname}/../daem... |
import { combineReducers } from 'redux';
import value from './value';
export default combineReducers( {
value
} );
|
'use strict';
var gitstats = require('../controllers/gitstats');
// The Package is past automatically as first parameter
module.exports = function(Gitstats, app, auth, database) {
app.route('/gitstats')
.get(function(req, res, next) {
res.send('basic lookup here');
});
app.route('/gitstats/git... |
//tests not working. need to refactor either tests or cellNav because the controller isn't wired properly
xdescribe('ui.grid.edit GridCellDirective with CellNav feature', function () {
beforeEach(module('ui.grid.cellNav'));
beforeEach(module('ui.grid.edit'));
var gridUtil;
var scope;
var element;
var uiGri... |
/* flash message */
(function() {
function flashService($rootScope) {
return {
notify: function(message, isFlash) {
if (isFlash) {
$rootScope.$emit('event:flashMessageEvent', message);
} else {
$rootScope.$emit('event:notification', message);
}
}
};
}
... |
Template[getTemplate('postUnder')].helpers({
postHeading: function () {
return postHeading;
},
postMeta: function () {
return postMeta;
},
getTemplate: function () {
return getTemplate(this.template);
},
sourceLink: function(){
return !!this.url ? this.url : "/posts/"+this._id;
},
curr... |
$(function () {
var Client = require("./client.js");
Client.connect();
return Client.bindHandlers();
});
|
(function(){'use strict';
angular
.module("smartAdmin", ["smartAdmin.initialization", "smartAdmin.pageSetup"])
})();
|
/**
* Hilo 1.1.10 for kissy
* Copyright 2016 alibaba.com
* Licensed under the MIT License
*/
KISSY.add('hilo/renderer/WebGLRenderer', function(S, Class, Hilo, Renderer, Matrix){
/**
* Heavily inspired by PIXI's SpriteRenderer:
* https://github.com/pixijs/pixi.js/blob/v3.0.9/src/core/sprites/webgl/SpriteRendere... |
// Drag-n-Drop helper
DragDrop = function(context, onDrop) {
var disable = function( event ) {
event.stopPropagation();
event.preventDefault();
};
var dropHandler = function( event ) {
disable(event);
onDrop(event.dataTransfer.files);
};
context.addEventListener("dragleave", disable);
cont... |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ArcGIS = f()}}... |
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin, {
afterModel: function(model) {
this.transitionTo('expenditures', model.id);
}
});
|
/**
* Common include
* User: motorro
* Date: 07.01.2015
* Time: 8:39
*/
"use strict";
global.Q = require("q");
global.Request = require("../../index");
|
"use strict";
var SERVICE_TYPE_RETRIEVE_FORECASTS = "retrieve_forecasts";
var SERVICE_TYPE_RETRIEVE_REGIONAL_DATA = "retrieve_regional_data";
var SERVICE_TYPE_STORE_WEATHER_DATA = "store_weather_data";
var SERVICE_TYPE_RETRIEVE_COMPUTATION_RESULTS = "retrieve_computation_results";
var SERVICE_TYPE_OFFLOAD_REGRESSION ... |
'use strict';
angular.module('disk').factory('File', ['$resource',
function ($resource) {
return $resource('api/disk/:parent/:fileId', {
fileId: '@_id',
parent: '@parent'
}, {
update: {
method: 'put'
}
});
}
]);
|
import Ember from 'ember';
import EmberUploader from 'ember-uploader';
export default Ember.Controller.extend({
init() {
this._super(...arguments);
},
actions: {
}
});
|
import { actionCreatorCreator } from './../../utils/redux';
export const types = {
INIT: 'app/INIT',
UPDATE: 'app/UPDATE'
};
export const actions = {
init: actionCreatorCreator(types.INIT),
update: actionCreatorCreator(types.UPDATE)
};
export default actions; |
/*
* L.Control.Coordinates is used for displaying current mouse coordinates on the map.
*/
L.Control.Coordinates = L.Control.extend({
options: {
position: 'bottomleft',
//decimals used if not using DMS or labelFormatter functions
decimals: 5,
//decimalseperator used if not using DMS or labelFormatter functi... |
/*jshint node:true*/
module.exports = function(grunt) {
"use strict";
var banner,
umdStart,
umdMiddle,
umdEnd,
umdStandardDefine,
umdAdditionalDefine,
umdLocalizationDefine;
banner = "/*!\n" +
" * jQuery Validation Plugin v<%= pkg.version %>\n" +
" *\n" +
" * <%= pkg.homepage %>\n" +
" *\n" +
" * Copyrigh... |
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2013, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistribution... |
/**
* Require methods
*/
var add = require('./add.js');
/**
* Expose Boilerplate
*/
module.exports = boilerplate;
/**
* Shims
*/
var slice = [].slice;
/**
* Boilerplate component.
*
* Example:
*
* boilerplate('add', 4, 5, 6);
* // => 15
*
* @param {String} command
* @param {...Numbe... |
import { assignWithDepth } from './utils';
import { log } from './logger'; // eslint-disable-line
import theme from './themes';
import config from './defaultConfig';
// import { unflatten } from 'flat';
// import flatten from 'flat';
// import themeVariables from './theme-default';
// import themeForestVariables from... |
/*
* Copyright 2020 Trent Mick.
*
* Make sure cycles are safe.
*/
var Logger = require('../lib/bunyan.js');
var test = require('tap').test;
var Stream = require('stream').Stream;
var outstr = new Stream;
outstr.writable = true;
var output = [];
outstr.write = function (c) {
output.push(JSON.parse(c + ''));
}... |
import ExpandTransitionGenerator from '../../transitions/expand-transition'
export default {
methods: {
genTBody () {
const children = []
if (!this.itemsLength && !this.items.length) {
const noData = this.$slots['no-data'] || this.noDataText
children.push(this.genEmptyBody(noData))
... |
alert('SceneMain.js loaded');
function SceneMain() {
};
SceneMain.prototype.initialize = function () {
alert("SceneMain.initialize()");
// this function will be called only once when the scene manager show this scene first time
// initialize the scene controls and styles, and initialize your variables here
// sc... |
module.exports = [
// Content
"content",
"quotes",
"counter-reset",
"counter-increment",
// Display
"display",
"list-style",
"list-style-type",
"list-style-image",
"list-style-position",
"overflow",
"overflow-x",
"overflow-y",
"clip",
"visibility",
"opacity",
// Position
"positio... |
/**
* Sizun - Software Quality Inspection
* MIT License
* (C) 2015 David Rieger
*/
HOST = "localhost"
PORT = "8373"
function check_connection() {
console.log("check connection:")
try {
$.getJSON("http://" + HOST + ":" + PORT + "/", function (data) {
}).done(function() {
... |
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import clsx from 'clsx';
import LayoutProviders from '@theme/LayoutProviders';
import Head from '@doc... |
'use strict';
//获取article相关内容
import {initRootReducer} from '../../reducerM';
import ActionType from '../../actionType';
/**
* 获取的article相关信息
* @param {Object} [state={}] [description]
* @param {[type]} action [description]
* @return {[type]} [description]
*/
function article(state = {}, action){... |
game.PlayScreen = me.ScreenObject.extend({
/**
* action to perform on state change
*/
onResetEvent: function() {
// clear the background
// me.game.world.addChild(new me.ColorLayer("background", "#000000", 0));
// load a level
// me.levelDirector.loadLevel("demo");
... |
describe('pageConfirmCtrl', function() {
var ctrl,
formDataMock = {},
luckyNumbersMock = [{number: 3, text: 'three'},{number: 4, text: 'four'}],
$scope;
beforeEach(module('exampleApp'));
beforeEach(inject(function($controller, $rootScope){
$scope = $rootScope.$new();
... |
"use strict";
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
warnAboutDeprecatedESMImport("matchPath");
import { matchPath } from "../esm/react-router-dom.js";
export default matchPath;
|
angular.module('mean.rfid').controller('loggswipeCtrl', function($scope, $location, Loggswipe){
'use strict';
$scope.find = function() {
Loggswipe.query(function(loggswipes) {
$scope.loggswipes = loggswipes;
});
};
}); |
'use strict';
/* jasmine specs for controllers go here */
describe('PhoneCat controllers', function() {
beforeEach(function(){
this.addMatchers({
toEqualData: function(expected) {
return angular.equals(this.actual, expected);
}
});
});
beforeEach(module('phonecatApp'));
beforeEach... |
/*!
* UEditor Mini版本
* version: 1.2.2
* build: Tue Nov 10 2015 16:50:55 GMT+0800 (CST)
*/
(function($){
UMEDITOR_CONFIG = window.UMEDITOR_CONFIG || {};
window.UM = {
plugins : {},
commands : {},
I18N : {},
version : "1.2.2"
};
var dom = UM.dom = {};
/**
* 浏览器判断模块
* @file
* @module UE.brows... |
/* ===========================================================
* bootstrap-fileupload.js j2
* http://jasny.github.com/bootstrap/javascript.html#fileupload
* ===========================================================
* Copyright 2012 Jasny BV, Netherlands.
*
* Licensed under the Apache License, Version 2.0 ... |
var structAnalogRefConfig =
[
[ "AnalogRefConfig", "structAnalogRefConfig.html#a76ae15ad55b2c10a104844e1ca87a684", null ],
[ "calibration", "structAnalogRefConfig.html#ad5343860a6aa244d73bf4b5971b7d919", null ],
[ "deadband", "structAnalogRefConfig.html#a6b37597f16d48b7c60a9874d12476e5e", null ],
[ "off... |
const requireDir = require('require-dir');
// Require all tasks in /tasks, including subfolders
requireDir('./tasks', { recurse: true });
|
import { Provider } from 'react-redux'
import ReactDOM from 'react-dom'
import React from 'react'
import App from './containers/App'
import configure from './store'
const store = configure()
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root')
)
|
QUnit.test( "Issue #91 - type detection (GPU only)", function() {
var A = [
[1, 1],
[1, 1],
[1, 1]
];
var B = [
[1, 1, 1],
[1, 1, 1]
];
var gpu = new GPU();
function multiply(b, a, y, x) {
var sum = 0;
for (var i = 0; i < 2; i++) {
sum += b[y][i] * a[i][x];
}
ret... |
var bcrypt = require('bcryptjs');
var db = require('../config/db');
var UserSchema = db.Schema({
name: { type: String, required: true },
username: { type: String, required: true, unique: true, index: true },
password_digest: { type: String, required: true },
updated_at: { type: Date, default: Date.now }
});
UserS... |
// These are the pages you can go to.
// They are all wrapped in the App component, which should contain the navbar etc
// See http://blog.mxstbr.com/2016/01/react-apps-with-pages for more information
// about the code splitting business
import { getAsyncInjectors } from 'utils/asyncInjectors';
const errorLoading = (e... |
export const parseURL = (url, ...parts) => {
url = new URL(url);
switch (parts.length) {
case 0:
return url;
case 1:
return url[parts[0]];
default:
return parts.map(part => url[part]);
}
};
export const encodeHTML = (() => {
const encoder = d... |
import Identifier from './Identifier';
export default {
mixins: [Identifier],
props: {
configIdentifier:{
type:String,
required:true
}
},
computed: {
mergedConfigIdentifier() {
return this.getMergedIdentifier('mergedConfigIdentifier', this.con... |
// Generated by CoffeeScript 1.11.0
var age, ages, child, yearsOld;
yearsOld = {
max: 10,
ida: 9,
tim: 11
};
ages = (function() {
var results;
results = [];
for (child in yearsOld) {
age = yearsOld[child];
results.push(child + " is " + age);
}
return results;
})();
|
version https://git-lfs.github.com/spec/v1
oid sha256:baffef2e2f13d331d640d62ac3eb9b95907759d9bca913b5d25df4d20a1367cd
size 872
|
'use strict';
const Hoek = require('hoek');
const Hash = require('../lib/hash');
const Utilities = require('../lib/utilities');
const internals = {};
exports = module.exports = internals.definitions = function (settings) {
this.settings = settings;
};
/**
* appends a new definition object to a given collecti... |
import test from 'ava'
test.todo('the view')
|
import React from 'react'
import styled from 'styled-components'
import { color, fontSize, lineHeight } from 'styled-system'
import { getStringFromProps } from 'Helpers'
const H1 = styled.h1`
${color}
${fontSize}
${lineHeight}
z-index: 1;
`
export default ({
color,
fontSize,
lineHeight,
data: { title ... |
/**
* Interactive Linter Copyright (c) 2015 Miguel Castillo.
*
* Licensed under MIT
*/
define(function (require /*, exports, module*/) {
"use strict";
var EditorManager = brackets.getModule("editor/EditorManager"),
MainViewManager = brackets.getModule("view/MainViewManager"),
Workspac... |
export default `<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:ns1="http://purl.org/ontology/bibo/"
xmlns:ns2="http://purl.org/ontology/bibo/"
... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _express = require('express');
var _libNetworkRegistry = require('../lib/network-registry');
exports['default'] = function () {
var api = new _express.Router();
api.put('/', function (req, res) {
var _req$body = req.body;
... |
module['exports'] = function echoStream (req, res) {
// If the hook is not currently streaming,
// the req has already been fully buffered,
// and can no longer be streamed!
if (!req.streaming) {
return res.end('No streaming request detected. \n\nTo test streaming data to this Hook try running this Curl co... |
/*
* Copyright (c) 2017, Hugo Freire <hugo@exec.sh>.
*
* This source code is licensed under the license found in the
* LICENSE.md file in the root directory of this source tree.
*/
const _ = require('lodash')
const Promise = require('bluebird')
const td = require('testdouble')
td.config({ promiseConstructor: Pro... |
angular
.module('anecdotals')
.controller('StudentController', StudentController);
function StudentController($scope, $rootScope, $http, $location, $routeParams, studentFactory, testFactory, BASE_URL) {
'use strict';
var vm = this;
studentFactory.findAll(function(students) {
console.log('from the stu... |
angular.module('cc98.controllers')
.controller('newCtrl', function ($scope, $http) {
var page;
$scope.doRefresh = function () {
page = 0;
$http.get('http://api.cc98.org/topic/new?from=0&to=9')
.then(function successCallBack(response) {
$scope.news = response.data;
}, fu... |
/*-------------------------------------------------------------------
Required plugins
-------------------------------------------------------------------*/
const { mix } = require('laravel-mix');
minimist = require('minimist');
/*-------------------------------------------------------------------
Configuration
------... |
(function($)
{
$.Redactor.prototype.definedlinks = function()
{
return {
init: function()
{
if (!this.opts.definedLinks) return;
this.modal.addCallback('link', $.proxy(this.definedlinks.load, this));
},
load: function()
{
var $select = $('<select id="redactor-defined-links" />');
$('... |
import expect from 'expect';
import restaurantsGridReducer from '../reducer';
const initialState = {
// Initial State goes here!
};
describe('restaurantsGridReducer', () => {
it('returns the initial state', () => {
expect(
restaurantsGridReducer(undefined, {})
).toEqual(initialState);
});
});
|
function multipleExample(){
var latlons = {
map : [52.51, 13.37],
src1 : [52.51042282571668, 13.38984489440918],
src2 : [52.50956088985956, 13.377184867858887]
};
// add the map and set the initial center to berlin
var map = L.map('map-multipleExample').setView(latlons.map, 1... |
var ltx = require('ltx');
var _ = require('underscore');
/**
*
* @param id
* @constructor
*/
function IQ(id) {
this.id = id || String(Math.floor(Math.random()*1000000));
this.iq = new ltx.Element('iq')
.attr('type', 'get')
.attr('id', this.id);
this.oa = this.iq
.c('oa')
.attr('xmlns', '... |
cumbersnake.config = {
TURN_LENGTH : 20,
SPRITE_SIZE : 32,
MAP_WIDTH : 10,
MAP_HEIGHT : 10,
SCREEN_WIDTH : 320,
SCREEN_HEIGHT : 320,
WORLD_WIDTH : 320,
WORLD_HEIGHT : 320,
HEAD_IMAGE : "assets/images/head.png",
HEAD_WOUNDED_IMAGE : "assets/images/headWounded.p... |
var imdb = imdb || {};
(function (scope) {
var id = 0;
function Review(author, content, date) {
this._id = ++id;
this.author = author;
this.content = content;
this.date = date;
}
scope.getReview = function (author, content, date) {
return new Review(author, co... |
'use strict';
/**
* clear-attrs module
* @module clear-attrs
* @see module:index
*/
const lang = require('zero-lang');
const path = require('path');
const mapping = {
'zoom-out': /zoom-$/,
'zoom-in': /zoom\+/g,
'cpp': /c\+\+/g,
'at': /@/g,
'plus': /\+/g,
'-': /\./g,
};
module.exports = (file, cb) => {... |
/**
* @license Angulartics
* (c) 2013 Luis Farzati http://luisfarzati.github.io/angulartics
* Piwik 2.1.x update contributed by http://github.com/highskillz
* License: MIT
*/
/* global _paq */
(function (angular) {
'use strict';
/**
* @ngdoc overview
* @name angulartics.piwik
* Enables an... |
var startBtn, stopBtn, hypothesisDiv, statusDiv, key, languageOptions, formatOptions;
var SDK;
var recognizer;
var previousSubscriptionKey;
var input;
var voices = speechSynthesis.getVoices();
var isPlatinum = false;
var mobileNo;
var dashboardName = "";
var response;
// On doument load resolve the SDK dependecy
... |
//@flow
import React from 'react'
import { Link } from 'react-router'
import styled from 'styled-components'
const Wrapper = styled.div`
a {
margin-right: 20px;
}
`
const Logged = styled.span`
margin-left: 5rem;
`
const Menu = ({ logged }: Object) => (
<Wrapper>
<Link to="/">Posts</Link>
<Link to=... |
var my_node_id;
// Create the agent.
create_agent = function() {
dallinger.createAgent()
.done(function (resp) {
my_node_id = resp.node.id;
get_infos();
})
.fail(function (rejection) {
// A 403 is our signal that it's time to go to the questionnaire
if (rejection.status === 403) {... |
const mkmsg = require('../mkmsg');
test('leaves messages untouched if they already contain story references', () => {
expect(mkmsg('[#123456]')).toBe('[#123456]');
});
test('adds a story reference generated from the branch parameter', () => {
expect(mkmsg('', '123456-feature-name').split('\n')[2]).toBe('[#123456]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.