code stringlengths 2 1.05M |
|---|
import createGetFormValues from '../getFormValues';
import plain from '../../structure/plain';
import plainExpectations from '../../structure/plain/expectations';
import immutable from '../../structure/immutable';
import immutableExpectations from '../../structure/immutable/expectations';
import addExpectations from '.... |
import context from 'context-utils';
export default function getContextOptions(viewName) {
if (context && context.uikit && context.uikit[viewName])
return context.uikit[viewName];
return {};
}
|
module.exports = require('mori');
|
'use strict';
/**
* Module dependencies
*/
var lotesPolicy = require('../policies/lotes.server.policy'),
lotes = require('../controllers/lotes.server.controller');
module.exports = function(app) {
// Lotes Routes
app.route('/api/lotes')
.get(lotes.list)
.post(lotes.create);
app.route('/api/lotes/:l... |
// Copyright (c) 2014 The Chromebleed Contributors. All rights reserved.
/*
Grays out or [whatever the opposite of graying out is called] the option
field.
*/
function ghost(isDeactivated) {
options.style.color = isDeactivated ? 'graytext' : 'black';
// The label color.
}
window.addEventListener('load', fu... |
/* eslint-env mocha */
'use strict'
const hat = require('hat')
const { getDescribe, getIt, expect } = require('../utils/mocha')
/** @typedef { import("ipfsd-ctl/src/factory") } Factory */
/**
* @param {Factory} common
* @param {Object} options
*/
module.exports = (common, options) => {
const describe = getDescri... |
/**
* Created by mark on 12/26/13.
*/
define([
'jquery',
'backbone',
'underscore',
'views/gauges/TemperatureFGaugeView',
'models/arduino-home/gauges/DhtGaugeIndoorModel'
],
function(
$,
Backbone,
_,
TemperatureFGaugeView,
DhtGaugeIndoorModel
) {
... |
// @flow
const { createReporter } = require(`yurnalist`)
const { get } = require(`lodash`)
const path = require(`path`)
const ProgressBar = require(`progress`)
const chalk = require(`chalk`)
const calcElapsedTime = require(`../../../util/calc-elapsed-time`)
const VERBOSE = process.env.gatsby_log_level === `verbose`
c... |
/**
Copyright (c) 2007 Bill Orcutt (http://lilyapp.org, http://publicbeta.cx)
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,... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path d="M17 11h2v2h-2v2h2v2h-2v2h4V5h-9v1.4l5 3.57V11zm0-4h2v2h-2V7z" opacity=".3" /><path d="M10 3v1.97l.96.69L12 6.4V5h9v14h-4v2h6V3z" /><path d="M3 12v7h2v-5h6v5h2v-7L8 8.5z" opacity="... |
/**
* Economy
* Gold Server - http://gold.psim.us/
*
* Deals with economy commands, mostly.
* Functions for a lot of this can be found in: ./chat-plugins/goldusers.js
*
* @license MIT license
*/
'use strict';
const fs = require('fs');
let prices;
exports.commands = {
shop: function (target, room, user) {
... |
'use strict';
import detailModule from './detail/detail';
export default {
init(){
var that = this;
$(document).on('pageBeforeInit', (e) => {
that.pageBeforeInit(e.detail.page);
});
},
pageBeforeInit(page){
switch (page.name) {
case 'detail':
... |
#!/usr/bin/env node
require("./proof")(1, function (parse, equal) {
try {
parse("b8z<0x0A,a>")
} catch (e) {
equal(e.message, "invalid terminator at character 10", "parse bad terminator");
}
});
|
/*
THIS IS JUST A SCRATCH FILE FOR TESTING AND DEBUGGING.
Working with JS in PG is still a little raw, so easier to play using node and move across.
*/
// var json = '{"uuid":"ba596c94-9e50-11e1-a50e-70cd60fffe0e","integer":10,"string":"Blick","date":"2012-05-11T15:42:15+10:00","boolean":true,"numeric":99.9,"o... |
/*
Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
(c) 2010-2013, Vladimir Agafonkin
(c) 2010-2011, CloudMade
*/
! function(t, e, i) {
var n = t.L,
o = {};
o.version = "0.7.3", "object" == typeof module && "object" == typeof module.exports ? module.exports = ... |
//Single vector tile, received from GeoMixer server
// dataProvider: has single method "load": function(x, y, z, v, s, d, callback), which calls "callback" with the following parameters:
// - {Object[]} data - information about vector objects in tile
// - {Number[4]} [bbox] - optional bbox of objects in tile... |
"use strict";
const OPCUAClient = require("..").OPCUAClient;
const ClientSecureChannelLayer = require("..").ClientSecureChannelLayer;
// eslint-disable-next-line import/order
const describe = require("node-opcua-leak-detector").describeWithLeakDetector;
describe("OPCUA Client", function () {
it("it should create a... |
(function (gulp, gulpLoadPlugins, pkg) {
'use strict';
//|**
//|
//| Gulpfile
//|
//| This file is the streaming build system
//|
//| .-------------------------------------------------------------------.
//| | NAMING CONVENTIONS: |
//| |---------------------------... |
/**
* @author: Hasin Hayder [hasin_at_leevio_dot_com | http://hasin.me]
* @license: MIT
*/
var currentTab=0, oldTab=1, tabRemoved=false;
chrome.tabs.onActivated.addListener(function(activeInfo) {
if(!tabRemoved){
//plain switch
if(oldTab!=activeInfo.tabId){
oldTab = currentTab;
currentTab = activeInfo.tabI... |
var MongoClient = require('mongodb').MongoClient;
var Code = require('code');
var Lab = require('lab');
var lab = exports.lab = Lab.script();
var Hapi = require('hapi');
var Joi = require('joi');
var async = require('async');
var describe = lab.describe;
var it = lab.it;
var before = lab.before;
var after = lab.after... |
// Regular expression that matches all symbols in the Halfwidth and Fullwidth Forms block as per Unicode v3.2.0:
/[\uFF00-\uFFEF]/; |
RocketChat.models.Users.roleBaseQuery = function(userId) {
return { _id: userId };
};
RocketChat.models.Users.findUsersInRoles = function(roles, scope, options) {
roles = [].concat(roles);
const query = {
roles: { $in: roles },
};
return this.find(query, options);
};
|
/*
---
name: Core
description: The heart of MooTools.
license: MIT-style license.
copyright: Copyright (c) 2006-2010 [Valerio Proietti](http://mad4milk.net/).
authors: The MooTools production team (http://mootools.net/developers/)
inspiration:
- Class implementation inspired by [Base.js](http://dean.edwards.nam... |
import gulp from 'gulp';
import runSequence from 'run-sequence';
gulp.task('dev', ['clean'], function(cb) {
global.isProd = false;
runSequence(['styles', 'images', 'fonts', 'views','json','externalScripts'], 'browserify', 'watch', cb);
});
|
'use strict';
// Declare app level module which depends on views, and components
var appModule = angular.module('myApp', ['ui.router','myApp.homepage']);
appModule.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/homepage');
});
|
const express = require('express')
const session = require('express-session')
const MongoStore = require('connect-mongo')(session)
const mainRouter = express.Router()
const passport = require('../utils/passport')
const mongoose = require('../db/index')
const userController = require('../controllers/userController')
con... |
var gulp = require( 'gulp' );
var rename = require( 'gulp-rename' );
var browserify = require( 'browserify' );
var browserifyInc = require( 'browserify-incremental' );
var reactify = require( 'reactify' );
var xtend = require( 'xtend' );
var source = require( 'vinyl-source-stream' );
var server = require( 'gulp-express... |
/**
* Gulp Task to generate CSS from SCSS
* Dependencies:
* - browser-sync
* - gulp-sass
* - gulp-sourcemaps
* - gulp-autoprefixer
*/
var gulp = require('gulp');
var browsersync = require('browser-sync').get('Dev Server');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');... |
import PropTypes from 'prop-types';
import React from 'react';
import Input from 'mcs-lite-ui/lib/Input';
import Button from 'mcs-lite-ui/lib/Button';
import MobileFixedFooter from 'mcs-lite-ui/lib/MobileFixedFooter';
import MobileHeader from 'mcs-lite-ui/lib/MobileHeader';
import validators from 'mcs-lite-ui/lib/utils... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.0-rc.5-master-3a0f323
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.navBar
*/
angular.module('material.components.navBar', ['material.core'])
.controller('... |
jQuery.noConflict();
jQuery(document).ready(function(){
//search box of header
jQuery('#keyword').bind('focusin focusout', function(e){
var t = jQuery(this);
if(e.type == 'focusin' && t.val() == 'Search here') {
t.val('');
} else if(e.type == 'focusout' && t.val() == '') {
t.val('Search here');
}
}... |
define(function () {
function RangeValidator(fieldName) {
this.validate = function (value) {
var valid = $.isNumeric(value.min) &&
$.isNumeric(value.max) &&
value.min <= value.max;
if (!valid) {
return fieldName +
"... |
//Copyright ©2013-2014 Memba® Sarl. All rights reserved.
/*jslint browser:true*/
/*jshint browser:true*/
; (function ($, undefined) {
"use strict";
var fn = Function,
global = fn('return this')(),
kendo = global.kendo,
api = global.api = global.api || {},
MODULE = 'api.js: '... |
import React from 'react'
class ConnectionSelector extends React.Component {
constructor(props) {
super(props)
this.state = {
room: this.props.room || 'smoky', // @todo un-hardcode
username: ''
}
this.onJoinClicked = this.onJoinClicked.bind(this)
this.setUsername = this.setUsername.bi... |
const Foo = a;
export { Foo as Bar };
|
import _BidStatus from "./BidStatus"
import PropTypes from "prop-types"
import block from "bem-cn-lite"
import classNames from "classnames"
import titleAndYear from "desktop/apps/auction/utils/titleAndYear"
import { connect } from "react-redux"
import { get } from "lodash"
// FIXME: Rewire
let BidStatus = _BidStatus
... |
function solve(params) {
var nk = params[0].split(' ').map(Number),
s = params[1].split(' ').map(Number),
p = [],
answer,
result;
Array.prototype.copy = function () {
var copiedArray = [];
for(var i = 0; i < this.length; i++) {
copiedArray.push(this[... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... |
import React, { Component } from 'react';
import AppHeader from '../../components/AppHeader';
import Sidebar from '../../components/Sidebar';
import ApplicationsList from '../../components/ApplicationsList';
import './styles.css';
class Home extends Component {
render() {
return (
<div className="home">
... |
import React, { Component } from 'react';
import TodoItem from './TodoItem'
export default class TodoList extends Component {
constructor(props){
super(props)
}
render() {
var handler=this.props.changeHandler;
var todoItems = this.props.data.map(function(item) {
return (
<div>
<TodoItem text={it... |
var app = app || {};
app.FoodDetailsView = Backbone.View.extend({// show food details, such as calories and food type, allow user to select how many servings they've had
el: "#food-details",
tagName: "div",
detailedTemplate: template("detailed-template"), // grab detailed item view template
initialize: functio... |
datab = [{},{"SOP Class Name":{"colspan":"1","rowspan":"1","text":"Modality Worklist Information Model - FIND"},"SOP Class UID":{"colspan":"1","rowspan":"1","text":"1.2.840.10008.5.1.4.31"}}]; |
/**
* Location is a Backbone model representing a place in the world
*
*/
define([
'underscore',
'backbone'
], function (_, Backbone) {
var CodeDefinition = Backbone.Model.extend({
});
return CodeDefinition;
});
|
"use strict";
// elephant-harness
// Node.js - Electron - NW.js controller for PHP scripts
// elephant-harness is licensed under the terms of the MIT license.
// Copyright (c) 2016 - 2018 Dimitar D. Mitov
// THE SOFTWARE IS PROVIDED "AS IS",
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LI... |
var SECRETHASH = "" // Generate using gen.html
var API_KEY = "" // Get by registering with parse
var JAVASCRIPT_KEY = "" // Get by registering with parse |
/**
* Created with WebStorm.
* Date: 2/3/2014
* Time: 12:24 PM
* @author Adam C. Nowak
* @description
*/
/*jslint browser: true */
/*jslint devel: true */
/*jslint nomen: true */
/*global $, jQuery, _, ko, Mustache */
/*global ldrly, ui */
"use strict";
ldrly.integration.rest.leaderboard = {};
ldrly.integration... |
var striptags = require('striptags'),
mongoosastic = require('mongoosastic'),
mongoose = require('mongoose'),
Schema = mongoose.Schema,
_ = require('lodash'),
UserModel = require('../user/model'),
TagModel = require('../tag/model');
var BookmarkSchema = new Schema({
name: {
type: String,
... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'basicstyles', 'lt', {
bold: 'Pusjuodis',
italic: 'Kursyvas',
strike: 'Perbrauktas',
subscript: 'Apatinis indeksas',
... |
(function (){
'use strict';
angular.module('eliteApp').directive('markdown', [markdown]);
function markdown(Showdown) {
var converter = new showdown.Converter();
var directive = {
link: link,
restrict: 'A'
};
return directive;
function link(scope, element, attrs){
attrs.$observe('ma... |
foo(5, 6) > 7 |
(function () {
'use strict';
angular
.module('sample-with-tests', ['ngRoute'])
.config(['$routeProvider', '$locationProvider',
function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
controller: 'SampleCo... |
var gulp = require('gulp'),
browserSync = require('browser-sync'),
config = require('../config'),
chalk = require('chalk'),
PushBullet = require('pushbullet');
var connection = {};
/**
* Run the build task and start a server with BrowserSync
*/
gulp.task('browsersync', function() {
// Serve file... |
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distri... |
/* */
var _curry2 = require('./internal/_curry2');
var _dispatchable = require('./internal/_dispatchable');
var _xany = require('./internal/_xany');
module.exports = _curry2(_dispatchable('any', _xany, function any(fn, list) {
var idx = 0;
while (idx < list.length) {
if (fn(list[idx])) {
return true;
... |
module.exports = function(config){
config.set({
basePath : '../',
files : [
'app/lib/angular/angular.js',
'http://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.min.js',
'test/lib/angular/angular-mocks.js',
'app/js/*.js',
'test/unit/*.js'
],
exclude : [
'... |
import React from 'react';
class Counter extends React.Component {
render() {
const {count, decrease, increase} = this.props;
return (
<div className="container">
<h2>This is counter</h2>
<p>Counter: <span className="count">{count}</span></p>
<button className="button-decrease... |
'use strict';
var IoTServer = require("../iot");
var inquirer = require("inquirer");
var chalk = require('chalk');
inquirer.prompt([{
type: "input",
name: "iotBaseURL",
message: "Enter the URL to the IoT Server",
default: "http://iotserver:7101"
}], function(answers) {
var iot = new IoTServer(ans... |
var app = angular.module("styleguide.controllers", [
"main-controller",
"section-controller",
"stack-controller",
"detail-controller",
"add-controller",
"edit-controller"
]); |
'use strict';
/**
* Module dependencies
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Student Schema
*/
var StudentSchema = new Schema({
created: {
type: Date,
default: Date.now
},
title: {
type: String,
default: '',
trim: true,
required: 'Title cannot be b... |
module.exports = {
'secret': 'Long, random string of characters',
'mongouri': 'mongodb://127.0.0.1:27017/UselessJS-tests',
'tokensExpiry': 1440 // in seconds
};
|
'use strict';
var gulp = require('gulp');
var argv = require('yargs').argv;
var rename = require('gulp-rename');
var replace = require('gulp-replace');
var camel = require('to-camel-case');
var _gulp;
var api = {
config: config,
task: task
};
var generators = [['list', '']];
var templatesPath = './';
var gulpTaskCr... |
// Based on https://github.com/mattdesl/glsl-fxaa
import fxaa from './modules/fxaa/fxaa.glsl.js';
export default /* glsl */`
precision highp float;
uniform sampler2D tMap;
uniform vec2 uResolution;
in vec2 v_rgbNW;
in vec2 v_rgbNE;
in vec2 v_rgbSW;
in vec2 v_rgbSE;
in vec2 v_rgbM;
in vec2 vUv;
out vec4 FragColor;... |
'use strict';
const addressParser = require('./utils').addressParser;
const addressFormatter = require('./utils').addressFormatter;
const format = require('string-format');
const escapeStringRegexp = require('escape-string-regexp');
function isValidPassthroughType(passthrough) {
return typeof passthrough === 'funct... |
App.ApplicationController = Ember.Controller.extend({
currentUser: {},
isLoggedIn: false,
schools: [],
init: function() {
this._super();
// first check for the logged in user
var hasCurrrentUser = (Parse.User.current() != null);
this.set('isLoggedIn', hasCurrrentUser);
if(hasCurrrentUser) {
thi... |
AtajoUiModule
.controller('$atajoUiHeaderBar', [
'$scope',
'$element',
'$attrs',
'$q',
'$atajoUiConfig',
'$atajoUiHistory',
function($scope, $element, $attrs, $q, $atajoUiConfig, $atajoUiHistory) {
var TITLE = 'title';
var BACK_TEXT = 'back-text';
var BACK_BUTTON = 'back-button';
var DEFAULT_TITLE ... |
version https://git-lfs.github.com/spec/v1
oid sha256:53b740ed042dc9e47986e61d1f960bd550aaf36b26a734665b86fa6d528124ba
size 2214
|
exports.seed = function(knex, Promise) {
// Deletes ALL existing entries
return knex('kudo').del()
.then(function () {
// Inserts seed entries
return knex('kudo').insert([
{
body: "Hey thanks for help on the ERD's",
to_user_id: 2,
from_user_id: 1,
votes: 5,
... |
/* globals module, __dirname */
module.exports = {
context: __dirname + "/src",
entry: {
javascript: "./app.js",
},
output: {
filename: "app.js",
path: __dirname + "/dist",
publicPath: "http://localhost:9090/"
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node... |
import {T} from './T'
import {filter} from './filter'
import {filter as filterRamda} from 'ramda'
const sampleObject = {
a: 1,
b: 2,
c: 3,
d: 4,
}
test('happy', () => {
const isEven = n => n % 2 === 0
expect(filter(isEven, [1, 2, 3, 4])).toEqual([2, 4])
expect(
filter(isEven, {
a: 1,
b:... |
restularIndex.controller('TableCtrl', function($scope, $filter, $compile, $interpolate){
$scope.interpolate = function(value) {
return $interpolate(value)($scope)
}
// route template
$scope.routes = singularRoutes
//resources
$scope.resource = "articles"
$scope.nestedResource = ""
// updates var... |
export update from './update';
export changePassword from './changePassword';
export changeBankAccount from './changeBankAccount';
export sendConfirmationEmail from './sendConfirmationEmail';
export confirmEmail from './confirmEmail';
export attachInfo from './attachInfo'; |
'use strict';
// Author: ThemeREX.com
// forms-widgets.html scripts
//
(function($) {
$(document).ready(function() {
"use strict";
// Init Theme Core
Core.init();
// Init Demo JS
Demo.init();
// Time picker
$('.inline-tp').timepicke... |
define([], function () {
return angular.module('test', ['ionic', 'starter.services.common', 'starter.resources']);
}); |
// ==UserScript==
// @name Duolingo Strength Overview
// @description Allows to overview strength of all skills and lessons of Duolingo in compact way.
// @namespace https://github.com/tstep
// @match *://www.duolingo.com/*
// @author Tatiana Stepanova
// @version 0.1
// ==/UserScript==
... |
import React from 'react';
import KeyboardAwareScrollView from '@ui/KeyboardAwareScrollView';
import { Switch, Route, withRouter } from '@ui/NativeWebRouter';
import Header from '@ui/Header';
import BackgroundView from '@ui/BackgroundView';
import Progress from '@ui/Progress';
import ModalView from '@ui/ModalView';
im... |
const CompositeXform = require('../../composite-xform');
const CfRuleExtXform = require('./cf-rule-ext-xform');
const ConditionalFormattingExtXform = require('./conditional-formatting-ext-xform');
class ConditionalFormattingsExtXform extends CompositeXform {
constructor() {
super();
this.map = {
'x14... |
'use strict';
var assert = require('assert');
var electronWatch = require('./');
it('should ', function () {
assert.strictEqual(electronWatch('unicorns'), 'unicorns & rainbows');
});
|
import React from 'react';
import Info from "./cv/info"
import WorkExperience from "./cv/workexperience"
import AwardsSkills from "./cv/awardskills"
import data from "../data/seed"
module.exports = React.createClass({
// RENDER
render: function() {
return (
<div className="cv">
... |
version https://git-lfs.github.com/spec/v1
oid sha256:2e9db6469ceaf89fd8457e4a6393ee53e55a3201402d0af5f1f3f6aad56e699f
size 16491
|
'use strict';
const http = require('http');
const selenium = require('selenium-standalone');
const nodeStatic = require('node-static');
let grid, staticServer;
module.exports = {
startStaticServer,
stopStaticServer,
startSelenium,
stopSelenium
};
function startStaticServer() {
return new Promise((resolve... |
/**
* Created by dx.yang on 15/4/23.
*/
angular.module('kai')
.service('ipHandlerService', [
function() {
var self = this;
//IP转成无符号数值
self.IP2Num = function(ip) {
ip = ip.split('.');
var num = ip[0] * 256 * 256 * 256 + ip[1] * 256 * 256... |
var onClearMarkdown = require('../markdown/js/properties/onClear').body;
var onClearProp = {
nameAttr: "onClear",
renderString: onClearMarkdown
};
module.exports = onClearProp;
|
if (process.env.NODE_ENV === 'test') {
module.exports = require('./jest.js')
} else {
module.exports = require('./storybook.js')
}
|
MagentoBlock = Class.create();
MagentoBlock.prototype = {
storageKeys: {
prefix: 'm2e_mb_'
},
// ---------------------------------------
initialize: function() {},
// ---------------------------------------
getHashedStorage: function(id)
{
var hashedStorag... |
/** @module reiter/flattenDeep */
import flattenDepth from "./flattenDepth.js";
/**
* Recursively flattens `iterable`.
*
* @since 0.0.1
* @generator
* @function flattenDeep
* @param {ForOfIterable} iterable The iterable.
* @yields {*} The next element when traversing a fully flattened `iterable`.
* @see [flat... |
'use strict';
var Singular = require('singular');
var core = require('./core.js');
var server = require('./server.js');
var router = require('./router.js');
var socketIo = require('./socket-io.js');
var awaits = require('./awaits.js');
var Error = require('./error.js');
var glob = require('glob');
var path = require('... |
import { setData } from '@progress/kendo-angular-intl';
setData({
name: "az-Latn",
identity: {
language: "az",
script: "Latn"
},
territory: "AZ",
numbers: {
symbols: {
decimal: ",",
group: ".",
list: ";",
percentSign: "%",
... |
console.log(URL_FILE_SERVER);
var lastID = 0;
var getLastId = function() {
return lastID;
};
var loadNextFile = function() {
console.log(URL_FILE_SERVER + lastID);
$.ajax({
url: URL_FILE_SERVER + getLastId(),
dataType: 'json',
method: "GET",
success: function(result) {
... |
'use strict';
// NIVEL CRUD
var Model = require('../../models/model');
// (para agregar un nuevo conservacion)
// GET /conservacion
exports.getForm = function (req, res) {
var conservacion = Model.Conservacion.build();
res.render('web/conservacion/add', { conservacion: conservacion});
};
// Rutas que terminan e... |
// @flow
const UnnamedFunction = require('./components/UnnamedFunction').default;
module.exports = {
name: 'function fixture',
component: UnnamedFunction,
props: {}
};
|
'use strict';
var _ = require('lodash');
var $ = require('preconditions').singleton();
var Uuid = require('uuid');
var log = require('npmlog');
log.debug = log.verbose;
log.disableColor();
var Bitcore = require('bitcore-lib');
var Common = require('../common');
var Constants = Common.Constants;
var Defaults = Common... |
import {MemberApi} from './api/member-api';
export class SignUp {
static inject() { return [MemberApi]; }
constructor(memberApi) {
this.heading = "Sign Up";
this.memberApi = memberApi;
this.passwordsMatch = true;
this.errors = [];
this.successMessage = '';
// Me... |
function Year(year) {
this.year = year;
this.isLeap = function () {
return (this.year % 100 == 0 && this.year % 400 == 0) || (this.year % 100 != 0 && this.year % 4 == 0);
}
}
module.exports = Year;
|
// dependencies
var async = require('async');
var should = require('should');
// libraries
var config = require('./../../config');
var gtfs = require('./../../../');
var downloadScript = require('../../../scripts/download');
// test support
var databaseTestSupport = require('./../../support/database')(config);
var db... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Ninja Physics. The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const chalk = require("chalk");
const utils_1 = require("../../utils");
const index_1 = require("./index");
const index_2 = require("../../http/index");
/**
* @description Registers application routes.
*
* @export
* @class RouteRegister
*... |
Given an array of n distinct integers sorted in ascending order, write a function that returns a Fixed Point in the array, if there is any Fixed Point present in array, else returns -1. Fixed Point in an array is an index i such that arr[i] is equal to i. Note that integers in array can be negative. Examples:Asked by ... |
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:foo/bar', 'Unit | Route | foo/bar', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
test('it exists', function (assert) {
let route = this.subject();
assert.ok(route);
});
|
import React, {PropTypes} from "react";
import {bindActionCreators} from "redux";
import {connect} from "react-redux";
import * as contextualMenuActions from "../../actions/contextualMenuActions";
import {
Button,
ContextualMenu,
DirectionalHint,
IconName
} from "office-ui-fabric-react";
/**
* Context... |
/*!
* jQuery Mobile v@VERSION
* http://jquerymobile.com/
*
* Copyright 2011, jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
// This is code that can be used as a simple bookmarklet for timing
// the load, enhancment, and transition of a changePage() reques... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.