text
stringlengths
7
3.69M
import photos from './controllers/photos'; export default function(router, photoFinder) { router.route('/api/photos/parse') .get((req, res) => photos(photoFinder) .then(msg => res.status(200).send(msg)) .catch(err => res.status(500).send(err))); }
class SpecialtySection extends HTMLElement { connectedCallback() { this.render(); } render() { this.innerHTML = ` <section class="specialty"> <div class="specialty__content"> <h2 class="specialty__content--title">spesialisasi kami</h2> <div class="galle...
import axios from 'axios'; import * as actions from './types'; import {returnMessage} from './messageActions'; import {setContentLoading} from './contentActions'; export const getBudget = (year_number, month_name, user_id) => (dispatch) => { const action = 'budget'; dispatch(setContentLoading(action)); axios ...
import home from './index'; describe('Controller: Home', function() { var $rootScope, $controller, $q, ctrl, auth, words; beforeEach(angular.mock.module(home)); beforeEach(angular.mock.inject(function(_$controller_, _$q_, _$rootScope_, _auth_, _words_) { $rootScope = _$rootScope_; $q = _$q_; auth =...
require.config({ shim: { "bootstrap-sass": { deps: [ "jquery" ] }, "jquery.easing": { deps: [ "jquery" ] }, markdown: { exports: "markdown" }, flipclock: { deps: [ "jquery" ], exports: "flipclock" } }, paths: {...
function validar() { var usuario = form1.tEmail.value.substring(0, form1.tEmail.value.indexOf("@")); var dominio = form1.tEmail.value.substring(form1.tEmail.value.indexOf("@")+ 1, form1.tEmail.value.length); var nome = form1.tNome.value; var msg = form1.tMsg.value; if(nome == "" || (usuario == "" && dominio ==...
export const UI_LOADED = 'UI_LOADED'; export function setUILoaded() { return { type: UI_LOADED, loaded: true } }
export default function db (entries) { const facets = {} const items = [] while (entries.length) { const i = entries.pop() items.push(i) for (let f in i.facets) { facets[f] = facets[f] || [] for (let v of i.facets[f]) { facets[f].indexOf(v) < 0 && facets[f].push(v) } }...
$(document).ready(function() { function addContainerAbilityInstances(container, name, index) { container.append($(container.attr('data-prototype').replace(/__name__label__/g, name).replace(/__name__/g, index))); } function addAbilityInstances(container, index) { addContainerAbilityInsta...
const actorParams = { address: '1 rue de la paix', city: 'Paris', postalCode: '75000', loc: { type: 'Point', coordinates: [1, 2] }, name: 'Cirque', contactPhone: '0123456789', contactName: 'Jane Doo', contactEmail: '[email protected]', description: 'Lorem ispum', domains: ['cirque'] } cons...
define([ './4.js', './5.js' ], function(){ console.log(2) });
/** * Properties shared by all applications (frontend and backend ones.) */ const properties = { constants: { client: { angular: { host: 'localhost', port: 10001 }, react: { host: 'localhost', port: 10002 }, vue: { host: 'localhost', ...
const http = require('http') const upperStream = require('./utils/upper-stream') const [,, port] = process.argv const serverHandler = (req, res) => { if (req.method !== 'POST') return res.writeHead(500) req.pipe(upperStream).pipe(res) } http .createServer(serverHandler) .listen(port)
function LightCard($el) { this.$el = $el; this.$a = this.$el.find('.btn-toogle-light'); this.$btn = this.$el.find('.turnonoff-light'); this.$img = this.$el.find('.light-img'); this.lightStatus = { on : { btn_display: '<span class="icon-lightbulb "/> Desligar', name: 'on', action: 'off' }, off ...
import React from 'react'; import shallowCompare from 'react-addons-shallow-compare'; import { connect } from 'react-redux'; import { deleteItemConfirmed, cancelDeleteView } from '../../actions/actions'; class ItemListHeader extends React.Component { static propTypes = { dispatch: React.PropTypes.func, erro...
var util = require('util'), _ = require('lodash'); var sortables = {'species': true, 'petName': true}, mapFunctions = buildMapFunctions(sortables); function formatIndexName(indexName) { return _.snakeCase('by_' + indexName) } function buildFuncString(func, index) { return func.toString().replace(/in...
// Eastland Property Services - Tradewatch Credit System import { combineReducers } from 'redux'; import { routerReducer } from 'react-router-redux'; import auth from './auth'; import data from './data'; const rootReducer = combineReducers({ routing: routerReducer, /* place some cool reducers here */ auth...
// import PropTypes from "prop-types"; import React from "react"; import styled from "styled-components"; import { Link } from "react-router-dom"; const Wrapper = styled.div` img { max-width: 100%; min-height: 100%; width: auto; height: auto; object-fit: cover; object-position: 50% 50%; } `...
const babel = require('babel-core'); const plugin = require('./transform'); const template = require('babel-template'); const opts = { presets: [require('babel-preset-env')], plugins: [ [ require('babel-plugin-transform-runtime'), { useESModules: true ...
(function() { var onoffconsole = $.onoffconsole; //console开关 String.prototype.temp = function(obj) { return this.replace(/\$\w+\$/gi, function(matchs) { var returns = obj[matchs.replace(/\$/g, "")]; return(returns + "") == "undefined" || (returns + "") == "null" ? "" : returns; }); }; String.prototype.tem...
angular.module('gmailApp') .factory('inboxFactory', function($http, $state, singleMailFactory) { var inboxFunctions = { generateInbox: function(username) { var data = { username: username } return $http.post('/inbox',data) }, openMail: function(mail) { singleMailFactory.from = mail...
// const request = require("request"); // const fs = require("fs"); const chartSize = { width: 800, height: 600 }; const margin = { left: 100, right: 10, top: 20, bottom: 150 }; const width = chartSize.width - margin.left - margin.right; const height = chartSize.height - margin.top - margin.bottom; const drawCompanie...
import React, { Component } from 'react'; import axios from 'axios'; import './App.css'; import Students from './components/Students/Students'; export default class App extends Component { state = { students: [], tags: [], name: '', tag: '' }; componentDidMount() { axios.get("https://www.ha...
// We cache DOM references to improve speed and reduce DOM queries //additions include well2 DV.Schema.elements = [ { name: 'browserDocument', query: document }, { name: 'browserWindow', query: window }, { name: 'header', query: 'div.DV-header'}, { name: 'viewer', query: 'div.D...
/*jslint this */ /* Duck hunter v.1.0 * * Copyright (c): Mikael Sundfors * Date: 1.7.2017 * * The purpose of this application was mainly to learn a few new things on JavaScript. * Take in account this is just an exercise. There may be things that have a more * efficient or better implementations....
function nuevoUsuario(event){ event.preventDefault(); let email = document.getElementById("registroEmail").value; let pass = document.getElementById("registroPass").value; cargarUsuario(email,pass) } function cargarUsuario(email,pass){ if(!corroborrarEmail(email)){ localStorage.setI...
import React from "react"; import { Field, reduxForm } from "redux-form"; import authLib from "../../../config/authlib"; import { Alert } from "react-bootstrap"; class DeliveryPage extends React.Component { constructor(props) { super(props); console.log(props); this.state = { loading: false, ...
const { getFromDatabaseByColumnValue } = require('../utils/index'); const chai = require('chai'); const expect = chai.expect describe("Utils Index updateDatabaseTable function test", () => { it('should be a function', () => { expect(getFromDatabaseByColumnValue).to.be.a('function'); }) it('shoul...
function add(num){ let sum=num; function adding(additive){ sum+=additive; return adding; } adding.toString=function() { return sum; }; return adding; } console.log(add(1)(2));
/** * @file ScrollIntoView.js * @author leeight */ import {defineComponent} from 'san'; export default defineComponent({ template: '<template><slot /></template>', attached() { /** FIXME(leeight) 效果不太好,导致页面的滚动条滚动了 if (this.el.scrollIntoView) { this.el.scrollIntoView(); }...
/* 7. Escriba un programa que solicite una contraseña (el texto de la contraseña no es importante) y la vuelva a solicitar hasta que las dos contraseñas coincidan. */ app(); function app(){ let flag = false; let password1; let password2; while (!flag) { password1 = prompt("Escriba su contraseñ...
'use strict'; var Game; (function (Game) { var FLOOR = { SPACE: 'space', BODY: 'body', FOOD: 'food' }; var Model = (function () { function Model(blocks, row, col) { this.blocks = blocks; this.row = row; this.col = col; this.offs...
const Os = require('os'); const Fs = require('fs'); const Hapi = require('hapi'); const Ip = require('ip'); const server = new Hapi.Server(); server.connection({ port: 8080 }); try { Fs.accessSync('/etc/letsencrypt/live/chained.pem', Fs.R_OK); var tls = { key: Fs.readFileSync('/etc/letsencrypt/live/doma...
import { StatusBar } from 'expo-status-bar'; import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import { Provider } from 'react-redux'; import MainNavigator from './navigator/MainNavigator'; import { createStore, combineReducers, applyMiddleware } from 'redux'; import { createLogger } fr...
import * as types from '../constants/ActionTypes' // TODO roztříštit export const addPastTraining = training => ({ type: types.addPastTrainings, payload: training, }) export const setPastTrainings = trainings => ({ type: types.setPastTrainings, payload: trainings, }) export const addCurrentTraining = trainin...
import React, {Component, PropTypes as pt} from 'react'; import {Icon} from './'; import styles from './album.scss'; const IconListen = () => ( <Icon className={styles.album__icon}><path d="M17 20c-.29 0-.56-.06-.76-.15-.71-.37-1.21-.88-1.71-2.38-.51-1.56-1.47-2.29-2.39-3-.79-.61-1.61-1.24-2.32-2.53C9.29 10.98 9...
import cons from './cons' const util = { /** * [hrefBlob 将返回的数据变成 <a href="blob"> 并点击下载,然后移除<a>标签] * @param {[type]} name [description] * @param {[type]} content [description] * @return {[type]} [description] */ hrefBlob(name, content) { let a = document.createElement('a'), b = new Blob([...
import React, { Component } from 'react'; import Attribute from '../components/Attribute'; class CoordinatesAndScaling extends Component { render() { return ( <div style={styles.properties}> <Attribute data={this.props.data} updateProperties = {this.props.updateProperties} ...
import App from './app' App.listen(3333)
import { nonAccentVietnamese } from "../String/stringFormat"; import { integerZeroPadding } from "../Math/int"; export var MILLIS_PER_DAY = 24 * 3600000; export var MILLIS_PER_HOUR = 3600000; export var MILLIS_PER_MINUTE = 60000; var _default_first_day_of_week = 1; export function getDefaultFirstDayOfWeek() { re...
import React from 'react'; import { Link } from 'react-router-dom'; import logo from '../../resources/logo2.png' const Header = () => { return ( <div className='container'> <div className="row my-2"> <div className="col-md-3"> <Link to='/'><img className='w-5...
export default { label: "4 Letter Words", id: "4-letter-words", list: [ { id: "reading", type: "passage", label: "Words List", data: { title: "Words List", text: [ `Find below some basic four letter words. Get familiar with them.`, { type...
/** * https://github.com/eviratec/remote-lock * Copyright (c) 2017 Callan Peter Milne * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE ...
const mongoose = require('mongoose') const { omit } = require('lodash') const ObjectId = mongoose.Schema.Types.ObjectId const schema = mongoose.Schema( { categoryId: { type: ObjectId, ref: 'cateogories', require: true, }, name: { type: String, require: true, }, valu...
var chartCtrl = angular.module('chartCtrl', ['leaflet-directive', 'chart.js']); chartCtrl.controller("chartCtrl", function($scope, $rootScope, $http) { const nbrBeds = {"Autriche":5.45,"Belgique":5,"Canada":1.96,"République tchèque":4.11,"Danemark":2.54,"Finlande":2.8,"France":3.09,"Allemagne":6.02,"Grèce":3.6,"H...
const UserModel = require("../model/UserModel"); class UserController { async create(request, response) { const user = new UserModel(request.body); await user .save() .then((success) => { return response .status(200) .json({ success: "Cadastro realizado com sucesso!" ...
const ExternalLinks = { DOCS_STATUS: "https://mesosphere.github.io/marathon/docs/" + "marathon-ui.html#application-status-reference", DOCS_HEALTH: "https://mesosphere.github.io/marathon/docs/" + "marathon-ui.html#application-health-reference" }; export default Object.freeze(ExternalLinks);
import PropTypes from "prop-types" import React, { Component } from "react" import { Link } from "gatsby" class Header extends Component { constructor({siteTitle}){ super(siteTitle); this.state = { color: 'none', position: 'absolute' } } componentDidMount(){ const windowGlobal =...
module.exports = { description: 'liquid-fire transitions map blueprint', normalizeEntityName: function() {} }
/** * Receives a query object as parameter and sends it as Ajax request to the POST /query REST endpoint. * * @param query The query object * @returns {Promise} Promise that must be fulfilled if the Ajax request is successful and be rejected otherwise. */ CampusExplorer.sendQuery = function(query) { return new...
'use strict'; const { Model } = require('sequelize'); module.exports = (sequelize, DataTypes) => { class routine extends Model { /** * Helper method for defining associations. * This method is not a part of Sequelize lifecycle. * The `models/index` file will call this method automatically. *...
import React from 'react' import './Blog.css'; const Blog = ({title}) => { return ( <section> <div className="container"> <div className="col-12 blogheade"> <div className="head"> <h5>{title}</h5> <hr/> </div> </div>...
const chai = require('chai'); const expect = chai.expect; const Deck = require('../src/Deck'); const Card = require('../src/Card'); describe('Deck', () => { let card1; let card2; let card3; let card4; let card5; let deck1; let deck2; beforeEach(() => { card1 = new Card(1, 'Who\'s Harry Potter\'s ...
import mongoose from 'mongoose'; import request from 'supertest'; import httpStatus from 'http-status'; import chai, { expect } from 'chai'; import app from '../index'; chai.config.includeStack = true; /** * root level hooks */ let organization = '59ca7f03298d4e2f1c3db5ed'; after((done) => { // required becau...
import Validator from "../helpers/validator"; export const UPDATE_VENDOR_PROFILE = "UPDATE_VENDOR_PROFILE"; export const FETCH_VENDOR_PROFILE = "FETCH_VENDOR_PROFILE"; export const PAYMENT_ACTIVATION = "PAYMENT_ACTIVATION"; export const DEPLOY_CONTRACT_ADDRESS = "DEPLOY_CONTRACT_ADDRESS"; export const SAVE_DEPLOYED_CON...
const usuario = { nome: "Felipe", empresa = { nome: "Rocketseat", cor: "Roxo", foco: "Programação", endereco: { rua: "Rua Guilherme Gembala", numero: 260 } } } console.log(`A empresa Rocketseat está localizada em ${usuario.empresa.endereco.rua}, $...
!function (e, t) { if ("object" == typeof exports && "object" == typeof module) module.exports = t(); else if ("function" == typeof define && define.amd) define([], t); else { var o = t(); for (var r in o) ("object" == typeof exports ? exports : e)[r] = o[r] } }(window, function () { return ...
// *** за допомогою fetch (як в прикладі) отримати від jsonplaceholder всі users. За допомогою document.createElement вивести їх в браузер. Помістити кожен окремий об'єкт в блок, при цьому кожен внутрішній об'єкт в свій блок (блок в блоці). // *** за допомогою fetch (як в прикладі) отримати від jsonplaceholder всі post...
if(process.env.NODE_ENV != 'production'){ require('dotenv').config() } const DARK_API_KEY = process.env.DARKSKY_API_KEY; //const DARK_API_KEY = d101a930f0d7bdba0fb57cf1a40b313f const axios = require('axios'); const express = require('express'); const app = express(); app.use(express.json()); app.use(express.stati...
import yargs from 'yargs'; yargs .boolean('production') .boolean('revision') .default({ production: false, revision: true }); export default yargs.argv;
const Course = require('../../../../../models/course'); const { TransformObject } = require('../../merge'); exports.deleteMatchingGameQuestion = async (args, req) => { try { if (!req.isTheUserAuthenticated) { throw new Error('Unauthenticated!'); } const course = await Course.findById(args.courseId...
module.exports = { extends: ["plugin:react/recommended", "plugin:jsx-a11y/recommended", "prettier/react"], plugins: ["react", "jsx-a11y", "react-hooks"], parserOptions: { ecmaFeatures: { jsx: true } }, settings: { react: { version: "detect" } ...
// latest.js var Api = require('../../utils/api.js'); function initSubMenuHighLight() { return [ ['', '', '', '', ''], ['', '', '', '', ''], ['','',''] ]; } function initSubMenuDisplay() { return ['hidden', 'hidden', 'hidden']; } var initSubMenuHighLight = [ ['', '', '', '', ''], ['', '', '', '', ...
const mongoose = require('mongoose') const dealsSchema = new mongoose.Schema({ over_view :{type:String , required:true}, price :{type:String , required:true}, }) module.exports = dealsSchema
'use strict'; const CliAction = require('@monstermakes/larry-cli').CliAction; const player = require('play-sound')({}); const glob = require('glob'); const _ = require('lodash'); const getRandomNoise = ()=>{ let fileNames = glob.sync(`${__dirname}/mp3s/**/*`,{}); return _.sample(fileNames); }; class VulgarCli exten...
/* globals define */ 'use strict'; define([ 'lodash', 'express', 'passport-jwt', 'request', 'dataloader', '-/logger/index.js', '-/ext/graphql/lib/get-config.js', '-/ext/graphql/lib/get-aggregate.js', '-/ext/graphql/lib/get-repository.js', '-/ext/graphql/lib/get-api.js' ], ( _, { Router }, { ExtractJwt }, ...
var progress = document.getElementById('progress'); var counter = document.getElementById('counter'); var intro = document.getElementById('intro'); var workIcon = document.getElementById('workIcon'); var sliderMain = document.getElementById('sliderMain'); var wrap = document.getElementById('wrap'); var prjctImg = docum...
const devConfig = require("./config/webpack.dev.js") const prodConfig = require("./config/webpack.prod.js") module.exports = (env, argv) => { if(argv.mode === "production"){ return prodConfig } else { return devConfig } }
import React, { Component } from 'react'; import { Button,Form,InputGroup, FormGroup, Label, FormControl } from "react-bootstrap"; import { Link } from "react-router-dom"; import Loader from "react-loader"; import { MAIN_API } from "../../service/apiService"; import "./Login.css"; import "../../App.css"; import Registe...
import { PostActionTypes } from './post.types'; const initialStateUsers = { posts: [], isPending: true } export const requestPosts = (state=initialStateUsers, action={}) => { switch (action.type) { case PostActionTypes.FETCHING_POST_START: return Object.assign({}, state, {isPending: tr...
var React = require('react'); var Dice = require('./Dice.react'); var Stats = require('./Stats.react'); var SumStats = require('./SumStats.react'); var _ = require('underscore'); var DiceCounter = React.createClass({ getInitialState: function(){ var initialHistory = { rolls: [], sums: [] }; var initialCh...
OC.L10N.register( "core", { "Unknown filetype" : "មិន​ស្គាល់​ប្រភេទ​ឯកសារ", "Invalid image" : "រូបភាព​មិន​ត្រឹម​ត្រូវ", "Sunday" : "ថ្ងៃអាទិត្យ", "Monday" : "ថ្ងៃចន្ទ", "Tuesday" : "ថ្ងៃអង្គារ", "Wednesday" : "ថ្ងៃពុធ", "Thursday" : "ថ្ងៃព្រហស្បតិ៍", "Friday" : "ថ្ងៃសុក្រ", "...
import React from 'react'; import Button from '../../01-atoms/Button/Button'; import logo from '../../../logo.png'; import './photo-gallery.css'; import {loadFlickr, loadInsta} from '../../../helpers'; class Gallery extends React.Component { constructor(props) { super(props); this.state = { currentIndex: nu...
define(function(require, exports, module) { // import dependencies var View = require('famous/core/View'); var Surface = require('famous/core/Surface'); function AppView() { View.apply(this, arguments); this.add(new Surface({ content: 'Hello World' })); } AppView.prototype = Object.crea...
export let zones = [ "全部地區", "前金", "新興", "鹽埕", "左營", "楠梓", "鼓山", "旗津", "苓雅", "三民", "前鎮", "小港", "鳳山", "鳥松", "大社", "仁武", "大樹", "岡山", "燕巢", "梓官", "永安", "彌陀", "橋頭", "田寮", "茄萣", "阿蓮", "路竹", "湖內", "那瑪夏", "桃源", "茂林", "六龜", "美濃", "旗山", "甲仙", "內門", "杉林", ...
import React from 'react'; import {StyleSheet, Text, View} from 'react-native'; class MemoAddButton extends React.Component { render() { const { style, color } = this.props; let bgColor = '#000'; let textColor = '#fff'; let bdRadius = 10; let fsize = 25; if (color === 'yellow') { bgCo...
'use strict'; module.exports = function (app) { var exports = {}; exports.home = function(req, res) { res.render('admin/index', { title: '管理后台' }); }; return exports; };
var FormerStudentsView = Backbone.View.extend({ template: HandlebarsTemplates['dashboard/former_students'], initialize: function() { this.$el.appendTo(".entire"); }, render: function() { var students = this.collection; students.sort(function(a, b) { return a.id - b.id; }); this.$e...
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'div', classNames: 'col-xs-12', willRemoveElement: function() { console.log('Remove element.'); this.controller.send('unload'); } });
export default function parseModuleName(str = "") { const normalized = str.replace(/(\'|\`)+/gm, '"'); // eslint-disable-line no-useless-escape const importIdx = normalized.indexOf("import"); const startQuoteIdx = normalized.indexOf('"'); const endQuoteIdx = normalized.indexOf('"', startQuoteIdx + 1); if (im...
import CollegeHeader from '@components/base/base-header/college-header' import DefaultHeader from '@components/base/base-header/default-header' import VideoHeader from '@components/base/base-header/video-header' export { CollegeHeader, DefaultHeader, VideoHeader }
const HtmlWebpackPlugin = require('html-webpack-plugin') console.log('❤️') module.exports = { mode: 'development', devServer: { host: '0.0.0.0', port: 1987, stats: 'errors-only' }, output: { path: `${__dirname}/demo` }, module: { rules: [ { test: /\.js$/, exclude:...
$(document).ready(function() { $("#portfolio-sorting li ").click(function() { // Remove the current active class $("#portfolio-sorting li.active").removeClass('active'); // Add the active class to the clicked button $(this).addClass('active'); // Get the button text (filter value) va...
const path = require('path'); const projectsUsersModel = require('../models/projectsUsersModel'); exports.viewAll = function (req, res) { projectsUsersModel.find({projectId: req.params.projectid}, function (err, projectsUsers) { if (err) { res.status(400).json({ message: err.toS...
import React, { Component } from "react" import { connect } from 'react-redux'; import CastNCrew from "./Seasons" class CastnCrew extends Component { constructor(props) { super(props) this.state = { castncrew:props.castncrew ? props.castncrew : [], movie:props.movie ...
var request = require("request"); if(!Date.prototype.getDayOfYear){ Date.prototype.getDayOfYear = function(){ var onejan = new Date(this.getFullYear(), 0, 1); return Math.ceil((this - onejan) / 86400000); }; } var fuse = function(uid){ return (uid ? "?of_user="+uid : ""); }; var tracker = function(config...
var searchData= [ ['readnorganize_0',['readNOrganize',['../class_file_scanner.html#ab64866fb0aafd075f957c96527a0627d',1,'FileScanner']]] ];
appModule.controller('loginController', ['$scope', '$location', 'loginService', 'authorizationService', function ($scope, $location, loginService, authorizationService) { $scope.user = {}; $scope.message = ""; $scope.isLoginBusy = false; $scope.login = function () { $scope.isLoginBusy = true;...
 "use strict" //var updateFormMethod; var changePasswordForm = function () { this.currentUser; this.Show = showChangePasswordForm; } function User() { this.Email; this.Password; this.ConfirmPassword; } function showChangePasswordForm() { var width = $(document).width(); var left = w...
import React, { Component } from 'react'; //import components import QuizListCards from '../../Components/QuizListCards/QuizListCards'; class QuizList extends Component { render() { return ( <div className="quizListPageContainer"> <QuizListCards /> ...
'use strict'; App.controller('PeriodController', ['$scope', 'PeriodService', function ($scope, PeriodService) { var self = this; self.period = {id: null, name: '', startday: null, endday: null}; self.currentperiod = {id: null, name: '', startday: null, endday: null}; self.per...
const test = require('tape'); const dropRight = require('./dropRight.js'); test('Testing dropRight', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof dropRight === 'function', 'dropRight is a Function'); t.deepEqual(dropRight([1,...
import {createStore, combineReducers} from 'redux'; import uuid from 'uuid'; // Expenses Reducers const expensesReducerDefaultState = []; const expensesReducer = (state = expensesReducerDefaultState , action ) =>{ switch(action.type) { case 'ADD_EXPENSE' : ...
var req = new XMLHttpRequest(); var slider = document.getElementById('weeksStudied'); var output = document.getElementById('rangeVal'); output.innerHTML = slider.value; slider.oninput = function () { output.innerHTML = this.value; } req.onreadystatechange = function () { if (req.readyState === 4) { i...
'use strict'; const fetch = require('node-fetch'); const nodemailer = require('nodemailer'); class Util { constructor(opts) { this.homey = opts.homey; } getHomeyIp() { return new Promise(async (resolve, reject) => { try { let localAddress = await this.homey.cloud.getLocalAddress(); ...
/* global Plotly:true */ import React from 'react' import { withState } from 'recompose' import createPlotlyComponent from 'react-plotly.js/factory' import { modifiedData, layout, modifiedOrderedData, layoutOrdered } from './data' const Plot = createPlotlyComponent(Plotly) const HeatMap = ({ heatmap, updateHeatmap ...
ko.components.register('folder-list', { viewModel: function(params) { var self = this; self.SelectedFolder = params.SelectedFolder || ko.observable(new Folder({})); self.NewFolder = ko.observable(new Folder({})); self.AllFolders = ko.observableArray(); //The function gets t...
$(document).ready(function () { new SportCard($('.sport-card'), 'off', 'soccer'); $('.light-card').each(function () { new LightCard($(this)); }); initCommandControls(); }); $(function () { $('.datetimepicker').datetimepicker({ locale: 'pt-br', inline: true, format: 'LT', //sideBySid...
'use strict'; /** * @ngdoc directive * @name seedApp.directive:logo * @description * # logo */ angular.module('seedApp') .directive('logo', function () { return { templateUrl: 'views/logo.dir.html', restrict: 'E', link: function postLink() { } }; });
angular.module('AdCshdwr').controller('NewCdrVchrHstryController', function ($scope, $location, locationParser, CdrVchrHstryResource ) { $scope.disabled = false; $scope.$location = $location; $scope.cdrVchrHstry = $scope.cdrVchrHstry || {}; $scope.save = function() { var successCallback =...