code stringlengths 2 1.05M |
|---|
import { connect } from 'react-redux'
import React, { Component, PropTypes } from 'react'
import WatchVideo from '../components/WatchVideo'
import WatchVideoNav from '../components/WatchVideoNav'
import { bindActionCreators } from 'redux'
import { pushState } from 'redux-router'
class VideoContainer extends Component ... |
var keystone = require('keystone'),
Types = keystone.Field.Types;
var Comparativebenchmarking = new keystone.List('Comparativebenchmarking', {
autokey: { from: 'name', path: 'key' }
});
Comparativebenchmarking.add({
image:{ type: Types.CloudinaryImage},
text:{type:String},
subText:{type:String},
shortString:{t... |
/**
* Pseudo-profile for metadata extraction.
*/
exports.name = 'Metadata';
exports.rules = [
require('../rules/metadata/profile'),
require('../rules/metadata/title'),
require('../rules/metadata/docDate'),
require('../rules/metadata/dl'),
require('../rules/metadata/deliverers'),
require('../... |
'use strict';
var selector = document.location.pathname.startsWith('/m/') ? '.fgG0' : '.record';
var elements = document.querySelectorAll(selector);
if (elements.length) {
var line = Array.prototype.filter.call(elements, function (record) {
return record.textContent.indexOf('文章網址') !== -1;
})[0].textContent;
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.secDependencies = void 0;
var _dependenciesBigNumberClass = require("./dependenciesBigNumberClass.generated");
var _dependenciesTyped = require("./dependenciesTyped.generated");
var _factoriesAny = require("../../factoriesAny.js"... |
var groups = require('./groups');
var items = require('./items');
exports.groups = groups;
exports.items = items;
exports.init = function (rawDB) {
groups.init(rawDB);
items.init(rawDB);
};
|
class AdvancedSearch {
get advancedSearchForm() {
return browser.$(".advanced-search-form")
}
get advancedSearchPopoverTrigger() {
return browser.$(".advanced-search-form ~ span .asLink")
}
get advancedSearchPopover() {
return browser.$(".advanced-search")
}
get anetObjectSearchToggleButton... |
#!/usr/bin/env node
var path=require("path"),fs=require("fs"),ver_reg=[/^((?:\$|(\s*\*\s*@)|(\s*(?:var|,)?\s+))version[\s\:='"]+)([0-9]+(?:\.[0-9]+){2,2})/,/^(\s?\*.*v)([0-9]+(?:\.[0-9]+){2,2})/],bump="1",name="",_a="b";process.argv.forEach(function(a,c){if(!(2>c))if("-"==a.slice(0,1)&&isNaN(parseFloat(a)))_a=a.slice(1... |
import { setData } from '@progress/kendo-angular-intl';
setData({
name: "en-BM",
likelySubtags: {
en: "en-Latn-US"
},
identity: {
language: "en",
territory: "BM"
},
territory: "BM",
calendar: {
patterns: {
d: "dd/MM/y",
D: "EEEE, d MMMM... |
/* global
angular,
minErr,
inherits
*/
var $greMinErr = minErr('$grecaptcha');
/**
* @ngdoc object
*
* @name wo.grecaptcha.$grecaptchaProvider
* @requires wo.grecaptcha.$greLanguageCodes
*
*
* @description
* Provider for $grecaptcha service
*
**/
function $grecaptchaProvider($greLanguageCod... |
import path from 'path';
import glob from 'glob';
class ConfigurationReader {
constructor(options) {
const defaultOptions = {
path: './BuildConfiguration',
prefix: 'config.',
ext: '.js',
env: null
}
this.options = Object.assign(defaultOptions, options);
return this.getConfiguration();
}
getCo... |
/* jshint node: true */
'use strict';
module.exports = {
name: 'simple-infinity',
included: function(app) {
this.addons.forEach(function(addon){
if (addon.name === "ember-version-is") {
addon.included.apply(addon, [app]);
}
});
}
};
|
/* eslint-disable */
module.exports = [
{"content":[{"insert":"W"}],"id":"f2VOQIqn","level":0,"type":"checkbox","before":null,"after":"tzt7XTD6","completed": false},
{"content":[{"insert":"Events"}],"id":"tzt7XTD6","level":1,"type":"checkbox","before":"f2VOQIqn","after":"GAO4DKMc","completed": false},
{"content":... |
import external from '../../externalModules.js';
import { freehand } from '../../imageTools/freehand.js';
/**
* Triggers held down buttons such that we can update the image on CTRL click
* to show all points, for example.
*/
/**
* An enum containing textual representations of keyCodes.
* @type {Object}
*/
const ke... |
import {
GET_TEMPERATURES,
GET_TEMPERATURES_SUCCESS,
GET_TEMPERATURES_ERROR
} from '../actions/temperatures'
export default function temperatures(state = { data: [], loading: true }, action) {
switch (action.type) {
case GET_TEMPERATURES:
return Object.assign({}, state, {
loading: true,
... |
Meteor.methods({
getServerInfo() {
return RocketChat.Info;
},
});
|
import {
AUTH_LOGIN,
AUTH_LOGIN_SUCCESS,
AUTH_LOGIN_FAIL,
AUTH_LOGOUT,
AUTH_LOGOUT_SUCCESS,
AUTH_LOGOUT_FAIL,
AUTH_SIGNUP,
AUTH_SIGNUP_SUCCESS,
AUTH_SIGNUP_FAIL,
VALIDATE_TOKEN,
VALIDATE_TOKEN_SUCCESS,
VALIDATE_TOKEN_FAIL,
NEW_PASSWORD,
NEW_PASSWORD_SUCCESS,
NEW_PASSWORD_FAIL,
RESET_PASS... |
"use strict";
var path = require("path");
var shjs = require("shelljs");
var sinon = require("sinon");
var cli = require("../src/cli.js");
exports.group = {
setUp: function (cb) {
if (!process.stdout.flush) {
process.stdout.flush = function () { return true; };
}
sinon.stub(process, "exit");
cb();
}... |
(function( window, document ) {
var Moduler = {
config : {
cssPath : 'css/',
jsPath : 'js/',
media : 'screen'
},
init : function( options ) {
this.cssElements = document.querySelectorAll('[data-moduler-css]')
this.jsElements = document.querySelectorAll('[data-moduler-js]')... |
var EventEmitter = require('events').EventEmitter
, inherits = require('util').inherits
, FileSystemLoader = require('./loaders/fs').FileSystemLoader
, ArrayLoader = require('./loaders/array').ArrayLoader
, sift = require('sift')
, utils = require('./utils')
, format = require('util').format;
/**
* Create... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import configureStore from '../store';
import Controller from '../utils/controller';
import Manager from './manager';
const store = configureStore();
export default class Deck extends Component {
... |
/**
* @file mip-jm-select 组件
* @author
*/
define(function (require) {
var $ = require('jquery');
// zepto一些方法不支持,比如is,animate等,所以使用jquery;
var viewport = require('viewport');
// 获取视口;
var customElement = require('customElement').create();
customElement.prototype.firstInviewCallback = functio... |
/* Copyright 2017 PSU Capstone Team D
This code is available under the "MIT License".
Please see the file LICENSE in this distribution for license terms.*/
describe('configControllerTests', function(){
var S3Service, schedulerService, BSFGeneratorService, ConfigController, $scope;
beforeEach(angular.mock.module... |
let config;
if (process.env.NODE_ENV === 'production') {
config = {
mongoURL: process.env.MONGO_URL_PROD,
port: process.env.PORT || 3000,
stripeSecretKey: process.env.STRIPE_PROD_SECRET_KEY,
stripePubKey: process.env.STRIPE_PROD_PUBLIC_KEY,
};
} else if (process.env.NODE_ENV === 'development') {
... |
import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './PostgresqlPlain.svg'
/** PostgresqlPlain */
function PostgresqlPlain({ width, height, className }) {
return (
<SVGDeviconInline
className={'PostgresqlPlain' + ' '... |
Fire.JS.get(Fire, '$0', function () {
var selection = Editor.Selection.curSelection('node');
if (selection.length > 0) {
var id = selection[0];
var node = Fire.engine.getInstanceById(id);
return node;
}
});
Fire.JS.get(Fire, '$0N', function () {
var wrapper = Fire.$0;
if (wr... |
'use strict';
var assert = require('assert');
var sizes = require('../../src/standardPageSizes');
var integrationTestHelper = require('./integrationTestHelper');
describe('Integration test: columns', function () {
var testHelper = new integrationTestHelper();
it('renders two columns', function () {
var dd = {
... |
var express = require('express');
var controller = require('./../controllers/multas_controller');
router = express.Router();
router.get('/', controller.retrieveAll);
// localhost:port/multas with post
router.post('/', controller.add);
router.get('/add', controller.multaForm);
router.get('/:id_multa', controller.multaI... |
import Backbone from 'backbone';
import Product from '../models/product';
class Products extends Backbone.Collection {
get model () {
return Product;
}
}
export default Products;
|
import React, { PropTypes, Component } from 'react';
import { connect } from 'react-redux';
import Pagination from 'react-js-pagination';
import BlogList from '../../components/BlogList';
import { socket } from '../../../../util/initSocket';
import { getUser, getAuthenticatedStatus } from '../../../App/AppReducer';
i... |
import {Platform, AsyncStorage} from 'react-native';
import FCM from 'react-native-fcm';
import subscription from './subscription';
import fcm from './fcm';
//subscribes to all required/forced and recommend subjects
function initSubs(){
subscription.get_iCube((icube)=>{
for(var i=0; i<icube.length; ++i){
... |
export const SEARCH_REQUEST = 'watchlist/App/SEARCH_REQUEST';
export const SEARCH_SUCCESS = 'watchlist/App/SEARCH_SUCCESS';
export const SEARCH_FAILURE = 'watchlist/App/SEARCH_FAILURE';
|
version https://git-lfs.github.com/spec/v1
oid sha256:c35d65d8b4bacdd528784f832b03b001a431464511be7222419b60022415ebd0
size 66845
|
app.controller('CreateVoteController', function ($scope, $routeParams, $location, notifier, auth, VoteService, EverliveService) {
var categories = {};
VoteService.getCategoryNames()
.then(function (collection) {
collection.forEach(function (category) {
categories[category.na... |
module.exports = [
170,
181,
186,
192,
193,
194,
195,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
211,
212,
213,
214,
216,
217,
218,
219,
220,
221,
222,
223,
224,
225,
226,
227,
228,
229,
230,
231,
232,
... |
// COPYRIGHT © 2017 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute... |
/*
* 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... |
Package.describe({
name: 'risul:plivo',
summary: 'Plivo NodeJS client packaged for Meteor',
version: '1.0.0_3',
git: 'https://github.com/risul/meteor-plivo'
});
Npm.depends({
"plivo": '0.3.2'
});
Package.onUse(function(api) {
api.versionsFrom('METEOR@1.0');
api.export('Plivo');
api.add... |
import React from 'react';
import ReactDOM from 'react-dom';
import { RouterProvider } from 'react-router5';
import configureStore from '../store/configureStore';
import { Provider } from 'react-redux';
import DevTools from '../containers/DevTools';
import createRouter from '../createRouter';
import Root from '.... |
/**
* Auth util functions
*
* @since 1.0.0
*/
const JWT = require('jsonwebtoken');
const config = require('./../config/server.config.js');
const crypto = require('crypto');
/**
* Generate auth token
* @param {Object} account
* - {string} username - username for login
* - {string} role - user's role
* ... |
class microsoft_sqllite_mobile_oledb_3_0 {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object GetLifetimeServ... |
const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow
const Menu = electron.Menu
const MenuItem = electron.MenuItem
const path = require('path')
const url = require('url')
let mainWindow
// let mainMenu = new Menu()
// let fileMenuItem = new MenuItem({
// acceler... |
$(function () {
// Set paths
// ------------------------------
require.config({
paths: {
echarts: 'assets/js/plugins/visualization/echarts'
}
});
// Configuration
// ------------------------------
require(
// Add necessary charts
[
... |
var port = chrome.extension.connect(), collapsers, options, jsonObject;
function displayError(error, loc, offset) {
var link = document.createElement("link"), pre = document.body.firstChild.firstChild, text = pre.textContent.substring(offset), start = 0, ranges = [], idx = 0, end, range = document
.createRange(), ... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class News extends Component {
render() {
return (
<View style={styles.container}>
<Text sty... |
game.resources = [
/**
* Graphics.
*/
// our level tileset
{name: "area01_level_tiles", type:"image", src: "../static/boilerplate/data/img/map/area01_level_tiles.png"},
// the main player spritesheet
{name: "gripe_run_right", type:"image", src: "../static/boilerplate/data/img/sprite/gripe_run_right.png"},... |
/* global describe it */
var fs = require('fs')
var assert = require('assert')
var utils = require('./support/utils')
var load = require('../lib/browser')
var fetcher = utils.fetcher
var path = require('path')
var pianoSF = fs.readFileSync(path.join(__dirname, '/support/piano.js')).toString()
describe('audio-loader@br... |
/*!
* jQuery UI Datepicker 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/datepicker/
*
* Depends:
* jquery.ui.core.js
*/
(function( $, undefined ) {
$.extend($.ui, { datep... |
// Regular expression that matches all symbols in the Small Form Variants block as per Unicode v7.0.0:
/[\uFE50-\uFE6F]/; |
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(':file:data.db:');
db.serialize(function() {
db.run("CREATE TABLE boards(rows TEXT)");
});
db.close();
|
'use strict';
var util = require('util');
var _ = require('underscore');
var childProcess = require('child_process');
var h = require('../helper');
var file = require('../file');
var chalk = require('../chalk');
var icon = require('../icon');
var log = require('../log');
var config = require('../config');
var core = ... |
import React, { Component } from 'react';
import './Cast.css'
class Cast extends Component {
render() {
return (
<div className="col-xs-4 col-sm-2">
<div className="panel panel-default">
<div className="panel-body">
<div>
<img src={`https://image.tmdb.org/t/p/w150$... |
//need to flowchart before anything else
function products(name, path) {
this.name = name;
this.path = path;
this.clicks = 0;
}
var allProducts = [new products('bag', 'img/bag.jpg'),
new products('banana', 'img/banana.jpg'),
new products('boots', 'img/boots.jpg'),
... |
version https://git-lfs.github.com/spec/v1
oid sha256:3ab4a50279fd94bdff33461a8346e18c427038dfcf395b432a98bae8e65f60b8
size 347714
|
const {spec: specize} = require('./def');
function unform(pred, value) {
const predicate = specize(pred).unform;
return predicate ? predicate(value) : value;
}
module.exports = unform;
|
provide('name', {
thing: 454,
bah: "BOO!"
}); |
var assert = require('assert');
var should = require('should');
var AwsScrapper = require('../lib/scrapers/aws-scraper');
describe('Aws Scraper', function () {
var awsScrapper;
before(function () {
require("../mock-api/api");
});
it('should create new instance', function (done) {
aws... |
var fs = require("fs");
var mkdirp = require("mkdirp");
var async = require("async");
var request = require("request");
var mongodb = require("mongodb").MongoClient;
var ig = require("instagram-node").instagram();
var config = require("./config/config");
ig.use(config.auth);
mongodb.connect(config.db, function(err, d... |
import AceSettings from "./AceSettings.js";
import TextEditor from "./TextEditor.js";
export default function main(session)
{
session.on("connect", () => {
session.settingsMenu.addSection(new AceSettings(session));
session.editorDictionary.set("TextEditor", TextEditor);
});
}
|
// Strings commented out are pending official translations
import arEG from './ar-EG.json';
import arJO from './ar-JO.json';
import arSA from './ar-SA.json';
import bgBG from './bg-BG.json';
import caES from './ca-ES.json';
import csCZ from './cs-CZ.json';
import daDK from './da-DK.json';
import deDE from './de-DE.jso... |
define("ace/snippets/turtle", ["require", "exports", "module"], function(require, exports, module) {
"use strict";
exports.snippetText = undefined;
exports.scope = "turtle";
}); |
import React, { Component, PropTypes } from 'react';
import s from './Contact.scss';
import withStyles from '../../decorators/withStyles';
@withStyles(s)
class SupportLocations extends Component {
static propTypes = {
className: PropTypes.string,
locations: PropTypes.array,
};
render() {
const output = [];
... |
/**
* Session Configuration
* (sails.config.session)
*
* Sails session integration leans heavily on the great work already done by
* Express, but also unifies Socket.io with the Connect session store. It uses
* Connect's cookie parser to normalize configuration differences between Express
* and Socket.io and hoo... |
//
//
//function Sidebar(readOnly){
//
// var self = this;
// this.populate = populate;
// this.setInstantEvents = setInstantEvents;
// this.setSidebarEvent = setSidebarEvent;
//
// var eventHtml = "<div class='external-event fc-event" + (readOnly ? " fc-event-draggable":"") + " fc-e... |
///////////////////////////////////////////////////////////////////////////////
// Autodesk.ADN.Viewing.Extension.Color
//
///////////////////////////////////////////////////////////////////////////////
AutodeskNamespace("Autodesk.ADN.Viewing.Extension");
Autodesk.ADN.Viewing.Extension.Color = function(viewer, options)... |
define({
root: ({
common: {
apply: "Apply",
ok: "OK",
cancel: "Cancel",
yes: "Yes",
no: "No",
next: "Next",
previous: "Previous",
back: "Back",
selected: "selected",
selectAll: "Select all",
name: "Name",
usage: "Usage",
settings: "Sett... |
/* eslint-env jest */
import { join } from 'path'
import {
findPort,
killApp,
nextBuild,
nextStart,
File,
initNextServerScript,
renderViaHTTP,
launchApp,
} from 'next-test-utils'
jest.setTimeout(1000 * 60 * 2)
let app
let appPort
let proxyPort
let proxyServer
const appDir = join(__dirname, '../')
cons... |
if (typeof(define) !== 'function') {
var define = require('amdefine');
}
define(['./build/remotestorage'], function(RemoteStorage) {
var suites = [];
suites.push({
name: "modules",
desc: "RemoteStorage modules",
setup: function(env, test) {
global.XMLHttpRequest = require('xhr2');
Remote... |
// Twilio Credentials
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
// require the Twilio module and create a REST client
const client = require('twilio')(accountSid, authToken);
const http = require('http');
const express = require('express');
const app = express();
... |
'use strict';
const path = require('path'),
toCrumbs = function (pageName) {
return pageName.split(path.sep).map((component, index, array) => Object({
name: component,
path: (new Array(array.length - index).join('../' || './') + component),
last: index === array.length - 1
}));
};
module.exports = funct... |
import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
import FastClick from 'fastclick'
Vue.use(VueResource)
Vue.use(VueRouter)
Vue.http.options.emulateJSON = true
const router = new VueRouter({
history: true,
hashbang: false
})
FastClick.atta... |
import lodash from 'lodash';
import { resolveFileName } from './util.js';
import { getPrototypeDecoratorValue, ENUMS } from './decorators.js';
/**
* Checks if the file is named index.js
*/
export const indexFileValidator = ({ path }, { warn }) => {
if (resolveFileName(path) !== 'index') {
warn(`${path} ... |
module.exports = {
main: {
type: "amd",
files: [
{
expand: true,
cwd: 'src/main/javascript/modules/',
src: ['**/*.js'],
dest: 'target/_temp/javascript/modules/'
}
]
}
}; |
{
proxy = http
.createServer(function(request, response) {
var parsed = url.parse(request.url);
var opts = {
host: parsed.hostname,
port: parsed.port,
path: parsed.path
};
var proxyAuth = request.headers["proxy-authorization"];
http.get(opts, function(res) {
... |
/**
* The Logging layer module.
*
* @return LoggingLayer class (extends CartoDBLayerClass)
*/
define(['abstract/layer/CartoDBLayerClass'], function(CartoDBLayerClass) {
'use strict';
var CogLoggingLayer = CartoDBLayerClass.extend({
options: {
sql:
"SELECT 'cog_logging' as tablename, cartodb_i... |
import DS from 'ember-data';
export default DS.ActiveModelAdapter.extend({
defaultSerializer: "github",
host: "https://api.github.com",
namespace: "repos/wdch-nseeley/wadachi-fighter",
headers: {
"Accept": "application/vnd.github.v3+json"
}
});
|
/**
* Module dependencies.
*/
var express = require('express')
, less = require('less')
var logManager = require("nodeFlows/logManager");
var app = module.exports = express.createServer();
global.app = app;
// Configuration
app.configure(function() {
app.set('views', __dirname + '/views');
app.set(... |
/**
* 参考koa-compose源码进行改造
*/
module.exports = (middleWares) => {
if (!Array.isArray(middleWares)) throw new TypeError('Middleware stack must be an array!')
for (const middleWare of middleWares) {
if (typeof middleWare !== 'function') throw new TypeError('Middleware must be composed of functions!')
... |
/**
* Author: Jeff Whelpley
* Date: 4/3/15
*
* This module is used to translate a set of tokens into
* an standard JSON object with hours data
*/
var lexer = require('./hrsoo.lexer');
var utils = require('./hrsoo.utils');
/**
* Go through and process the timezone token(s)
* @param state
* @returns {*}
*/
fun... |
import React from 'react';
import styled from 'styled-components';
import * as _ from 'lodash';
import Loading from 'components/Loading';
import CallToAction from 'components/CallToAction';
import ItemIncident from 'components/ItemIncident';
import ArrowForward from 'material-ui/svg-icons/navigation/arrow-forward';
co... |
'use strict';
const getData = require('./data');
const math = require('./math');
function Transactions(options) {
let self = this;
self.options = options;
}
Transactions.prototype.find = function (account) {
let self = this;
let data = getData(self.options);
return data.getTransactionsForAccount(account.... |
/*swiper*/
var mySwiper = new Swiper ('.swiper-container', {
direction: 'horizontal',
loop: true,
pagination: '.swiper-pagination'
})
/*懒加载效果*/
var Lazy = {
"Img": null,
"getY": function(b) {
var a = 0;
if (b && b.offsetParent) while (b.offsetParent) a += b.offsetTop, b = ... |
/**
* Store
*
* This is to be used when an error is returned
* from a data store. This means that the application
* is (probably) ok, but that the data stores
* have returned an error that we weren't expecting.
* This would normally result in an HTTP 503
* error.
*
* This cannot be recovered from.
*/
"use ... |
const InRoute = require('../in-route');
module.exports = {
description() {
return 'generates a dumb (pure) component';
},
fileMapTokens() {
return {
__root__: InRoute
};
}
};
|
version https://git-lfs.github.com/spec/v1
oid sha256:cc179f280d1b1589ac9dfa08ed156397a608de4c09d55efbce032a111e75d715
size 15800
|
'use strict';
const fs = require('fs');
const request = require('request');
const cheerio = require('cheerio');
const assert = require('assert');
const SEASON_NAMES = ["fall", "winter", "summer"];
const outputDir = "../scrapedJson/";
const courseCodeRegex = /\w{4}\s{0,2}\d{3}/;
const minTotalCreditsRegex = /\S*\d+\S... |
define(['init'], function() {
Crafty.sprite(24, 32, "resources/coin.png", {
Coin: [0, 0]
});
/*Crafty.sprite("resources/invitation.png", {
Invitation: [0, 0]
});*/
Crafty.sprite(22, 32, "resources/princess.png", {
Princess: [0, 0]
});
Crafty.sprite(17, 28, "resources/marioandluigi.png", {
Mario: [0,... |
(function () {
'use strict';
function LoginController($scope, $location, auth, notifier) {
$scope.login= function login(user, loginForm){
if (loginForm.$valid) {
auth.login(user)
.then(function () {
notifier.success('Login success!');
... |
export default {
animation: {
start: 'start',
finish: 'finish',
tick: 'tick'
},
clear: 'clear',
colorScheme: {
configure: 'configureColorScheme',
validate: 'validate'
},
initialized: 'initialized',
layout: 'layout',
changed: 'changed',
updating... |
#!/usr/bin/nodejs
/**
* LearnYouNode Workshop
* Step 05 - LS filtrato
*
* author: Maurizio Aru
* created: 2017.10.26
*/
var fs = require('fs');
var path = require('path');
if (process.argv.length < 4) {
console.error("ERROR: arguments missing");
console.error("Syntax: appname path filter");
return 1... |
// Run a batch operation against the Word object model.
Word.run(function (context) {
// Create a proxy object for the document body.
var body = context.document.body;
// Queue a commmand to insert text in to the beginning of the body.
body.insertText('This is text inserted with body.insertTex... |
import defaultParserInterface from '../utils/defaultParserInterface';
import pkg from 'san/package.json';
const ID = 'san';
export default {
...defaultParserInterface,
id: ID,
displayName: ID,
version: pkg.version,
homepage: pkg.homepage,
locationProps: new Set([]),
typeProps: new Set(['tag']),
load... |
// @flow
import { createStore, applyMiddleware, compose } from 'redux';
import logger from 'redux-logger';
import createHistory from 'history/createHashHistory';
import { routerMiddleware } from 'react-router-redux';
import reducer from '../reducers';
export const history = createHistory();
const middleware: Array<... |
var env = require('./config/env')
,http = require('http')
,app = require('./config/express');
http.createServer(app).listen(env.config.port, env.config.address, function() {
console.log('Express Server listening on port ' + env.config.port);
});
|
users = [
{fullname: "Ryan Dahl", email: "ryan.dahl@gmail.com", contact: "7353154321", address: "Manipur, INDIA", password: "ryan@321", is_active: true, is_admin: false },
{fullname: "Misko Hevery", email: "misko.hevery@gmail.com", contact: "7323154774", address: "Dangarh, INDIA", password: "misko@321", is_active: tr... |
"use strict";
function AppsView() { // which is the homepage
this.refreshView = function() {
appsView.displayApps();
appsView.bindBuildFromRepoButton();
};
this.displayNoUsersContent = function() {
// TODO see http://twitter.github.io/bootstrap/javascript.html#carousel
$("#appTableBody").html('... |
var http = require('http');
var express = require('express');
var cors = require('cors');
var app = express();
app.use(cors());
/*
var app = http.createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'application/json'});
res.write(JSON.stringify({result: 'success'}));
res.end();
});
*/
... |
$( document ).ready(function() {
initializePage();
});
function initializePage() {
$('.item a').click(addItemDetails);
}
function addItemDetails(e) {
// Prevent following the link
e.preventDefault();
// Get the div ID, e.g., "project3"
var itemID = $(this).closest('.panel').attr('id');
// get rid of 'pr... |
"use strict";
define(['/partials/graph_sketcher/graph_input.html'], function(templateUrl) {
return ["$rootScope", 'api', function($rootScope, api) {
return {
scope: {
state: "=",
questionDoc: "=",
graphSpec: "=",
},
restr... |
'user strict';
var insertionSort = require('./insertion-sort');
function sort (items) {
var count = items.length;
var steps = [];
var start = 1;
steps.push(start);
while(start < count/3) {
start = 3 * start + 1;
steps.push(start);
}
for (var i = steps.length - 1; i >= 0; i-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.