code stringlengths 2 1.05M |
|---|
var Product = require("../models/products");
exports.getProducts = function (req, res) {
Product.find({}, function (err, products) {
res.json(products);
});
};
exports.getProduct = function (req, res) {
Product.find({_id: req.params.productId}, function (err, products) {
res.json(products);
});
};
exports.ad... |
0xdef;
|
Ext.application({
name: 'AppName',
autoCreateViewport: true
});
|
import React, { PropTypes, Component } from 'react'
import Look, { StyleSheet } from 'react-look'
const c = StyleSheet.combineStyles
import { $ } from 'bauhaus-ui-module-utils'
class InputNumber extends Component {
constructor(props) {
super(props)
const {bauhaus, get} = props
this.state = {
value:... |
import React, {Component} from "react";
import {connect} from "react-redux";
import {detectDrop, loadingDrop, finishRead} from "../actions";
import dirReader from "../helpers/dirReader";
import treeify from "../helpers/treeify";
import outputPresets from "../presets/output";
import i18n from "../i18n";
class Header ex... |
/**
* Copyright 2012-2018, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
module.exports = {
mode: {
valType: 'enumerated',
dflt: 'afterall',
role: 'info',
... |
var myApp = angular.module('myApp', []);
myApp.controller('MainCtrl', ['$scope', '$http', function($scope, $http) {
/**
* Do any loading on document ready
*
*/
angular.element(document).ready(function() {
$scope.loadSlides();
});
// Slides
$scope.slides = [];
// New sli... |
describe( 'store section', function() {
beforeEach( module( 'ngBoilerplate.store' ) );
it( 'should have a dummy test', inject( function() {
expect( true ).toBeTruthy();
}));
});
|
import React from 'react'
import PropTypes from 'prop-types'
import CancelIcon from '../../icons/GlyphSmallCancel'
export const ModalActions = ({ justify, className, children, ...props }) => (
<div className={`flex justify-${justify} pa2 ${className}`} style={{ backgroundColor: '#f4f6f8' }} {...props}>
{ childre... |
/*
* egradus-assignatures.js
* ----------------------------------------------------------------------------------------
*
* Funcionalitats de les assignatures, com ara:
* 1) Crear una nova assignatura
* 2) Cercar una assignatura existent
* 3) Consultar la descripció d'una assignatura
* 4) Unir-se com alumne o ... |
'use strict';
angular.module('core').controller('HeaderController', ['$window', '$scope', '$state', 'Authentication', 'Menus', 'LayoutService',
function ($window, $scope, $state, Authentication, Menus, LayoutService) {
// Expose view variables
$scope.$state = $state;
$scope.authentication = Authenticatio... |
/**
* The copyright in this software is being made available under the BSD License,
* included below. This software may be subject to other third party and contributor
* rights, including patent rights, and no such rights are granted under this license.
*
* Copyright (c) 2013, Dash Industry Forum.
* All rights re... |
const mongoose = require('mongoose'),
Schema = mongoose.Schema,
ObjectId = mongoose.Schema.ObjectId
// ================================
// linkStoreModel Schema
// ================================
const ActionsSchema = new Schema({
link_id: {
type: ObjectId,
unique: true,
required: true
},
likes... |
'use strict'
const EventEmitter = require('events')
const lib = require('./lib')
const beginReady = require('./begin-ready')
const executeWithRs = require('./execute-with-rs')
const EXIFTOOL_PATH = 'exiftool'
const events = {
OPEN: 'exiftool_opened',
EXIT: 'exiftool_exit',
}
class ExiftoolProcess extends Ev... |
'use strict';
/**
* Module dependencies.
*/
var should = require('should'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Myfile = mongoose.model('Myfile');
/**
* Globals
*/
var user, myfile;
/**
* Unit tests
*/
describe('Myfile Model Unit Tests:', function() {
beforeEach(function(done) {
... |
const utils = require('../utils.js');
module.exports = function() {
return function(files, metalsmith, done) {
const metadata = metalsmith.metadata();
const normalize = utils.compose(batchReplacePath, replaceType, replaceAction, replaceModule)();
normalize(files, metadata);
done(null);
};
};
funct... |
'use strict';
angular.module('core').factory('Board', ['Config', 'Pawn', 'Knight', 'Bishop', 'Rook', 'Queen', 'King',
function(Config, Pawn, Knight, Bishop, Rook, Queen, King) {
// Board service logic
// ...
var pieceMapper = [Pawn, Knight, Bishop, Rook, Queen, King];
var Board = function(options) {
var s... |
import React, {Component} from 'react';
export default class Footer extends Component {
render() {
return (
<footer className="row">
<div>
<p>
Travel Far™ - Be on your way!
</p>
</div>
<div id="rawr">
<p>
©2017 Legal ... |
import { SET_TEXT } from '../constants/action-types';
export default function setText(text) {
return { type: SET_TEXT, text };
}
|
/*
Given an array of ints, return the number of times that two 6's are next to each other in the array. Also count instances where the second "6" is actually a 7.
array667([6, 6, 2]) → 1
array667([6, 6, 2, 6]) → 1
array667([6, 7, 2, 6]) → 1
*/
const array667 = (nums) => {
// Write code here
};
describe('arra... |
(function(){
'use strict';
var a = angular.module('classPassRatings', []);
a.controller("RatingsController", function(){
this.reviews = reviews;
this.activities = activities;
// this.graph = graph;
});
a.directive("activities", function(){
return {
restrict: 'E',
templateUrl: 'p... |
var express = require('express'),
router = express.Router(),
auth = require("../../helpers/authorization"),
Account = require("../../models/account"),
Address = require("../../models/address"),
Person = require("../../models/person")
/* CREATE New item created. */
router.post('/', auth.needsRole('a... |
Ext.define("Greyface.controller.LoginController", {
extend: "Ext.app.Controller",
refs: [
{ ref: "userName", selector: "gf_login textfield[actionId=usernametext]" },
{ ref: "password", selector: "gf_login textfield[actionId=passwordtext]" },
{ ref: "loginForm", selector: "panel[actionId... |
App.Member = DS.Model.extend({
username : DS.attr(),
nameF : DS.attr(),
nameM : DS.attr(),
nameL : DS.attr(),
dob : DS.attr(),
gender : DS.attr(),
current : DS.attr(),
nameFormatted : function() {
return this.get("nameL") + ", " + this.get("nameF");
}.property("nameF", "nameL"),
display : function(... |
var PhoneNumber = function () {
};
PhoneNumber.prototype.createPhoneNumber = function (phoneList) {
return `(${phoneList[0]}${phoneList[1]}${phoneList[2]}) ${phoneList[3]}${phoneList[4]}${phoneList[5]}-${phoneList[6]}${phoneList[7]}${phoneList[8]}${phoneList[9]}`;
};
module.exports = PhoneNumber;
|
var weak__ptr_8hpp =
[
[ "weak_ptr", "da/d49/classstd_1_1weak__ptr.html", "da/d49/classstd_1_1weak__ptr" ],
[ "operator<", "d7/df2/weak__ptr_8hpp.html#a855871ec4dda7e2341cdb031fc8d22c7", null ],
[ "swap", "d7/df2/weak__ptr_8hpp.html#a277a688b7a5b3aaa027babccb5505795", null ]
]; |
(function () {
'use strict';
angular
.module('core')
.controller('SidebarController', SidebarController);
SidebarController.$inject = ['$scope', '$state', 'Authentication', 'menuService'];
function SidebarController($scope, $state, Authentication, menuService) {
var vm = this;
vm.accountMenu... |
'use strict';
// var should = require('should');
var chai = require('chai');
var should = chai.Should();
var app = require('../../app');
var request = require('supertest');
var User = require('../user/user.model');
var Tour = require('./tour.model');
var tourCreater = new User({
provider: 'local',
name: 'Fake Use... |
Notices = new Mongo.Collection("notices");
State = new Mongo.Collection("state");
if (Meteor.isClient) {
Meteor.subscribe("notices");
// var clock = function () {
// Session.set("currentTime", moment().toISOString());
// };
Meteor.startup(function () {
// setInterval(clock, 1000);
Session.set("c... |
import React, { PropTypes } from 'react';
import moment from 'moment';
import Talk from '../talk/talk';
import styles from './session.module.css';
class Session extends React.Component {
constructor(props) {
super(props);
this.getSessionTitle = this.getSessionTitle.bind(this);
}
getSessio... |
// https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/
// 153. Find Minimum in Rotated Sorted Array
// Medium
//
// Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might become:
//
// [4,5,6,7,0,1,2] if it was rot... |
var logger = require('./logger');
// detects the running environment
// loads before jQuery is available
var Env = function() {
this.is_twitch = false;
this.has_body = false;
this.callbacks = {};
}
Env.prototype.detect = function() {
var loc = document.URL.toLowerCase();
logger.log("Detecting environ... |
'use strict';
(function(module) {
const repos = {};
repos.all = [];
repos.requestRepos = function(callback) {
$.get('github/user/repos')
.then(data => repos.all = data, err => console.error(err))
.then(callback);
};
repos.with = attr => repos.all.filter(repo => repo[attr]);
module.repos = repo... |
var gulp = require('gulp');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var config = require('./gulp.config');
gulp.task('script-full', function () {
return gulp.src(config.scriptSrc)
.pipe(sourcemaps.init())
.pipe(concat('... |
// Generated by CoffeeScript 1.3.3
var tbs;
tbs = [];
Idea.prototype.kindTabs = function() {
var i, ia, _i, _len, _ref, _ref1;
this.kind = TABS;
_ref = this[0];
for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
ia = _ref[i];
ia.kind = TAB;
ia.pa = this;
ia.sd = 0;
ia.ix = i;
}
... |
/* global musje, angular, MIDI */
(function (musje, angular, MIDI) {
'use strict';
var fonts = [
{ type: 'serif', name: 'Georgia, serif' },
{ type: 'serif',
name: '"Palatino Linotype", "Book Antiqua", Palatino, serif' },
{ type: 'serif', name: '"Times New Roman", Times, serif' },
{ type: 'sa... |
import { LocalStorage as NodeStorage } from 'node-localstorage';
import FetchumBase from './base';
import { Storage } from './storage';
const localStorage = new NodeStorage('./fetchum-storage');
export * from './fetchum';
export { setConfig } from './utils';
export const Fetchum = FetchumBase;
export const LocalStora... |
/**
* Created by Administrator on 2015/10/10.
*/
'use strict'
class AbstractPager{
constructor(isLogined){
this.isLogined = isLogined;
}
// 保护性方法
_render(){
throw new Error('子类必须实现');
}
render(){
return `
<!DOCTYPE html>
<meta charset='... |
app.factory('trackerFactory', trackerFactory);
trackerFactory.$inject = [];
function trackerFactory() {
var Tracker = function(series, drawer) {
var self = this,
tracking = series,
composer = drawer,
path = false;
self.draw = function() {
if (path ... |
import container from './containers/OpmlImportDialog';
import * as actions from './actions';
import reducers from './reducers';
export default { container, reducers, actions };
|
/* eslint-disable max-nested-callbacks */
import expect, { spyOn, restoreSpies } from 'expect'
import Loader, { __internals__ } from '../Loader'
describe('loaders/template/v1.0/Loader.js', () => {
afterEach(() => restoreSpies())
describe('{ Loader }', () => {
describe('@load', () => {
it('should call me... |
{
const exports = runtime.requireModule(
runtime.__mockRootPath,
"RegularModule"
);
expect(exports.paths.length).toBeGreaterThan(0);
exports.paths.forEach(path => {
expect(moduleDirectories.some(dir => path.endsWith(dir))).toBe(true);
});
}
|
/*global window, module */
"use strict";
var isBrowser = (typeof window !== 'undefined'),
isNode = (typeof module !== 'undefined' && typeof module.exports !== 'undefined');
/**
* Contacts single paging model
* @class ContactsPagingModel
* @constructor
*/
var ContactsPagingModel = function (data) {
data = data ||... |
'use strict';
var request = require('request');
module.exports = function (grunt) {
// show elapsed time at the end
require('time-grunt')(grunt);
// load all grunt tasks
require('load-grunt-tasks')(grunt);
var reloadPort = 35729, files;
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
... |
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return fu... |
import config from '../config';
import pg from 'pg';
const client = new pg.Client(config.psqlConnectionString);
client.connect(err => {
if( err ) console.log('ERROR', err);
});
module.exports = client.query.bind(client);
|
'use strict';
/*-------------------------------------------- */
/** Requires */
/*-------------------------------------------- */
var $ = require('jquery');
/*-------------------------------------------- */
/** Exports */
/*-------------------------------------------- */
module.exports = PropertyUpdater;
/*-------... |
import { Notification } from 'element-ui';
export default Notification;
|
/*
# -------------------------------------------------- #
#
#
# Game Pencil Engine Game File
# Created automatically via the Game Pencil Engine Editor
# Warning: Manually editing this file may cause unexpected bugs and errors.
# If you have any problems reading this file please repo... |
import Filter from '~/droplab/plugins/filter';
import './filtered_search_dropdown';
class DropdownHint extends gl.FilteredSearchDropdown {
constructor(options = {}) {
const { input, tokenKeys } = options;
super(options);
this.config = {
Filter: {
template: 'hint',
filterFunction: gl... |
version https://git-lfs.github.com/spec/v1
oid sha256:92e6cc7424337ae520b423fc33c3ec139982b1c0e2fe16e45ab81543fd0c35ba
size 18674
|
const mongoose = require('mongoose'),
Schema = mongoose.Schema;
let latSchema = new Schema({
username: String,
lat: {}
});
module.exports = mongoose.model('lat', latSchema);
|
// Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
// For example, given the array [−2,1,−3,4,−1,2,1,−5,4],
// the contiguous subarray [4,−1,2,1] has the largest sum = 6.
// set variable max as the first subset of nums array
// set sum to 0
// loop through nums... |
describe('ContextMenu', function () {
var id = 'testContainer';
beforeEach(function () {
this.$container = $('<div id="' + id + '"></div>').appendTo('body');
});
afterEach(function () {
if (this.$container) {
destroy();
this.$container.remove();
}
});
describe("menu opening", func... |
var puremvc = window.puremvc;
var PrepControllerCommand = require('./PrepControllerCommand');
var PrepModelCommand = require('./PrepModelCommand');
var PrepViewCommand = require('./PrepViewCommand');
class StartupCommand extends puremvc.MacroCommand {
initializeMacroCommand() {
this.addSubCommand(PrepCont... |
/* globals angular */
angular.module('formula').directive('formula', ['$compile', '$timeout', 'formulaI18n', 'formulaClassService',
function($compile, $timeout, i18n, formulaClassService) {
"use strict";
return {
restrict: 'AE',
scope: {
options: '='
},
controller: ['$scope',... |
/**
* @license AngularJS v1.2.16
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {'use strict';
/**
* @description
*
* This object provides a utility for producing rich Error messages within
* Angular. It can be called as follows:
*
* var exampleMinE... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.OnsSwitch = undefined;
var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor;
var _aureliaDependencyInjection = require('aurelia-dependency-injection');
var _aureliaPal = require('aurelia-pal');
var _aureliaTemplat... |
var searchData=
[
['weights',['weights',['../struct_d_r_d_s_p_1_1_secants.html#a534beb61e939e136580727be9296c8a8',1,'DRDSP::Secants']]],
['weighttype',['weightType',['../namespace_d_r_d_s_p.html#a6f6649cfc0354447bca3de04bc85e19d',1,'DRDSP']]],
['writebinary',['WriteBinary',['../struct_d_r_d_s_p_1_1_data_set.html#... |
const parallax = function (element, options = {}) {
const settings = Object.assign({ speed: 0.3 }, options);
document.addEventListener('scroll', () => {
scrollCheck(element, settings);
});
scrollCheck(element, settings);
return this;
};
const scrollCheck = function (element, settings) {
const windowHe... |
// Setup Express
var http = require('http');
var express = require("express");
var app = express();
var path = require('path');
const devIp = require('dev-ip')
let port
var uploadsDir = __dirname + '/public/uploads';
var ufn = require('unique-file-name')({
// Slugified file name, followed optionally by an integer (... |
module.exports = {
verbose: true,
testPathIgnorePatterns: ["/node_modules/", "/lib/"]
};
|
const uuid = require('uuid');
const isObject = require('lodash.isobject');
const isArray = require('lodash.isarray');
const keys = require('lodash.keys');
const $ = require('jquery');
const mustache = require('mustache');
const View = require('./View');
const DOMViewControllerMixin = require('./mixins/DOMViewControlle... |
var MongoClient = require('mongodb').MongoClient;
var mongourl = 'mongodb://192.168.17.52:27050/db_bot';
function saveChat(gid,uid,name,content){
var now = new Date();
var data = {'_id':now,gid:gid,uid:uid,n:name,d:content,ts:now.getTime()};
MongoClient.connect(mongourl, function(err, db) {
var cl_chat = db... |
var group__analogy__irq =
[
[ "a4l_free_irq", "group__analogy__irq.html#ga930e78e983fc13fc10fd1cb30873f9c8", null ],
[ "a4l_get_irq", "group__analogy__irq.html#gab2259e070a640a0dc08649db96d589aa", null ],
[ "a4l_request_irq", "group__analogy__irq.html#ga5fe0315e26b4aaa493f0feb1212ba85b", null ]
]; |
KISSY.use("htmlparser", function(S, HTMLParser) {
var Lexer = HTMLParser.Lexer;
describe("htmlparser_lexer", function() {
it("works", function() {
var html = "<div id='z'><<a> ";
var lexer = new Lexer(html),node;
var nodes = [];
while (node = lexer.next... |
/**
* @license jQuery UI Spinner 1.20
*
* Copyright (c) 2009-2010 Brant Burnett
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Modified for use in MWS Admin while waiting for the final version of jquery-ui 1.9's Spinner
* This file is part of MWS Admin, an Admin template build for sale at T... |
// Require User's model defined in 'app/models'
var config = require('./../../config/config');
var passport = require('../../config/passport');
var jwt = require('jsonwebtoken');
var User = require('mongoose').model('User');
// Function for user create
exports.create = function(request, response, next) {
var user... |
angular.module('myApp').directive('verticalColorLegend', function() {
var width = 300;
var height = 350;
return {
restrict: 'E',
scope: {},
link: function(scope, element, attrs) {
var canvas = d3.select(element[0])
.append("svg")
.attr("wi... |
'use strict';
/**
* @ngdoc function
* @name eventifyApp.controller:TaskCtrl
* @description
* # TaskCtrl
* Controller of the eventifyApp
*/
angular.module('eventifyApp')
.controller('TaskCtrl', function ($scope, TaskService, AuthService) {
$scope.newTask = '';
$scope.taskStatus = 'text';
$scope.o... |
/* eslint react/no-multi-comp: 0, react/prop-types: 0 */
import React, { useState } from 'react';
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input, Label, Form, FormGroup } from 'reactstrap';
const ModalExample = (props) => {
const {
buttonLabel,
className
} = props;
const [modal, setM... |
/**
* Home controller
*/
'use strict';
define(['app', 'jquery', 'bootstrap'], function (app) {
app.controller('routines', function ($scope, $http) {
$scope.list = function(){
$http({
method: "GET",
url: "data-routines",
}).then(function(re... |
var ReportGraphSingleStudent = React.createClass({displayName: "ReportGraphSingleStudent",
selectStudent: function( msg, data ){
console.log( msg, data );
setState({currentStudent: data}).bind(this);
},
componentWillMount: function() {
console.log("ReportGraphSingleStudent componentWillMount");
va... |
// JavaScript Document
$(document).ready(function(){
/*首页服务*/
var $liCur = $(".inav .nav li.cur"),
curP = $liCur.position().left,
curW = $liCur.outerWidth(true),
$slider = $(".curBg"),
$navBox = $(".inav .nav");
$targetEle = $(".inav .nav li a"),
$slider.animate({
"left... |
'use strict';
const assert = require('assert');
const egg = require('..');
describe('test/index.test.js', () => {
it('should expose properties', () => {
assert.deepEqual(Object.keys(egg).sort(), [
'Agent',
'AgentWorkerLoader',
'AppWorkerLoader',
'Application',
'BaseContextClass',
... |
'use strict';
/**
* index module
* @module index
* @see module:index
*/
const _ = require('lodash');
// charts
const Bar = require('./chart/bar');
const Gauge = require('./chart/gauge');
const Indicator = require('./chart/indicator');
const Line = require('./chart/line');
const Line2 = require('./chart/line2');
con... |
'use strict';
System.register(['aurelia-templating', 'aurelia-dependency-injection', 'aurelia-framework', '../common/attributeManager', '../common/attributes', '../control/control'], function (_export, _context) {
"use strict";
var bindable, customElement, noView, inject, computedFrom, AttributeManager, getBo... |
/**
* Please see Karma config file reference for better understanding:
* http://karma-runner.github.io/latest/config/configuration-file.html
*/
const angular = './node_modules/angular/angular.js';
const angular_mocks = './node_modules/angular-mocks/angular-mocks.js';
module.exports = function(config) {
config.... |
/* /javascripts/Twitter/TwitterFeedDirective.js */
angular
.module('NBA5')
.directive('twitterFeed', function() {
return {
restrict: 'AE',
templateUrl: '/templates/partials/TwitterFeedView.html'
};
}); |
// First, checks if it isn't implemented yet.
if (!String.prototype.format) {
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] != 'undefined'
? args[number]
: match
;
});
... |
document.getElementById("body").innerHTML += "Arquivo 4 <br />"; |
var SceneRenderPass = require("./scene-pass.js");
var VertexAttributePass = function (renderInterface, output, opt) {
SceneRenderPass.call(this, renderInterface, output, opt);
this._program = this.renderInterface.context.programFactory.getProgramByName(opt.programName);
};
XML3D.createClass(VertexAttributePas... |
export class ObraController {
constructor ($log, $stateParams, obraService) {
'ngInject';
this.obraService = obraService;
this.buscaObraPorId($stateParams.id);
}
votar(obraUtil = true) {
this.obraService.votar(this.obra.id, obraUtil)
.success( result => {
this.votoComSucesso =... |
var heading = require('./_heading');
module.exports = function (response, window) {
return heading('h4', window);
};
|
'use strict';
(function () {
var crypto = require('crypto');
var _ = require('underscore');
var mongoose = require('mongoose');
var semver = require('semver')
var ObjectId = mongoose.Types.ObjectId;
var stableStringify = require('json-stable-stringify');
var async = require('async');
var dotty = requir... |
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
jest
.mock('istanbul-lib-source-maps')
.mock('istanbul-lib-report', () => ({
...jest.requireActual('i... |
var seq = require('seq');
function baseLine(db, callback) {
console.log('running version 1 migration');
seq()
.par(function () {
db.query('CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, name text, createDate DATETIME DEFAULT current_timestamp)', [], this);
})
.pa... |
define([
'underscore',
'text!templates/grid-docs.html',
'text!pages/grid-options-columns-sortAsc.html',
'dobygrid'
], function (_, template, page, DobyGrid) {
"use strict";
return Backbone.DobyView.extend({
initialize: function () {
var html = _.template(template)({page: page});
this.$el.append(html);
... |
/**
* Created by msyk on 14/12/29.
*
*/
INTERMediatorOnPage.doBeforeConstruct = function () {
"use strict";
INTERMediator.titleAsLinkInfo = false;
var wrapNode, node, bodyNode, i, colnode, firstLevelChildren;
var language = "en";
var urlComp = window.location.href.split("/");
for (i = urlCo... |
'use strict';
/*global cinephile, Backbone*/
cinephile.Routers.CinephileRouter = Backbone.Router.extend({
routes:
{
'' : 'home',
'favourites' : 'favourites',
'details/:id' : 'details'
},
initialize: function()
{
new cinephile.Views.SearchView();
... |
'use strict';
// Nodejs libs.
var fs = require('fs');
var path = require('path');
// External libs.
var rimraf = require('rimraf').sync;
var mkdirp = require('mkdirp').sync;
var linken = require('../lib/linken').linken;
var base = 'test/fixtures';
var dirs = [
'foo',
'foo-new',
'foo-old',
'bar',
'bar-old'... |
// Generated by CoffeeScript 1.7.1
(function() {
var Error, Success, getById, priorityModel, taskModel, _;
taskModel = require('../model/task');
priorityModel = require('../model/priority');
_ = require('underscore');
Success = {
code: 200,
message: 'Success'
};
Error = {
code: 500,
m... |
import CommunitiesIndexIndexRoute from "../index/route";
export default CommunitiesIndexIndexRoute.extend({
featured: false
});
|
import THREE from 'three';
class ResourceContainer extends THREE.Object3D {
constructor() {
super();
this.visible = false;
this.resourceMap = {};
this.resourceIds = [];
}
}
module.exports = ResourceContainer;
|
export const mutationTypes = (m, area, todoTypes) => {
let types = {};
todoTypes.forEach(item => (types[`${item}`] = `${m}_${area}_${item}`));
return types;
};
|
import Ember from 'ember';
import ImageLoaderMixin from 'herd-ember/mixins/image/image-loader-mixin';
import HasLoadActions from 'herd-ember/mixins/has-load-actions';
const {
set,
on,
Component
} = Ember;
/**
`img-component` renders a stateful `<img>` element whose loading and
error states can be observed, ... |
'use strict';
angular
.module('EMSSQLDBMApp.controllers')
.controller('MainCtrl', [ '$scope', '$timeout', '$modal', 'Authentication', 'Backend', 'Config', 'Utils', function($scope, $timeout, $modal, Authentication, Backend, Config, Utils) {
$scope.authenticated = Authentication.isAuthenticated();
$scope.user = {
... |
var subtract = function (x,y) {
return x - y;
}; |
/*************************************************************************************************************************************************
/ Make a request to the AASG Geothermal Data Catalog with the inputed search parameters
/ Format the results
/**************************************************************... |
'use strict';
const debug = require('debug')('brunch:write');
const sysPath = require('universal-path');
const logger = require('loggy');
const deppack = require('deppack'); // getAllDependents
const {formatError} = require('../utils/helpers');
const generate = require('./generate');
const BrunchError = require('../ut... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.