text
stringlengths
7
3.69M
const Int64 = require('@pascalcoin-sbx/common').Coding.Core.Int64; const Endian = require('@pascalcoin-sbx/common').Endian; const BC = require('@pascalcoin-sbx/common').BC; const BN = require('bn.js'); const chai = require('chai'); const expect = chai.expect; describe('Coding.Core.Int64', () => { it('can encode unsi...
import React from "react"; import { Container, Row, Col, Button, Image, Nav, Jumbotron, Figure } from "react-bootstrap"; import sshot3 from "./images/sshot3.jpg"; import sshot4 from "./images/sshot4.jpg"; import about1 from "./images/About1.png"; import about2 from "./images/About2.png"; import about11...
gamestate = Object.create({ setworldsize: function (s) { //this.nslots = Math.floor(s / 50) // A cunning algorithm to fairly choose which buildings get destroyed when the world shrinks // or which slots get added when the world grows /* if (this.nslots) { var n...
const expect = require("chai").expect; const { keccak, encode, toBuffer } = require('./../utils') const { Account, Header, Log, Proof, Receipt, Transaction } = require('eth-object') const { GetAndVerify, GetProof, VerifyProof } = require('./../index') const getAndVerify = new GetAndVerify("http://localhost:8545") des...
angular.module('ngApp.forgetPassword', [ 'ui.router', 'ngApp.common' ]);
import {createSelector} from 'reselect'; let getTodos = state => state.todos; let getVisibleFilter = state => state.visibleFilter; const getVisibleTodos = createSelector( [getTodos, getVisibleFilter], (todos, visibleFilter) => { switch (visibleFilter) { case 'ACTIVE': return todos.filter(t => !t...
import axios from 'axios'; import qs from 'qs'; var EntityTypes = { getEntityTypesByCountryId: function(countryId){ return axios.get(window.apiDomainUrl+'/entity-types/get-all-for-select-by-country?countryId='+countryId, qs.stringify({})) }, }; export function EntityTypesManager() { return Entit...
var activePlayer, board, scoreX, score0, tie, gamePlaying; init(); document.getElementById("c00").addEventListener("click", mark); document.getElementById("c01").addEventListener("click", mark); document.getElementById("c02").addEventListener("click", mark); document.getElementById("c10").addEventListener("click", ma...
import openSocket from 'socket.io-client'; const socket = openSocket(); export function subscribeToData(cb) { socket.on('newAV', (data) => { //console.log('newAV:::', data); cb(); }); socket.on('newBV', () => { //console.log('newBV:::'); cb(); }); socket.emit('subscribeToData');...
// JavaScript - Node v6.11.0 Test.expect(solution(1) == "I", "1 should == 'I'") Test.expect(solution(4) == "IV", "4 should == 'IV'") Test.expect(solution(6) == "VI", "6 should == 'VI'") Test.expect(solution(182) == "CLXXXII", "182 should == 'CLXXXII'") Test.expect(solution(1990) == "MCMXC", "1990 should == 'MCMXC'") T...
import State from '../GameMechanics/State.js'; import {changeEnv} from '../random/changeEnv.js'; import * as R from 'rodin/core'; import {audio} from "../sounds/gameSounds.js"; const hideStuff = (evt) => { evt.globals.room.parent = null; evt.globals.presentationScreen.parent = null; for (let i = 0; i < ev...
import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { closeModal } from '../../redux/modules/modal'; import { withStyles } from '@material-ui/core/styles'; import Modal from '@material-ui/core/Modal'; import Typography from '@material-ui/core/Typography';...
//just action types since strings are prone to duplicates. //auth actions export const LOGIN_USER_SUCCESS = 'LOGIN_USER_SUCCESS' export const LOGIN_USER_FAILED = 'LOGIN_USER_FAILED' export const LOGOUT_USER = 'LOGOUT_USER' export const SIGNUP_SUCCESS = 'SIGNUP_SUCCESS' export const SIGNUP_FAILURE = 'SIGNUP_FAIL...
// create https object var https = require("https"); // create string to call Uber API string = 'https://api.uber.com/v1/products?server_token=<myToken>'+ '&latitude=<latitude>&longitude=<longitude>'; // create request object var req = https.request(string, function (res) { var responseString = ""; ...
var Context = require('oae-context').Context; var Tenant = require('oae-tenants/lib/model').Tenant; var AuthzAPI = require('oae-authz'); var AuthzUtil = require('oae-authz/lib/util'); /** * Load the user, group and membership data from the model-loader scripts specified in scriptsDir. * * @param {String[]} tena...
function random(min, max) { const randomNumber = Math.random() * (max - min) + min; return Math.floor(randomNumber); } const min = 1; const max = 50; let rand = random(min, max); let count = 0; while(rand !== 10) { console.log(rand); rand = random(min, max) } do { console.log(rand); } while(rand...
var alexa = require('alexa-app'); const url = "https://www.extreme-d0wn.com/rss.xml"; var app = new alexa.app(); app.launch(function(request, response){ response.say("Bienvenue dans le skill extreme download pouvez demandez les nouveautés !"); response.shouldEndSession(false); }) app.intent('GlobalIntent', { "slo...
const {expect} = require('chai'); const lookupChar = require('./Char_Lookup'); describe('Char_Lookup', () => { it('should be undefined when first param is not a string ', function () { expect(lookupChar(4, 2)).to.be.undefined; }); it('should be undefined when second param is double', function ()...
import React from 'react' import { ScrollView, Image } from 'react-native' export default function ImageSlider() { return ( <ScrollView style={styles.imagescroll}> <Image source={'assets\music_app_image1.jpg'} /> <Image source={'assets\music_app_image1.jpg'} /> </ScrollView>...
import React, { useState, useEffect } from "react"; import { BrowserRouter, Route, Switch } from "react-router-dom"; import Signin from "./signin/Signin"; import Signup from "./signup/Signup"; import Profile from "./profile/Profile"; import Chat from "./chat/Chat"; import "./App.css"; import IdleTimerContainer from "./...
let _backgroundColor = 'green'; let _foodColour = 'red'; let _snakeColour = '#c2c2c2'; let _snakeTwoColour = "red"; //const socket = io('http://localhost:3000'); const socket = io('https://snake-multiple.herokuapp.com/'); const gameScreen = document.getElementById('gameScreen'); const initialScreen = document.getElem...
export const SOCKETME_BATTERY = 'SocketMe/battery'; export const SOCKETME_MOTION = 'SocketMe/motion'; export const SOCKETME_ORIENTATION = 'SocketMe/orientation'; export const SOCKETME_SIGNAL = 'SocketMe/signal'; export const SOCKETME_WIFI = 'SocketMe/wifi'; export const SOCKETME_COMPASS = 'SocketMe/compass'; export con...
var monitor = require("os-monitor"); var Dashi = require("./dashi"); var df = require("freediskspace"); var os = require("os"); function main(options) { var dashi = new Dashi(options); var totalRAM = Number(os.totalmem()); var freeRAM = Number(os.freemem()); var usedRAM = totalRAM-freeRAM; var usedPercentage = ...
// Buttons Controls $(document).ready(function () { $('.foundersInfoBlock').on("click", "button.saveFounderButton", function (event) { event.preventDefault(); $(this).hide(); $(this).next().show(); $(this).next().attr('disabled', true); $(this).next().next().attr('disabled', ...
import React, {Component} from 'react'; class TaskItem extends Component{ render(){ const { picture } = this.props; return ( <div className='mt-2 col-sm-6 col-md-6 col-lg-4 col-xl-4'> <div className='card'> <img className='card-img-top' alt=""...
module.exports = (sequelize, DataType) =>{ const Emprestimos = sequelize.define('emprestimos', { id: { type: DataType.INTEGER, primaryKey: true, autoIncrement: true }, is_ativo:{ type: DataType.BOOLEAN, allowNull: false, ...
const router = require('express').Router(); const { getAllCharacters, getOneCharacter, getByName } = require('../controllers/controllers'); router.get("/", async (req, res, next) => { const name = req.query.name; try { if (!name) { const allData = await getAllCharacters(); res.j...
var thumb111="TkSWZ9/CYkrrc5VP0dIfEmWzpWcz3FP6jmPx9rlbjigAvDzIbgJzza2DuUGJO6ELfhjc1KFIUqlRn/gKsUwjzdDI+u7b9DM4XSUJjXksWz75BgmIezs7U8NrvrjAeZM3aoDLh2QaGueSvvnvKy60DtVP2IpMfLmGxy4QsspuS15GGUmskpI2nEIkTzKIrx5FfQLgvR05DCeSipF0IRMtlJhxv1Y23hRERL6tT8xld0ZQVa/d6rc/T05mNT/a1jEHPCBUwoeuVqk9bZh5UqOS1tY9fL/ItP3U//jKqt7/mh0II7ZUW...
import React from 'react'; import './style.css'; function Comment({author, content}){ return( <div className='fields-full'> <img src={author.avatar} alt="Avatar do usuário"/> <div className='field-comments'> <p><strong> {author.name} ...
const {cache} = require('../config/defaultConfig') function refreshRes(stats, res) { const {maxAge,expires} = cache; if(expires) { res.setHeader('') } }
var app = angular.module('moviedbapp',['ngRoute']); app.controller('loginController', function($scope) { $scope.userName = ""; $scope.password = ""; });
 exports.login = function (request, callback) { var loginModel = { token: "", message: "", status:false } if (request.userName == "meltay" && request.password == "123") { loginModel.status = true; loginModel.message = "Welcome"; callback(loginModel); }...
#target Illustrator #targetengine main // script.name = Bottomclipper.jsx; // script.required = at least two paths selected, BOTTOM path is the clipping mask; // script.parent = Herman van Boeijen, www.nimbling.com // 22-12-2014; // Big thanks to CarlosCanto and MuppetMark on the Adobe Illustrator Scripting Forums...
const https = require('https'); const socks5 = require('../index'); const agent = new socks5.HttpsAgent({ host: '127.0.0.1', port: 8888, username: 'username', password: 'password', }); https.get({ host: 'google.com', port: 443, agent: agent, }, (resp) => { console.log(resp.statusCode); }).on('error'...
import OrderTypeItem from './OrderTypeItem' export default OrderTypeItem
import React, { Component } from 'react'; import contacts from '../data/contacts.json' import '../App.css'; import ContactItem from './contactItem.js'; class ContactList extends Component { constructor(props){ super(props); this.state = { contactsList : contacts.slice(0,5), } } getRandom = () ...
#!/usr/bin/env node const fs = require('fs'); const meow = require('meow'); const url = require('url'); const path = require('path'); const async = require('./lib/async'); const printResult = require('./lib/print-result'); const getStatus = require('./lib/get-status'); const request = require('request'); const MAIN_HO...
import { updateObject } from '@utils/utility' import * as _act from '@constants/actionType' const initialState = { navigationStretched: true } export const layoutReducer = (state = initialState, action) => { switch (action.type) { case _act.STRETCH_NAVIGATION: return updateObject(state, {navigationStretched: ...
import DS from 'ember-data'; import ApplicationSerializer from '../serializers/application'; export default ApplicationSerializer.extend({ attrs: { type: 'email_type' } });
var colNames = { "LETTING_HOUSE" : [ 'id', '房东', '住房编号', '出租房地址' ], "SCHOOL" : [ 'id', '学校名称', '校长', '学校地址' ], "OTHER_LOCALE" : [ 'id', '联系人', '场所名称', '场所地址' ], "ENTERPRISEKEY" : [ 'id', '法人代表', '企业名称', '企业地址' ], "SAFETYPRODUCTIONKEY" : [ 'id', '负责人', '安全生产重点企业名称', '安全生产重点企业地址' ], "SECURITYKEY" : [ 'id', '负责人', '...
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' import router from './router' import Vuex from 'vuex' import axios from 'axios' import store from './store/index' import echarts fro...
/** * License * @author mnemonic88uk * @copyright 2020 mnemonic88uk * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ $(document).ready(function() { (function() { var $input = $('#merchant_private_key'); if ($input.length) { var $formGroup = ...
$(document).ready(function(){ var button = $('#button'); var modal = $('#modal'); var close = $('#close'); button.on('click', function(){ modal.addClass('modal_active'); }); close.on('click', function(){ modal.removeClass('modal_active'); }); var modalThank = $('#modal-thank'); var closeTh...
import React, { Component } from 'react' import Nav from './nav' export default class Resume extends Component { render(){ return( <div> <Nav/> <h2> Proficiencies </h2> <hr></hr> <div className="rows"> <div className="row"> <div className="resumeContainer" style={...
/* * @copyright Adam Benda, 2016 */ /** * @class * @classdesc Gamestate: score, speed, pylons, Player, lot of fun... */ /** * */ var Gamestate = function () { /** * @type {Matter.Engine} */ this.engine = null; /** * All Pylons on the map * @type {Pylon[]} */ this.py...
$(document).ready(function() { console.log("Lets Eat!"); }); // Search Parameters var ul = document.getElementById("recipes"); // Get the list where we will place our recipes var numRecipes = 0; var ingredients = []; //Functions var unirest = require("unirest"); var req = unirest("GET", "https://tasty.p.rap...
module.exports = { env: { browser: true, es6: true, amd: true, }, root: true, parserOptions: { parser: 'babel-eslint', sourceType: 'module', }, extends: [ // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style 'airbnb-base', 'plugin:prettier/reco...
/** * Created by andy on 1/2/15. */ (function(){ var M = GrantTopo.MSG_TYPE; function DataSource(comp){ this.__comp = comp; } DataSource.prototype.getData = function(){ var self = this; $.ajax({ url: "/topo/allElements.do", dataType: "json" }).do...
const mysql=require("mysql"); const database=require("../config/dbconfig"); const userDao={ userDao(){ return new Promise(function (resolve,reject) { database.connect("SELECT u_name,u_tel,u_sex,u_qq,createtime,state from t_user",(err,data)=>{ if(!err){ resolve(data)...
import React from 'react'; import { connect } from 'react-redux'; import OrderItem from './OrderItem'; const OrderList = ({orders}) => { let completedOrders = []; if (orders) { completedOrders = orders.filter(order => { return order.status !== 'created'; }) } return ( <div> <h3>M...
/****************************************************************************** * Compilation: node MonthlyPayment.js * * Purpose: Program which determines how much monthly payment one have make as * EMI based on Principle amount, rate of compound interest & years to * pay within. * * @...
var port = 1337; var express = require("express"); var http = require("http"); var server = express(); server.configure(function () { server.use(express.static(__dirname + "/")); }); server.listen(port); http.createServer(server); console.log("Server running at http://localhost:" + port + "/")
/*Replace default form with GF and populate fields**/ if( jQuery('#eagle-detail').length ) { jQuery('.eagle-content-sidebar-wrapper .eagle-forms > div').remove(); jQuery('.eagle-content-sidebar-wrapper .eagle-forms').append(jQuery('#eagle-widget-area')); jQuery('.gf-hidden').css('display','none'); jQuery('#eagle-contac...
"use strict"; const gulp = require("gulp"), browserSync = require('browser-sync').create(), sass = require('gulp-sass'), concat = require('gulp-concat'), cleanCSS = require('gulp-clean-css'), uglify = require('gulp-uglify'), imagemin = require('gulp-imagemin'), autoprefixer = require('gulp-a...
function setUpToolTips() { $('.has_tooltip').off('hover'); $('.has_tooltip').hover(function() { var top = $(this).height(); var width = $(this).children(".tooltip").width(); var parent_left = $(this).offset().left; var doc_width = $(document).innerWidth() - ...
const express = require('express'); const axios = require('../../utils/axios-instance'); const router = express.Router(); const con = require('../connection/DBconnection'); const ip = require('ip'); const SaveLog = require('../../utils/logger').expandWorkerLogging; const {parse, stringify} = require('flatted'); const ...
import { handleActions } from 'redux-actions'; import { headlineIdsFetched, fetchHeadlineIds, } from 'headlines/headlines.actions'; export default handleActions( { [headlineIdsFetched().type](state, action) { const { ids, type } = action.payload; const newState = { ...state }; if (newState...
Images = new Mongo.Collection('images'); ImageSchema = new SimpleSchema({ uploadedBy: { type: String }, image: { type: String }, dateCreated: { type: Date, autoValue: function() { if (this.isInsert) { return new Date(); } else if (this.isUpsert) { return {$setOnInsert: new Date()}; } else...
'use strict'; let mongoose = require ("mongoose"); let Schema = mongoose.Schema; let BasePlugins = require ("./plugins/BasePlugins"); /* Type: String,Number,Date,Buffer,Boolean,Mixed,Objectid,Array */ // create a schema let schema = new Schema({ _id: { type: Number, inc: true}, name: String, username: { type: Stri...
quitsmokingApp.ProductFacade = function() { this.productProxy = clone(new quitsmokingApp.ProductProxy(this)); this.productCommand = clone(new quitsmokingApp.ProductCommand(this)); this.productMediator = clone(new quitsmokingApp.ProductMediator(this)); quitsmokingApp.ProductFacade.prototype.retrieveMediator = ...
describe('HomeController', function () { // define variables for the services we want to access in tests var HomeController, RetailService; beforeEach(function () { // load the module we want to test module('app'); // get services from injector inject(function ($con...
var numberButtons = document.getElementsByClassName('number'), ops = document.getElementsByClassName('operation'), resultButton = document.getElementsByClassName('result')[0], workField = document.getElementsByClassName('workfield')[0], currentResult = 0, operationFlag = false, lastOperation, // firstOper...
var controller = require('../routes/teams'); var matches = require('../services/matches'); var list = require('../matches.json'); exports['load data'] = function (test) { test.async(); matches.clear(function (err, data) { test.ok(!err); matches.addList(list, function (...
/** * This module receives redux actions and responses with action handlers * @module Speed/Reducer * @requires {@link module:Speed/ActionTypes} */ import { FETCH_ALL_LOCATIONS_SPEED_REQUEST, FETCH_ALL_LOCATIONS_SPEED_SUCCEED, FETCH_ALL_LOCATIONS_SPEED_FAILURE, ZOOM_END, FETCH_ALL_STATISTICS_REQUEST, FE...
// SCROLL SPY ButterCake.plugin('scrollSpy', function (options) { // SETTINGS var scrollSpySetting = { el: '.scrollSpy', spyEl: '.scrollSpy-item', menu: '.scrollSpyMenu', menuLi: '.scrollSpyMenu li', offset: 150, speed: 100, activeClass: 'active' }; $....
const router = require("express").Router(); const dailyActionsController = require("../../controllers/dailyActionsController"); // Matches with "/api/dailyActions/:id" router.route("/:id") .get(dailyActionsController.findById) .put(dailyActionsController.update) module.exports = router;
const Auth = { isAuthenticated: localStorage.getItem('userAccessToken') ? true : false, authenticate(userToken, username, callback) { localStorage.setItem('userAccessToken', userToken); localStorage.setItem('username', username); this.isAuthenticated = true; if (typeof callback == "function") ...
import {Message} from 'discord.js'; const kWhendwalker = '!whendwalker'; const kWhenLegend = '!whenlegendtitle'; /** * Post the time until endwalker launch * @param {Message} message The current message to process * @return {boolean} If this module consumed the message */ export default function processMessage(me...
import React, { Component } from 'react'; import { Collapse, Navbar, NavbarToggler, NavbarBrand, Nav, NavItem, NavLink, UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; import { Redirect } from 'react-router-dom'; import './navStyle.css'; import $ from 'jq...
const createCourse = (router, authenticateUser, asyncHandler, Course) => { router.post('/courses', authenticateUser, asyncHandler(async (req, res) => { try { // create course const course = await Course.create(req.body); // set location header to '/courses/:id' ...
"use strict"; /* global LAMBDA */ $(document).ready(function () { var arr, tree, label1,label2, graph; var oneChar = function(x) { return ! parenChar(x) && arr.value(x).length === 1; }; var noChar = function(x) { return arr.value(x).length === 0; }; var lambdaChar = function(x) { return arr.valu...
app.directive('setDatepicker', function () { return { restrict: 'A', require: 'ngModel', link: function (scope, elem, attrs, ngModel) { elem.datepicker({ autoclose: true, todayHighlight: true, showmonths: true, ...
Splitting(); // $(document).ready(function() { // $('#fullpage').fullpage({ // autoScrolling:true, // scrollHorizontally: true // }); // }); let businessMotion = gsap.timeline({paused:true}); businessMotion.from("#business h2",{ opacity:0, duration:1 }) .from("#business .viewMore",{ opacity:0, d...
import Tabs from "./lib/Tabs"; const tabs = Tabs.create(); const app = document.getElementById("app"); const foo = document.createElement("div"); foo.innerHTML = ` <span>foo</sapn> <input type="text" value="foooo" /> `; const woo = document.createElement("div"); woo.innerHTML = ` <span>woo</sapn> <input typ...
var MinerGame = MinerGame || {}; MinerGame.continueState = function(){}; MinerGame.continueState.prototype.create = function() { // FOR debugging // MinerGame.hardMode = false; // audio this.blipSound = this.game.add.audio('blip'); this.blipSound.volume -= 0.6; // conditional text this.lines = ['To be...
/* eslint-disable react/no-unescaped-entities */ import React from "react"; /* import { connect } from "react-redux"; import * as courseActions from "../../../redux/actions/courseActions"; import PropTypes from "prop-types"; import { bindActionCreators } from "redux"; */ import "bootstrap/dist/css/bootstrap.min.css"; i...
'use strict' module.exports = function(sequelize, DataTypes) { return sequelize.define('users', { phone: { type: DataTypes.STRING, allowNull: true }, name: { type: DataTypes.STRING, allowNull: true }, email: { type: DataTypes.STRING, allowNull: true }, password: { type: DataTypes.STRING, allowNull: tr...
module.exports = { jwtSecret: 'kSDxTOIm8O8ACGZIHwMtqD5S5Ym2iTjb', };
import axios from "axios"; //config defaults for instance const instance = axios.create({ baseURL:"https://weconect-api.herokuapp.com/api/v2" // baseURL:"http://127.0.0.1:5000/api/v2/" }); instance.interceptors.request.use((config)=>{ config.headers.Authorization = localStorage.getItem("Token"); retur...
const games = [ { id: '1', title: 'Global Gladiators', releaseDate: new Date('12-08-1992'), likes: 373, dislikes: 2, comments: [], characters: [ { id: '5', name: 'Mick' }, { id: '6', name: 'Mack' } ] }, { id: '2', titl...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ 'use strict'; angular.module('PersonalWebsiteAngularApp') .factory('photoService', function($resource) { return $resource("https://picasaweb.google.com/data/feed/api/user/117003610218296462827/albumid/598921098462161...
import React from "react"; import { Consumer } from "../../context"; let n = -12; const LeftArrow = () => { const goBack = dispatch => { n--; dispatch({ type: "GO_BACK", payload: n }); }; return ( <Consumer> {value => { const { dispatch } = value; return ( <div className="panel-left" onClick=...
var mongoose = require('mongoose'); var BookmarkSchema = new mongoose.Schema({ articleId: { type: String, required: true }, userId: {type: String, required: true }, }); module.exports = mongoose.model('Bookmark', BookmarkSchema);
module.exports = { Budget: require('./transcations.js') }
/*Me parece que al colocar el this. automaticamente se inicializan, ya no es necesario definir primero el atributo como en java, son las propiedades*/ function persona(nombre, apellido, localidad,pais){ this.nombre = nombre; this.nombre = nombre; this.apellido = apellido; this.localidad = localidad; ...
import moment from 'moment'; import expensesReducer from '../../reducers/expenses'; import expenses from '../fixtures/expenses'; test('should set default state', ()=>{ const state = expensesReducer(undefined, {type:'@@INIT'}); expect(state).toEqual([]); }); test('should remove expense by ID',()=>{ con...
import { shallowMount, createLocalVue } from '@vue/test-utils' import BlogContent from '@/components/modules/blog/BlogContent.vue' import Buefy from 'buefy' jest.mock('axios', () => ({ get: () => Promise.resolve({ data: '# Title' }) })) const localVue = createLocalVue() localVue.use(Buefy) describe('BlogContent.vue...
import styled from 'styled-components'; import loupe from '../icons/loupe.svg'; export const SearchBarInput = styled.input` background: url('${ loupe }') no-repeat right 0.3em center; background-size: 1.8em; box-sizing: border-box; font-size: 1.2em; outline-style: none; padding: 0.5em; padding-right: 2....
const express = require('express') const indexRoutes = require('./routes/indexRoutes') const app = express(); const conn = require("./database/database") const router = express.Router() //Database conn .authenticate() .then(() => { console.log("Conexão feita com o banco de dados") }) .catch((er...
/** * @module ping-remote main * Fork two actors into two containers to play ping pong. */ var proc = require('child_process'); proc.fork(__dirname + '/launcher1'); proc.fork(__dirname + '/launcher2');
import Vue from 'vue' import Router from 'vue-router' import Main from '@/components/Main' import Login from '@/components/Login' import Settings from '@/components/Settings' import store from '../store/index.js' Vue.use(Router) function requireAuth(to, from, next){ if (store.getters.getUser == null) { next('/L...
/* //////////////////////////////////////////////////////////////////////// */ /* */ /* //////////////////////////////////////////////////////////////////////// */ import DcentProvider from '../../src' /* //////////////////////////////////////////////////////////////////////// */ /* */ /* ////////////////////////////...
// Обещания // пример без промисов - на cb-функциях /* { function applyForVisa(documents, resolve, reject) { console.log('Обработка заявления на визу...'); setTimeout(function() { // 50% random Math.random() > 0.5 ? resolve({}) : reject('В визе отказано: нехватка документов'); ...
/*jslint node: true */ 'use strict'; var logger = require('../utils/logger'); var testData = require('./data'); var request = require('../lib/request'); var response = require('../lib/response'); var chai = require('chai'); var expect = chai.expect; chai.use(require('chai-json-schema')); /** * Tests for the test data...
import React from "react"; import { Table } from "react-collapsable-table"; const tableHeader = [{ id: "Firstname" }, { id: "Lastname" }, { id: "Email" }]; const tableBody = [ { id: 1, Firstname: "Roronoa", Lastname: "Zoro", Email: "[email protected]" }, { id: 2, Firstname: "Zoro", Lastname: "Roro", Email: "lost@gm...
"use strict"; App.controller("SearchController", ["$scope", "ItemService", "$location", function ($scope, ItemService, $location) { var self = this; var keyword = $location.search()["keyword"]; var URI = "/laba/request/" + keyword; self.item = { id: null, name: "", objectType: {id: null}, param...
require("dotenv").config(); const express = require("express"); const app = express(); const session = require("express-session"); const massive = require("massive"); const cors = require("cors"); const mc = require("./controllers/mainCtlr.js"); const { json } = require("body-parser"); const { SESSION_SECRET: secret, P...
import React from 'react'; import { DrawerNavigator } from 'react-navigation'; // Components import SideBar from '../Sidebar/Sidebar'; import VOD from '../../containers/VOD'; // Styles // Other data/helper functions const DrawerVOD = DrawerNavigator( { VOD: { screen: VOD } }, ...
/* 🤖 this file was generated by svg-to-ts*/ export const EOSIconsFiberPin = { name: 'fiber_pin', data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5.5 10.5h2v1h-2zM20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zM9 11.5c0 .85-.65 1.5-1.5 1.5h...
angular.module('mappler.services.user.userService', []) .factory('UserService', ['$http','$rootScope','$q', '$filter', '$translate', 'Constants', 'SiteRestApiMapping', function($http, $rootScope, $q, $filter, $translate, Constants, SiteRestApiMapping){ var obj = { joinUserIdCheck: function(sign...