code stringlengths 2 1.05M |
|---|
'use strict';
const builtInSlotsMap = require('./built-in-slots-map');
const validator = require('./validator');
const parseError = require('./error-handler').parseError;
const _ = require('lodash');
module.exports = (richUtterances, slots, utterances) => {
// Iterate over each rich utterance and transform it by re... |
import React from 'react'
import SearchExampleStandard from '../Types/SearchExampleStandard'
const SearchExampleInput = () => <SearchExampleStandard input={{ icon: 'search', iconPosition: 'left' }} />
export default SearchExampleInput
|
var http = require('http');
var WebServer = require('./WebServer');
var NPromise = require('../Niman/modules/NPromise');
var server = new http.Server();
var webServer = new WebServer(NPromise);
webServer.setBasePath(__dirname.replace('server', ''));
webServer.useCache = false;
webServer.setDefaultPage('/test/Event... |
var fs = require("fs")
var path = require("path")
var File = require('../models/model_file');
var express = require('express');
var multipart = require('connect-multiparty');
var config = require('../config');
var multiparty = require('multiparty');
var formidable = require('formidable');
var multer = require('multer')... |
/* eslint import/no-extraneous-dependencies:0, no-unused-vars:0, no-console:0 */
const Koa = require('koa')
const HOSTNAME = process.env.HOSTNAME || '127.0.0.1'
const PORT = process.env.PORT || 3002
const service = new Koa()
const router = require('koa-router')()
router.post('/v1/login', async (ctx) => {
ctx.body ... |
export const FETCH_REQUEST = 'UPDATER/FETCH_REQUEST';
export const FETCH_SUCCESS = 'UPDATER/FETCH_SUCCESS';
export const FETCH_FAILURE = 'UPDATER/FETCH_FAILURE';
|
/**
* Copyright (c) 2014 Petka Antonov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, pub... |
var classtesting_1_1gmock__generated__actions__test_1_1_unary_constructor_class =
[
[ "UnaryConstructorClass", "classtesting_1_1gmock__generated__actions__test_1_1_unary_constructor_class.html#a35b2c0aab3928c1d558c11b6652a7262", null ],
[ "value_", "classtesting_1_1gmock__generated__actions__test_1_1_unary_cons... |
// copy from https://raw.githubusercontent.com/mysqljs/mysql/7770ee5bb13260c56a160b91fe480d9165dbeeba/lib/protocol/constants/errors.js
// (c) node-mysql authors
/**
* MySQL error constants
*
* !! Generated by generate-error-constants.js, do not modify by hand !!
*/
exports.EE_CANTCREATEFILE = 1;
exports.EE_READ =... |
module.exports = function (sequelize, DataTypes) {
const User = sequelize.define('t_user', {
username: DataTypes.STRING,
email: DataTypes.STRING,
salt: DataTypes.STRING,
hash: DataTypes.STRING
});
return User;
}; |
import path from 'path'
import bodyParser from 'body-parser'
import cors from 'cors'
export default app => {
app.use(bodyParser.urlencoded({extended: false}))
app.use(bodyParser.json())
app.use(cors({exposedHeaders: ['Qutke-Auth']}))
app.set('view engine', 'jade')
const debug = process.env.NODE_ENV !== 'rel... |
'use strict';
///////////////////////////////
//Basis of a new ride object //
///////////////////////////////
function RideBoilerplate()
{
this.title = '';
this.author = 'James';
this.gpx = '';
this.thumbnail = 'default.jpg';
this.settings = {render_mode:'',theta:0,yScale:''};
this.private = false;
}
/////////... |
/* eslint-env jest */
"use strict";
const isRunning = require("./is-tournament-running");
it("should return `true` when tournament state is Active", () => {
expect(
isRunning({ state: "active" })
).toBe(true);
});
it("should return `true` when tournament state is Latest game", () => {
expect(
isRunnin... |
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('fav-head', 'Integration | Component | fav head', {
integration: true
});
test('it renders', function (assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any acti... |
// Permission Model
define(function () {
"use strict";
var model = {
initialize: initialize
};
return model;
var dataservice;
function initialize(context) {
dataservice = context;
var store = dataservice.metadataStore;
store.registerEntityTypeCtor("Permission"... |
var searchData=
[
['paraboloid',['Paraboloid',['../classoi_1_1_paraboloid.html#ab9d1cdd857fe0a8d7bc6762c0f274b5e',1,'oi::Paraboloid::Paraboloid(const bool &isNominal, QObject *parent=0)'],['../classoi_1_1_paraboloid.html#ab658f79db9dff9797bd74f37c4d63d1e',1,'oi::Paraboloid::Paraboloid(const bool &isNominal, c... |
function delete_url(id) {
if (confirm('你确定要删除这条记录吗?')) {
document.location = 'index.php?delete_id=' + id;
}
}
function update_url(id) {
if (confirm('你确定要更改这条记录吗?')) {
document.location = 'update?id=' + id;
}
}
|
Ext.define('Siccad.view.estado.Combo', {
extend: 'Ext.form.field.ComboBox',
alias: 'widget.estadoCombo',
itemId: 'estadoCombo',
name : 'estados_id',
fieldLabel: 'UF',
store: 'Estados',
displayField: 'uf',
valueField: 'id',
queryMode: 'local',
typeAhead: true,
forceSelection: ... |
var sqlite = require('sqlite3').verbose();
var db = new sqlite.Database(':memory:');
db.serialize(function() {
db.run('create table lorem (info text)');
var stmt = db.prepare('insert into lorem values (?)');
for (var i = 0; i < 10; i++) {
stmt.run('Ipsum ' + i);
}
stmt.finalize();
db... |
(function ($) {
var $form = $("main form");
$form.on("submit", function (e) {
e.preventDefault();
return false;
});
$form.validate({
errorClass: "input-error",
errorElement: "em",
submitHandler: function (e) {
$.ajax({
url: $form.at... |
(function() {
'use strict';
angular
.module('uniConnectApp')
.factory('AuthServerProvider', AuthServerProvider);
AuthServerProvider.$inject = ['$http', '$localStorage' ];
function AuthServerProvider ($http, $localStorage ) {
var service = {
getToken: getToken,
... |
$(".js-example-placeholder-single").select2({
placeholder: "Select a state",
allowClear: true
});
|
var utils = (function()
{
'use strict';
var model = {};
function isOfType(obj, type)
{
var ofType = '[object ' + type.toLowerCase() + ']',
isType = Object.prototype.toString.call(obj).toLowerCase();
return isType === ofType;
}
model.isArray = function(obj)
{
return isOfType(obj, 'Array');
};
mode... |
import React from 'react';
import Relay from 'react-relay';
import hoc1 from 'hoc1';
const Thing = hoc1('my-param')(class Thing extends React.Component {
render() {
return <div>Thing</div>;
}
});
export default Relay.createContainer(Thing, {});
|
import UserBuilder from '/imports/lib/fixtures/user-builder.js';
import { createUser } from '/test/end-to-end/tests/_support/accounts.js';
import { waitAndSetValue, pressEnter } from '/test/end-to-end/tests/_support/webdriver';
module.exports = function() {
this.Given(/^there is a (.+) (.+) with email (.*)$/, functi... |
import {PropTypes} from 'react';
const PT = PropTypes
export const canvasViewState = PT.shape({
analysisViewEnabled: PT.bool,
scientificViewEnabled: PT.bool,
expandedViewEnabled: PT.bool,
edgeView,
})
export const canvasState = PT.shape({
metricClickMode,
edgeView,
})
export const metricClickMode = PT.on... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
... |
Ext.define('Magice.Cloud.view.server.form.CreateRegion', {
extend: 'Ext.panel.Panel',
xtype: 'creator-region',
title: 'Regions',
items: {
xtype: 'dataview',
bind: {
store: '{creators}'
},
itemSelector: '.item',
listeners: {
scope: 'controller',
selectionchange: 'onCreatorRe... |
var dir_bd570556ed504887f0e6c40953f84693 =
[
[ "c_standard_headers_indexer.c", "db/df5/examples_2_hello_world_2nbproject_2private_2c__standard__headers__indexer_8c.html", null ],
[ "cpp_standard_headers_indexer.cpp", "de/dac/examples_2_hello_world_2nbproject_2private_2cpp__standard__headers__indexer_8cpp.html",... |
'use strict';
const ember = require('../utils/ember');
const utils = require('../utils/utils');
const messages = [
'Ember.testing is not set in module scope',
'Ember.testing should not be assigned to a variable, use in place instead',
'Can not use destructuring to reference Ember.testing',
];
module.exports = ... |
exports.up = function(knex, Promise) {
return knex.schema.createTable('users', function (table) {
table.increments()
table.string('email', 200).unique().notNull()
table.string('first_name', 100)
table.string('last_name', 100)
table.string('password', 100)
table.string('facebook_id', 100)
table.boo... |
import { connect } from 'react-redux';
import { doClearEmailEntry, doUserSignUp } from 'redux/actions/user';
import {
selectEmailNewIsPending,
selectEmailNewErrorMessage,
selectEmailAlreadyExists,
selectUser,
} from 'redux/selectors/user';
import { DAEMON_SETTINGS, SETTINGS } from 'lbry-redux';
import { doSetWa... |
var config = require('app/config/config'),
JiraApi = require('jira').JiraApi,
ProjectConfig = require('app/models/ProjectConfig'),
Storage = require('app/models/Storage'),
projectConfig = new ProjectConfig(),
storage = new Storage();
JiraApi.prototype.getRapidViewIdForProject = function (projectId, callback) {
v... |
'use strict';
angular.module('mcmsApp')
.config(function ($stateProvider) {
$stateProvider
.state('calendar', {
url: '/calendar',
templateUrl: 'app/calendar/calendar.html',
controller: 'CalendarCtrl'
});
});
|
var mongoose = require('mongoose');
var RentSchema = mongoose.Schema({
clientId: {
type: String,
index:true
},
equipmentId: {
type: String,
index:true
},
date: Date,
duration: Number,
confirmed: Boolean
});
var Rent = module.exports = mongoose.model('Rent', RentSchema);
module.exports.createRent ... |
define([
'module',
'../View',
'../Property'
],
function (module, View, Property) {
var Property = View.extend({
moduleId: module.id,
decl: {
fields: [
{
name: "model",
jet: ... |
define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var PrimiHighlightRules = function() {
this.$rules = {
"start" : [
{
... |
const News = require('../models/news.model');
const { verifyToken } = require('./token.controller');
const {
urlFriendlyString
} = require('../utils');
/**
* Load news and append to req.
*/
function loadPost(req, res, next, id) {
News.getSingle(id)
.then((post) => {
req.post = post; // eslint-disable-l... |
/* global wc_checkout_params */
jQuery( function( $ ) {
// wc_checkout_params is required to continue, ensure the object exists
if ( typeof wc_checkout_params === 'undefined' ) {
return false;
}
$.blockUI.defaults.overlayCSS.cursor = 'default';
var wc_checkout_form = {
updateTimer: false,
dirtyInput: fals... |
import React from 'react';
import PropTypes from 'prop-types';
// import { TransitionGroup } from 'react-transition-group';
import './Testimonials.scss';
import LeftArrow from '../Icon/LeftArrow';
import RightArrow from '../Icon/RightArrow';
export default class extends React.Component {
static propTypes = {
ti... |
import EntityList from './EntityList';
export default class Combat
{
/**
* Initializes a new Combat.
*/
constructor()
{
this.entityList = new EntityList();
// Current Round In Combat
this.round = 0;
// The position within the current round
this.currentStep... |
var plug = function (plugin, options, next) {
// Templates
plugin.views({
engines: {
html: 'handlebars'
},
path: './plugin/homepage/templates',
partialsPath: './plugin/homepage/templates',
layout: true
});
// Serve static CSS file
plugin.route({
method: 'GET',
path: '/css/... |
'use strict'
var PurchaseOrder = require('./purchase-order');
var map = require('../map').po;
module.exports = class POTextileJobOrder extends PurchaseOrder {
constructor(source) {
super(source, map.type.POTextileJobOrderExternal);
this.iso = 'FM-600-06-005';
}
} |
/*jshint esnext:true */
const PREFERENCES = 'plugins:capestatus';
function msToTime(s) {
function addZ(n) {
return (n < 10 ? '0' : '') + n;
}
var ms = s % 1000;
s = (s - ms) / 1000;
var secs = s % 60;
s = (s - secs) / 60;
var mins = s % 60;
var hrs = (s - mins) / 60;
return addZ(hrs) + ':' + addZ(... |
'use strict';
var assign = require('lodash/object/assign'),
isFunction = require('lodash/lang/isFunction');
var Helper = require('../../helper');
describe('bpmn-moddle - write', function() {
var moddle = Helper.createModdle();
function write(element, options, callback) {
if (isFunction(options)) {
... |
'use strict';
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var nodemon = require('gulp-nodemon');
var webpack = require('webpack-stream');
var sass = require('gulp-sass');
var exec = require('child_process').exec
gulp.task('sass', function () {
return gulp.src('scss/*.scss')
.... |
'use strict';
angular.module('mentio', [])
.directive('mentio', ['mentioUtil', '$document', '$compile', '$log', '$timeout',
function (mentioUtil, $document, $compile, $log, $timeout) {
return {
restrict: 'A',
scope: {
macros: '=mentioMacros',
... |
if (typeof AFRAME === 'undefined') {
throw new Error('Component attempted to register before AFRAME was available.');
}
// third-party
require('./third-party/aframe-troika-text.js');
// Components
require('./scripts/vars.js');
require('./scripts/utils.js')
require('./components/item.js');
require('./components/be... |
var main_url = "http://localhost/hsm/";
$(document).ready(function(){
$("#generate_bills").submit(function()
{
var society_id = $("#society_id").val();
var month_id = $("#month_id").val();
var year_id = $("#year_id").val();
var member_id = $("#member_id").val();
var formdata = {society... |
module.exports = isUpperCase;
function isUpperCase(string) {
return string === string.toUpperCase();
}
|
module.exports = function(grunt) {
grunt.config('jade', {
options: {
data: {
target: '<%= grunt.task.current.target %>',
},
},
dev: {
expand: true,
cwd: 'src/pages',
src: '*.jade',
dest: 'prod',
ext: '.html',
},
prod: '<%= jade.dev %>',
});
g... |
"use strict";
import React, { Component } from 'react';
import Track from './Track.js';
require('../../css/sequencer.sass')
import Api from "../actions/api.js"
class Sequencer extends Component {
constructor(props) {
super(props);
this.state = {
playing: false,
stepCount: this.props.stepCount,
... |
import React from 'react';
import { connect } from 'react-redux';
import { Field, formValueSelector } from 'redux-form';
import { Row, Col } from 'react-flexbox-grid-aphrodite';
import { css } from 'aphrodite';
import styles from './styles';
import { RadioButton } from 'material-ui/RadioButton';
import ActionFavorite f... |
var mmNavigation = require('./dist/app');
module.exports = mmNavigation; |
var tessel = require('tessel');
var digole12864 = require('../').use(tessel.port['D']);
var async = require('async');
console.log("Sending OLED set up command...");
digole12864.on('ready', function(){
console.log("Begin test...");
digole12864.clear(function(){
di... |
var gulp = require('gulp');
var shell = require('gulp-shell');
var argv = require('yargs').argv;
var less = require('gulp-less');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('compile-styles', function () {
gulp.src('./common/themes/dnn/styles/dnn.styles.less')
.pipe(sourcemaps.init())
.p... |
// ==UserScript==
// @name Ah...
// @description Ah...
// @author Ah...
// @version 4.4.0.0.0
// @namespace http://Ah...
// @grant GM_log
//
// @include https://www.facebook.com/
// ==/UserScript==
(function() {
function parseQuery(qstr) {
var query =... |
'use strict';
jest.autoMockOff();
jest.unmock('../registry');
var Registry = require('../registry');
var test_obj = {'@type': ['test', 'item']};
var specific_obj = {'@type': ['specific', 'item']};
var other_obj = {'@type': ['other']};
var views = [
{for_: 'item'},
{for_: 'specific'},
{name: 'named', for... |
"use strict"
const process = require(`process`)
const fs = require(`fs`)
const createVerge3ChrConverter = require(`../converter/createVerge3ChrConverter`)
const colorDepth = require(`../converter/colorDepth`)
const ripTiles = require(`../ripTiles`)
const {PNG} = require(`pngJS`)
const asset = require(`../asset`)
con... |
function FormValidatorBootstrapVariant() {
FormValidatorBootstrapVariant.prototype.toggleSubmit = function(button, disabled) {
$(button).toggleClass('disabled', disabled);
}
}
|
define({
labels: {
point: 'Ponto',
circle: 'Círculo',
polyline: 'Polilinha',
freehandPolyline: 'Polilinha à mão livre',
polygon: 'Polígono',
freehandPolygon: 'Polígono à mão livre',
stopDrawing: 'Parar de desenhar',
clearDrawing: 'Limpar desenhos',
... |
const view = require('think-view');
const model = require('think-model');
const session = require('think-session');
const cache = require('think-cache');
module.exports = [
view, // make application support view
model(think.app),
cache,
session
];
|
function showEditModal(id) {
if (debug) {
console.log("showEditModal().id: " + id);
}
setTimeout(function() {
$('#editModal').modal('show');
}, 230);
}
|
var exports = module.exports = {};
var pg = require('pg');
var config = {
host: 'ec2-75-101-142-182.compute-1.amazonaws.com',
port: 5432,
user: 'qmtmgvowyjofmc',
password: '4c9449daef728090f72b89f6d1b7f860d2c7ae5d5e0769490d1773537d93264a',
database: 'd5re8bgor54efi',
};
pg.defaults.ssl = true;
var pool = n... |
/**
* Created by lakum on 29/4/16.
*/
var express=require("express");
var mongoose=require("mongoose");
var Schema=mongoose.Schema;
var userSchema = new Schema({
UserId:String,
ProjectName:String,
ProjectId:String,
UserName:String,
ApiToken:String,
StoreHash:String
});
module.exports=mongoose... |
/**
* Copyright (c) 2015-present, Viro, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModu... |
(function($) {
var BackToTop = {
scrollAppears: 300,
scrollSpeed: BackToTopConfig.speed,
persistMethod: BackToTopConfig.persist,
init: function() {
if(this.persistMethod === 'persist') {
this.bindPersistShow();
} else if(this.persistMethod === 'scroll') {
this.bindScrollSh... |
const AlarmManager = require('./AlarmManager.js')
const ChromeCookieManagerFactory = require('./ChromeCookieManager2.js')
const BellTimer = require('../../src/BellTimer.js')
const RequestManager = require('../../src/RequestManager.js')
const hostname = 'https://bell.plus';
(async function () {
const cookman = await... |
var minimumElementSortedRotated = require('./minimum_element_sorted_rotated.js')
.minimumElementSortedRotated;
var ValueError = require('./minimum_element_sorted_rotated.js').ValueError;
var testMinimumElementSortedRotated = {
testGeneralCase: function(test) {
var arr = [6, 1, 2, 3, 4, 5];
test.equal(mini... |
version https://git-lfs.github.com/spec/v1
oid sha256:d1726a15ea18e3ee24e12490415a848e0da33fbdf029a623388f4169209fd57b
size 972
|
import { expect, request, sinon } from '../../test-helper'
import app from '../../../app'
import SynchronizeArticles from '../../../src/use_cases/synchronize-articles'
describe('Integration | Routes | sync route', () => {
afterEach(() => {
SynchronizeArticles.synchronizeArticles.restore()
})
it('should retu... |
module.exports = {
name: 'comments',
extends: 'collect',
init: function () {
this.collection = [];
},
onComment: function (comment) {
this.collection.push(comment);
},
getCollection: function () {
return this.collection;
}
};
|
var searchData=
[
['makeabsolute',['makeAbsolute',['../classwcmf_1_1lib_1_1util_1_1_u_r_i_util.html#ab91c6f392c7a6c9503ee045c534ccbc5',1,'wcmf::lib::util::URIUtil']]],
['makeanchorlink',['makeAnchorLink',['../classwcmf_1_1lib_1_1presentation_1_1link_1_1_internal_link.html#a0323ae545bfb5858178772aa06fce572',1,'wcmf:... |
'use strict';
const crypto = require('crypto');
const MongoClient = require('mongodb').MongoClient;
const IllegalTaskFormat = require('./error').IllegalTaskFormat;
const HashError = require('./error').HashError;
const Statuses = {
ALREADY_APPLIED: 'ALREADY_APPLIED',
SUCCESSFULLY_APPLIED: 'SUCCESSFULLY_APPLIED... |
app.controller('appController', ['$scope', function ($scope) {
"use strict";
/*Counter nb of apps*/
$scope.counter = 0;
/*Scope DB of apps*/
$scope.appDB = [];
$scope.like = function (appIndex) {
$scope.appDB[appIndex].likes = $scope.appDB[appIndex].likes + 1;
};
$scope.generateApp = function () {
consol... |
import { md5 } from 'blueimp-md5';
const countLeadingZeroes = (str) => {
for (let i = 0, count = 0; i < str.length; i++) {
if (str[i] !== '0') {
return count;
}
count++;
}
};
export const solver = (input, zeroes) => {
let guess = 0;
while (countLeadingZeroes(md5(input + guess)) < zeroes) {
... |
/**
* NTwitBot - tweetbuilder.js
* @author Jordan Sne <jordansne@gmail.com>
* @license MIT
*/
const Chance = require('chance');
const chance = new Chance();
const Tweet = require('./tweet.js');
module.exports = {
/**
* Generates a random tweet object.
* @return {Tweet} A random tweet object.
... |
lychee.define('game.Camera').exports(function(lychee, game, global, attachments) {
var Class = function(main) {
this.renderer = main.renderer || null;
this.depth = 0.2;
this.offset = 0;
this.position = { x: 0, y: 0, z: 0 };
// var fov = 100;
// this.__depth = 1 / Math.tan((fov/2) * Math.PI/180);... |
'use strict';
// ------- Imports -------------------------------------------------------------
const test = require('ava');
const chai = require('chai');
const moment = require('moment');
const TwilioOutboundStatusCallbackMessage = require('../../../src/messages/TwilioOutboundStatusCallbackMessage');
const MessageFa... |
angular.module('BarcampApp')
.factory('User', function ($firebase) {
var User = function (user) {
this.ref = new Firebase('https://barcamp.firebaseio.com/Users2014/' + user.id);
this.sync = $firebase(this.ref).$asObject();
this.sessions = user.sessions || null;
this.id = user.id;
this.admin = user.adm... |
/**
* Test case for apemanDoc.
* Runs with mocha.
*/
'use strict'
const apemanDoc = require('../lib/apeman_doc.js')
const assert = require('assert')
let tmplDir = `${__dirname}/../tmp`
describe('apeman-doc', () => {
it('Generate apemanfile doc.', (done) => {
apemanDoc({
out: `${tmplDir}/foo/bar/baz/te... |
'use strict';
var router = require("express").Router(),
serviceSchemas = require("./service.schemas"),
Datastore = require("nedb"),
validator = require("jsonschema").validate,
resjson = require("./resjson");
var servicesDB = new Datastore({ filename: __dirname + "/../db/services" });
router.use(["/service"], funct... |
/*
* macros.js: Test macros for director tests.
*
* (C) 2011, Nodejitsu Inc.
* MIT LICENSE
*
*/
var assert = require('assert'),
request = require('request');
exports.assertGet = function(port, uri, expected) {
var context = {
topic: function () {
request({ uri: 'http://127.0.0.1:' + port + '/' +... |
module.exports = {
rules: {
'at-rule-empty-line-before': [
2,
'always',
{
except: ['blockless-group'],
},
],
'at-rule-no-vendor-prefix': 2,
'block-closing-brace-newline-after': [
2,
'always',
],
'block-closing-brace-newline-before': [
2,
... |
'use strict';
// Configuring the Articles module
angular.module('patients').run(['Menus',
function(Menus) {
// Set top bar menu items
Menus.addMenuItem('topbar', 'Patients', 'patients', 'dropdown', '/patients(/create)?', false, 2);
Menus.addSubMenuItem('topbar', 'patients', 'List Patients', 'patients', '/patien... |
(function () {
'use strict';
angular.module('ruchJow.symfony.security', [])
// This http interceptor listens for authentication failures
.provider('symfonyTokenInterceptor', function () {
var xsrfHeaderName = 'X-XSRF-TOKEN';
var provider = {
setXsrfHeade... |
"use strict";
var React = require('react');
var Feed = require('./components/Feed');
var FetchMore = require('./components/FetchMore');
var FlickrFeedApp = React.createClass({
render: function () {
return (
<div>
<header>Flickr Feeder</header>
<Feed />
<footer><FetchMore /></foot... |
/*
This file is adapted from https://github.com/jimsparkman/RiotControl/blob/master/demo/todostore.js
*/
// TodoStore definition.
// Flux stores house application logic and state that relate to a specific domain.
// In this case, a list of todo items.
export default function TodoStore() {
riot.observable(this); //... |
// No breakline after return
function bad1 () {
return
2
}
function bad2 () {
let i = 1
return
(i = 2)
}
console.log(bad1(), bad2()) // undefined undefined
|
// DO NOT EDIT THIS FILE
// This file is automatically generated when new ApplicationConfigs are serialized
// look in /shmaplib/appdata.py at regenerate_site_apps_js()
var sitedata_apps = [
{
name: "Adobe After Effects",
data: {
"CC": {
"mac": "adobe-after-effects_cc_ma... |
'use strict'
const Schema = use('Schema')
class NewSchema extends Schema {
up () {
this.create('salaries', function (table) {
table.increments('id')
table.string('name')
table.timestamps()
table.timestamp('deleted_at')
})
}
down () {
this.drop('salaries')
}
}
module.exp... |
/* eslint-env browser */
/* eslint strict: ["error", "function"]*/
/* global _, $, oneDHeightmap, makePresenter */
(function() {
'use strict';
var presenter = makePresenter({
canvasSize: 380
});
var length = presenter.length;
var max = presenter.maxHeight;
var display = presenter... |
var crypto = require('crypto');
module.exports = function (password, salt){
var hash = crypto.createHash('sha512');
hash.update(password, 'utf8');
hash.update(salt, 'utf8');
return hash.digest('base64');
}
|
/*
Purpose: This file will bootstrap all necessary angular modules (controller etc.) and return the bootstrapped
angular application
@angular
*/
define(['angular','Logger', './controllers/index','./directives/index','./services/index'], function (ng,Logger) {
'use strict';
Logger.info('Including angular ap... |
var mongo = require('../../lib/mongoose.js'),
schema = mongo.mongoose.Schema;
var userSchema = new schema({
uid: String,
neoid: Number,
city: String,
nickname: String
});
var user = mongo.mongoose.model('userRecos', userSchema);
var userReco = {};
userReco.find = function (a, callback) {
user.find({}... |
const vertex100 = `precision highp float;
precision highp int;
attribute vec3 position;
attribute vec2 uv;
attribute vec3 normal;
uniform mat3 normalMatrix;
uniform mat4 modelMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
varying vec2 vUv;
varying vec3 vNormal;
varying vec3 vMPos;
void main() ... |
import warning from 'warning';
import deepmerge from 'deepmerge'; // < 1kb payload overhead when lodash/merge is > 3kb.
import noopTheme from './noopTheme';
// Support for the jss-expand plugin.
function arrayMerge(destination, source) {
return source;
}
function getStylesCreator(stylesOrCreator) {
const themingE... |
/**
* client-side code for collaborative playlist pages
* @author adrienjoly, whyd
**/
$(function(){
function searchUsers(q, cb) {
submitSearchQuery({ q: q, /*uid: window.user.id,*/ format: "json" }, function(results){
if (typeof results == "string")
results = JSON.parse(results);
cb(((results || {}).... |
/* Copyright 2014 (c) SoFIE Studios. All rights reserved.
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file.
*/
/**
* @fileoverview Unit tests for the EggCarton object.
*/
module("EggCarton Object", {
teardown: function() {
equal(NotificationDefaultCenter... |
function fillcontent () {
var element = document.getElementsByClassName('autofill')[0]
element.innerHTML = 'If you can read this line JavaScript worked.'
}
window.onload = fillcontent
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.