text stringlengths 7 3.69M |
|---|
import React from "react";
import { NavLink } from "react-router-dom"
function Header({
title,
logo = "//",
isDarkMode,
onDarkModeClick,
}) {
return (
<header>
<h1>
<span className="logo">{logo}</span>
{title}
</h1>
<nav>
<NavLink className="button" to="/proj... |
const functions = require("firebase-functions");
const admin = require("firebase-admin");
const nodemailer = require("nodemailer");
const { google } = require("googleapis");
const SECRET = require('./SECRET.js');
const app = admin.initializeApp();
// Owner of the `SECRET.REFRESH_TOKEN`. Need to update the token when ... |
import {Client} from 'discord.js';
import {discordToken} from './config.json';
import BlockifyModule from './plugins/Blockify.js';
import AutoModGiphyModule from './plugins/AutoModGiphy.js';
import Whendwalker from './plugins/Whendwalker.js';
const client = new Client();
// Each module exports a function that consum... |
const dpi = window.devicePixelRatio || 1
const colors = [
'#E70000',
'#FF8C00',
'#FFEF00',
'#00811F',
'#0044FF',
'#760089'
]
let options = {
size: 100,
lines: false,
overlay: false
}
let canvas = createCanvas()
let interval = null
function createCanvas () {
let canvas = document.createElement('c... |
module.exports = ({ env }) => ({
host: '0.0.0.0',
port: process.env.PORT || 8080,
production: true,
admin: {
auth: {
secret: process.env.APP_ADMIN_JWT_SECRET
},
},
});
|
/****************************************************/
/******************** 自定义Element校验规则 *********/
/***************************************************/
/**
* 校验手机号码
*/
export function checkMobile (rule, value, callback) {
if (!value) callback()
const reg = /^[1][3,4,5,7,8][0-9]{9}$/
if (!reg.test... |
import React from 'react';
import {Header} from 'semantic-ui-react'
export default {
mapOptions :(data) => {
return (data || []).map((item) => ({
key: item.id,
value: item.id,
text: <Header content={item.label} subheader={item.iban}/>,
content: <Header content={item.label} subheader={it... |
import React from 'react';
export default function HeadCounter() {
return <div></div>;
}
|
module.exports = (sequelize, Sequelize) => {
const CandidateBio = sequelize.define('candidate_bio', {
user_id: {
type: Sequelize.STRING
},
profile_pic: {
type: Sequelize.STRING
},
other_img1: {
type: Sequelize.STRING
},
other_img2: {
type: Se... |
import React from 'react'
import {connect} from 'react-redux'
// import {startPostProfile, startRemoveProfile, startGetProfile} from '../actions/profileAction'
import { MDBContainer, MDBRow, MDBCol, MDBBtn, MDBCard, MDBCardBody, MDBIcon } from 'mdbreact';
class Profile extends React.Component{
constructor (){
... |
var promise = new Promise(function (fulfill, reject) {
setTimeout( () => {
reject('REJECTED!');
}, 3000);
});
promise.then(console.log);
|
const express = require('express');
const meetingsRouter = express.Router();
const dbFunctions = require("./db");
meetingsRouter.get('/', (req, res, next) => {
res.send(dbFunctions.getAllFromDatabase('meetings'));
});
meetingsRouter.post('/', (req, res, next) => {
addToDatabase('meetings', req.query);
res.status(2... |
import { handleActions } from "redux-actions";
const initialState = {
news: [],
page: 1,
nextPage: 2,
prevPage: 1,
currentFeed: {},
isLoading: null,
error: null
};
const newsReducer = handleActions(
{
FETCH_NEWS: (state, { isLoading, payload, error }) => {
if (isLoading || error) {
r... |
window.requestAnimFrame = (function () {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (/* function */ callback, /... |
import {StatusBar} from 'expo-status-bar';
import React from 'react';
import {View} from 'react-native';
import Amplify from 'aws-amplify';
import awsmobile from './aws-exports';
import MapRN from './src/components/MapRN';
import Index from './src/components/Index';
import styles from './src/assets/jammStyle';
import... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
alert("Selamat Datang\n \n \n Di Rumah Sakit");
|
const mix = {
data () {
return {
select: '-->'
}
},
directives: {
searchWarna: {
bind: (el, binding) => {
el.style.backgroundColor = binding.value
}
}
}
}
export default mix
|
import React, { Component } from 'react';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<h1 className="App-title">Welcome to Horoscraps!</h1>
</header>
<form name="userInfo">
<ul>
<li>
Yo... |
function shortLongShort(shortString, longString) {
if (shortString.length > longString.length) {
[shortString, longString] = [longString, shortString];
}
combinedStrings = shortString + longString + shortString;
console.log(combinedStrings);
}
shortLongShort('abc', 'defgh'); // "abcdefghabc"
shortLongSh... |
angular.module('Factories', []);
require('./factories/questionFactory.js');
require('./factories/loginFactory.js');
require('./factories/databaseFactory.js');
|
../../../../../shared/src/App/FavoritePornstars/models.js |
import React from "react";
import styled from "styled-components";
import { Header, Container, Divider } from "semantic-ui-react";
import { FacebookButton, GmailButton } from "../SocialNetButtons";
import RegisterForm from "./Form/Container";
import facebook from "../../../assets/facebook.svg";
import google from... |
import React from 'react';
import $ from 'jquery';
import { Button } from 'react-bootstrap';
class ReactApi extends React.Component {
constructor() {
super();
this.state = {
searchQuery: '',
results: []
};
this.handleChange = this.handleChange.bind(this);
this.handleClick = this.handl... |
/**
* JS Linting
*/
require('mocha-eslint')([
'assets/js',
'config',
'models',
'routes',
'test',
'app.js'
]);
|
const bcrypt = require('bcryptjs')
const myFunction = async () => {
const pass = "Bibash"
const hashedPassword = await bcrypt.hash(pass, 8)
console.log(hashedPassword)
console.log(await bcrypt.compare(pass, hashedPassword))
}
myFunction() |
/*jslint browser: true, undef: true, white: false, laxbreak: true *//*global Ext*/
Ext.define('Jarvus.field.Money', {
extend: 'Jarvus.field.Float'
,xtype: 'moneyfield'
,componentCls: 'field-money'
,readValue: function() {
return this.callParent().replace(/[^\d.]/, '');
}
,renderValue: function(value) {
... |
Nstagram.Collections.Comments = Backbone.Collection.extend({
model: Nstagram.Models.Comment,
initialize: function (options) {
this.url = '/api/comments/' + options["photo_id"];
}
});
|
import Author from './author';
import {connect} from '../data';
export default connect(({match}) => `${match.url}/data.json`)(Author);
|
const Lap = require('./../model/Lap');
const convertTimeToSeconds = time => {
const [minute, second] = time.split(':').map(Number);
const seconds = minute * 60 + second;
return Number(seconds.toFixed(3));
};
const buildLap = line => {
const lap = new Lap(line);
lap.lapTime = convertTimeToSeconds(lap.lapTim... |
import React from 'react';
import { Link } from 'react-router-dom';
import './styles.css';
const FriendList = ({ friendCount, username, friends }) => {
if (!friends || !friends.length) {
return <p className="friend-list-title text-center text-light p-3">{username}, follow someone!</p>;
}
return (
<div>
... |
const express = require('express');
const router = express.Router();
const db = require("../my_modules/db.js");
const moment = require('moment');
const mysqldb = require("../my_modules/mysqldb.js");
// http://localhost:3000/nodejs/httpTest-mysql?action=findData&whereStr=id=1 and name="xx"&fieldStr=field1,field2&prePa... |
import comento from './comento'
export default {
comento
}
|
const mongoose = require('mongoose');
const { Schema } = mongoose;
const pieSchema = new Schema({
data: {type:Number,required: true},
month:{type:String,required:true}
},{collection:'pie'})
module.exports = pieSchema; |
const request = require('request')
const userProfiles = new Map()
let config = {}
let logger = console.log
/**
* Setup service
*
* @param cfg
* @param lgr
*/
function setup (cfg, lgr) {
config = cfg
logger = lgr
}
/**
* Get profile
* - get from cache or
* - get from the api and store it in memory cache
*... |
$(document).ready(function()
{
$("#msgbox").hide();
$(document).on("click","#clickHere",function()
{
$("#clickHere").hide();
$("#msgbox").show();
});
});
$(document).on("click","#done",function()
{
var title=$("#i2").val();
var note=$("#i3").val();
co... |
define([
'cfgs',
'core/core-modules/framework.form',
'core/core-modules/framework.util'
], function (cfgs, form, util) {
let module = {
"define": {
"name": "input-date"
}
};
/**
* 模型
* 筛选条件、表格项、编辑项,校验内容,
*/
/** 处理 网格显示 */
module.grid = (column, tr, value) => {
// 显示时间类型
v... |
angular.module('named-views.regi-mover2', [
'ui.router'
])
.config(['$stateProvider',function($stateProvider){
$stateProvider
.state('home.regi-mover2', {
url: 'regi-mover2',
views: {
'content@': {
templateUrl: 'regi-mover2.html'
}
}
}
... |
const knex = require("knex");
const app = require("../src/app");
const helpers = require("./test-helpers");
describe("Meals Endpoints", () => {
let db;
const { testUsers, testMeals, testFoods } = helpers.makeMacroFyFixtures();
before("make knex instance", () => {
db = knex({
client: "pg",
conne... |
import React from "react"
import { Typography } from "@material-ui/core"
const TotalWalletValue = props => {
const USD_SUM = props.sum
//Converter functions are passed down from index.js to keep conversion the same
const EUR_SUM = props.convertUSDtoEUR(USD_SUM)
const CHF_SUM = props.convertUSDtoCHF(USD_SUM)
... |
import React from "react";
import svgLogo from "assets/404.svg";
const PageNotFound = () => {
return (
<div className="page-not-found">
<div className="text-center">
<img src={svgLogo} alt="" />
<p className="mt-5">
Welcome to page 404! You are here because you entered the address... |
WMS.module('Articles', function(Articles, WMS, Backbone, Marionette, $, _) {
Articles.Router = Marionette.AppRouter.extend({
appRoutes: {
"articles(/filter/criterion::criterion)": "listArticles",
"articles/:id": "showArticle"
},
header:'articles',
permissionsMap: {
'listArticles':'... |
// create line graph with chart.js
function createLineChart(data) {
var ctx = $("#lineChart").get(0).getContext("2d");
var myLineChart = new Chart(ctx).Line(data, {
datasetFill: false,
responsive: true
});
}
// create pie chart with chart.js
function createPieChart(data) {
var ctx = $("#pieChart").ge... |
const Command = require('../../structures/Command');
class Clothes extends Command {
constructor (...args) {
super(...args, {
name: 'c',
aliases: ['clothes', 'ciuchy'],
perms: true,
args: ['Component ID', 'Drawable ID', 'Texture ID', 'Palette ID']
});
}
run (player, command, args... |
class MyArray {
constructor(...startingValues) {
this.length = 0;
//spread
this.push(...startingValues);
}
// ... - рест оператор
push(...incomingValues) {
for (const value of incomingValues) {
this[this.length++] = value;
}
return this.length;
}
unshift(...incomingValues) {... |
define(['src/FizzBuzz'], function () { return FizzBuzzTest() });
function FizzBuzzTest() {
describe("Should return Fizz when:", function () {
it("is the number three", function () {
expect("Fizz").toEqual(FizzBuzz().transform(3));
});
it("is a three multiple", function () {
... |
onload=function(){
var startText;
var restartText;
var welcome;
var gameover;
var spend=0;
var str="";
var bootState = function(game){
this.preload=function(){
game.load.image('loading','assets/preloader.gif');
};
this.create=function(){
game.state.start('loader');
};
}... |
import {
POST_USER_ANSWERS_QUESTION_REQUEST,
POST_USER_ANSWERS_QUESTION_SUCCESS,
POST_USER_ANSWERS_QUESTION_FAILURE,
GET_USER_ANSWERS_QUESTION_REQUEST,
GET_USER_ANSWERS_QUESTION_SUCCESS,
GET_USER_ANSWERS_QUESTION_FAILURE,
} from '../constants/userAnswersQuestion.constants';
import api from '../... |
(function () {
'use strict';
angular.module('events.admin')
.directive('manageEvent', manageEventDirective);
function manageEventDirective () {
ManageEventDirectiveCtrl.$inject = ['$scope', '$log'];
return {
restrict: 'A',
templateUrl: 'partials/admin/manag... |
const fs = require('fs');
const data = new Float32Array([
0, 0, 0, 0,
150, 0, 1, 0,
0, 150, 0, 1
]);
fs.writeFile('data.data', data, { mode: null }, console.log); |
import React, { Component } from "react";
import { Route } from "react-router-dom";
import { connect } from "react-redux";
import CollectionOverview from "../../components/collection-overview/CollectionOverview";
import CollectionPage from "../collection/CollectionPage";
import { fetchCollectionsStartAsync } from "../.... |
import Row from "../row";
import "./board.css";
function Board() {
const arr = new Array(8).fill().map((a, i) => <Row rowNumber={i} />);
return arr;
}
export default Board;
|
// External libraries
const mongoConnection = require('rps-mongoconnection-module');
module.exports = mongoConnection;
|
module.exports = function(collection){
collection.find({}).toArray(function(err,res){
if (err) {return console.log(err)}
console.log(res);
});
}
|
const Command = require("../handlers/command.js");
module.exports = class extends Command {
constructor(client, filePath) {
super(client, filePath, {
name: "commands",
aliases: ["cmds"]
});
}
execute(message) {
const prefix = this.client.config.prefix;
... |
import React from 'react';
const Loading = React.memo(() => {
return (
<div className='italic'>
Loading...
</div>
)
})
export default Loading |
import React, {useState} from 'react';
function SinglePostHooks(props) {
const post = props.post
const [state, setState ] = useState({
subject: props.post.get("subject"),
body: props.post.get("body"),
by: props.post.get("by"),
like: props.post.get("like"),
... |
const readCourses = (router, asyncHandler, Course, User) => {
router.get('/courses', asyncHandler(async (req, res) => {
// find all courses, excluding certain attributes
const courses = await Course.findAll({
attributes: { exclude: ['createdAt', 'updatedAt'] },
// include ass... |
import React, { useState } from "react";
import { Route, Switch, BrowserRouter as Router } from "react-router-dom";
import Login from "./components/Login";
import Signup from "./components/Signup";
import Dashboard from "./components/dashboard";
import NotFound from "./components/NotFound";
import { ToastContainer } fr... |
import React , { Component } from 'react';
import {
StyleSheet,
Text,
View,
TouchableOpacity
} from 'react-native' ;
class Layout extends Component {
constructor() {
super()
this.state = {
inputText: "",
calculationText: ""
}
this.operat... |
document.onkeyup = KeyCheck;
var tbox = document.getElementById('a_tbox')
var tetris = document.createElement('canvas');
tetris.height=300;
tetris.width=600;
document.body.appendChild(tetris);
board=
[
[0,0,0,0,0,0,0,0,0,0,],//a
[0,0,0,0,0,0,0,0,0,0,],
[0,0,0,0,0,0,0,0,0,0,],[0,0,0,0,0,0,0,0,0,0,],[0,0,0,0,0,0,0,0,... |
function arrayToList(array)
{
var list = null;
for (var i = array.length - 1; i >= 0; i--)
{
list = { value: array[i], rest: list };
}
return list;
}
function arrayToListRec(array, index)
{
var list = {};
if (array[index] == undefined)
{
return null;
... |
import React, { useContext, useState } from 'react';
import { EmployeeContext } from '../contexts/EmployeeContext';
const AddEmployee = () => {
const { addEmployee } = useContext(EmployeeContext);
const formValue = {
fullname: '', age: '', position: ''
}
const [ form, setForm ] = useState(form... |
import React, { Component } from 'react';
import { DragSource } from 'react-dnd';
/**
* We use to connect the React DnD event handlers to some node in the component
* We use to pass some knowledge about the dragging state to our component
* With that we inject that special props into the component
* @param connect... |
import { convertArrayToTree } from '@/utils/collection';
const getChildMenuByIndex = (menus = [], index = 0) => {
if (!menus.length) return [];
return menus[parseInt(index, 10)].children;
};
export default {
treeMenu(state, getters) {
const convertMenu = state.menu.menuList.map(item => {
item.alias = ... |
import data from '../data/data.json';
const initalState = {
itemsList: data,
cart: [],
wishlist: [],
// qty: 0
}
const rootReducer = (state = initalState, action) => {
switch (action.type) {
case 'ADD_TO_CART': {
let itemExistsInCart = state.cart.find( item => item.id === acti... |
// creating a module
// there are two ways of creating a module
// you can create or chain as many as controllers you want in this single file
/**
* Scope is an object that refers to the application model.
* Definition [Scope]:- is the binding part between ___ and ___
* is an {} with properties and methods
* is av... |
import React, { Component } from "react";
import "./Featured.css";
const Featured = props => {
return (
<div className="card-columns">
{props.profiles.map(val => (
<div class="card">
<img class="card-img-top" src={val.imageURL} />
<div class="card-body">
<h5 class="c... |
let btn = document.querySelector("#btn");
let outPut = document.querySelector("#outPut");
let random = [Math.floor(Math.random() * 10)];
function randomGame() {
let input = document.querySelector("#input").value;
if (input == random) {
outPut.innerHTML = `you guessed right, it was ${random}!!!`;
document.... |
import React, {Component, PropTypes} from 'react';
import {CrewCharacter, CrewUpgrade} from '../components';
import {LEADER_REGEXP} from '../constants/RegExps';
import {isUpgradable} from '../utils/UpgradeValidations';
export default class CrewList extends Component {
render() {
const {
characters,
a... |
var config = {
type: 'line',
data: {
labels: [],
datasets: []
},
options: {
maintainAspectRatio: false,
responsive: false,
title: {
display: true,
// text: 'Chart.js Line Chart'
},
tooltips: {
mode: 'index',
intersect: false,
},
hover: {
mode: '... |
var cmajor = {};
cmajor.yo = function () {
var oscs = [], o, i, freqs = [261.63, 329.63, 392];
freqs.forEach(function(freq) {
o = audio_context.createOscillator();
o.frequency.value = freq;
o.connect(audio_context.destination);
o.noteOn(0);
oscs.push(o);
});
this.... |
function loader(element) {
return new Promise((resolve, reject) => {
element.addEventListener('load', () => {
resolve();
});
element.addEventListener('error', e => {
reject(e);
});
document.head.appendChild(element);
});
}
function importScript(url) {
const script = document.creat... |
'use strict';
const path = require('path');
const fs = require('fs');
const electron = require('electron');
const app = electron.app;
const appMenu = require('./menu');
const config = require('./config');
const tray = require('./tray');
if (require('electron-squirrel-startup')) return;
require('electron-debug')();
re... |
function _init() {
px = 300
py = 300
sx = 300
sy = 200
vx = 1.4
vy = 0
MG = 300
font('30px Moonbeam')
}
sign = Math.sign
function _main() {
sx += vx
sy += vy
rx = sx-px
ry = sy-py
r2 = rx*rx + ry*ry
f = MG / r2
dvx = sign(rx) * f * rx*rx / r2
dvy = sign(ry) * f * ry*ry / r2
vx -= dvx
vy -= dvy
st... |
import React, { memo } from 'react';
import styles from './styles.module.css';
function Button({ onClick, children }) {
return (
<button onClick={onClick} className={styles.button}>
{children}
</button>
);
}
export default memo(Button);
|
import React from "react";
import '../../App.css';
function Columbine() {
return (
<div className="header-modal">
<div className="flexContainer">
<div className="flexside">
<h3>Wellsite Geologist</h3>
<h4>Fort Worth, TX / Midland, TX</h4>
<... |
import { GetPlans } from '../services/plans';
import { Emitter } from '../../../helpers/emitter';
class PlansController {
static async Get(req, res) {
let response;
try {
const plans = await GetPlans(req.query);
if (plans.length) {
response = {
status: 200,
data: plans... |
/// <reference types="cypress" />
context('Casos de Sucesso', () => {
beforeEach(() => {
cy.visit('/')
})
it('Cadastro com sucesso ', () => {
const EMAIL = "test"+new Date().getTime()+"@test.com"
const SENHA = "Va654321"
cy.cadastro("Test Bossa",EMAIL,SENHA,"Va654321",true)
cy.get('bu... |
// vue.config.js
module.exports = {
publicPath:
process.env.NODE_ENV === "production" ? "/presentation_template/" : "/",
chainWebpack: config => {
const svgRule = config.module.rule("svg");
svgRule.uses.clear();
svgRule
.use("vue-svg-loader")
.loader("vue-svg-loader")
.options({
... |
// Ex
let vielle_dame = {
age: 80,
nom: {
prenom: "murielle",
nom: "rodriguez",
},
moral: "mal",
objet: "canne",
parler (){
if (this.moral == "mal" ) {
alert("Vous me dérangrez bande salade rabes " + "coup de " + this.objet)
} else{
alert("b... |
import React from 'react'
import { Grid, Col, Image } from 'react-bootstrap'
import '../style/footer.css'
import Navigation from '../components/Navigation'
const Footer = () => {
return (
<div className={'footer-container'}>
<Grid>
<Col xs={12} sm={12} smOffset={2} >
<Image src=... |
#!/usr/bin/env node
const PdfService = require('./index');
const commandLineArgs = require('command-line-args');
const path = require('path');
const optionDefinitions = [
{ name: 'pagePath', type: String, alias: 'p', defaultOption: `${__dirname}/index.html` },
{ name: 'serverUrl', alias: 'u', type: String },
{ n... |
import Ember from 'ember';
import C from 'ui/utils/constants';
import { denormalizeName } from 'ui/services/settings';
export default Ember.Controller.extend({
github : Ember.inject.service(),
endpoint : Ember.inject.service(),
access : Ember.inject.service(),
s... |
import React, { Component, Fragment } from 'react';
import {
Text, View,
StyleSheet,
Dimensions,
TouchableOpacity,
Alert,StatusBar
} from 'react-native';
import Header from '../components/Header';
import getStringToColor from '../utils/getStringToColor';
import Course from '../utils/Course';
import AsyncStora... |
let count = 0;
const counter = {
increment() {
count += 1;
},
getCount() {
return count;
}
};
const app = (counter) => {
counter.increment();
};
test('app() with mock counter .toHaveBeenCalledTimes(1)', () => {
const mockCounter = {
increment: jest.fn()
};
app(mockCounter);
expect(mockCou... |
/**
* Created by wuyin on 2016/5/18.
*/
|
import Component from './Component';
export default class Shot extends Component {
getInfo() {
return this.info;
}
update() {
this.info.x += 20;
}
draw() {
const {x, y, w, h} = this.getInfo();
this.ctx.beginPath();
this.ctx.rect(x, y, w, h);
this.ctx... |
/* Copyright 2021 F5 Networks, Inc.
*
* 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 ... |
const db = require('./index')
const bcrypt = require('bcrypt')
const User = db.sequelize.define('user', {
name: { type: db.Sequelize.STRING, unique: true },
password: { type: db.Sequelize.STRING },
access_token: { type: db.Sequelize.STRING },
}, {
classMethods: {},
tableName: 'user',
freezeTableName: true,... |
// this is the mysql database plugin for accessing the queue store
var mysql = require('mysql');
// app opens the connection once only
var connect = function(app, host, port, database, user, password) {
connection = mysql.createConnection({
'host' : host,
'user' : user,
'password' : password,... |
'use strict';
//let x = alert('Alert Prompt Confirm');
//let x = prompt('Сколько тебе лет?');
//let x = confirm('Ты самый умный?');
//
//console.log(`Значение Х: ${x}`);
let name = prompt('Как тебя зовут?');
console.log(`Привет, ${name}`); |
"use strict";
const util = require('util');
const Message = require(__dirname + '/message');
const REQUIRED_ARGUMENTS = ["url"];
function UrlMessage(url, optionalKeyboard, optionalTrackingData, timestamp, token, minApiVersion) {
this.url = url ? encodeURI(url) : null;
UrlMessage.super_.apply(this, [REQUIRED_ARGUME... |
(function () {
angular
.module('myApp')
.controller('teacherScoreController', teacherScoreController)
teacherScoreController.$inject = ['$state', '$scope', '$rootScope', '$filter'];
function teacherScoreController($state, $scope, $rootScope, $filter) {
// ****************** router... |
const fetch = require('https');
const zApiKey = "d436351503c1a24f2215626e78067a16";
exports.handler = async (event) => {
console.log("getZomatoRestaurants");
var lat = event.latitude;
var lng = event.longitude;
const urlBase = 'developers.zomato.com';
var latitude = "lat=" + lat + "&";
var longitude = "lon... |
const Discord = require('discord.js');
const bot = new Discord.Client();
module.exports.run = async (bot, message, args) => {
let sImage = bot.guild.displayAvatarURl
let sEmbed = new Discord.RichEmbed()
.setColor('RANDOM')
.setThumbnail(sImage)
.setDescription(bot.guild.name)
.addField('Serverdaki kişi say... |
const express = require('express');
const router = express.Router();
const userSchema = require('../models/user');
const deviceSchema = require('../models/device');
const snmpAgentSchema = require('../models/snmp_agent');
const agentController = require('../controllers/snmpagents');
const deviceController = require('..... |
const React = require("react");
const NotFound = () => (
<div>
<p>404!</p>
</div>
)
export default NotFound |
import { merge, withStatus, withBody } from "litera";
import { isDatabaseError } from "./utils";
// probably move to litera-knex-error-handler
export const errorHandler = atom => async (req, data) => {
try {
return await atom(req, data);
} catch (err) {
if (isDatabaseError(err)) {
return merge(
... |
const {google} = require('googleapis');
const authorize = require("./sheets_auth");
// Main code (using sheets_auth)
authorize(listMajors);
/**
* Prints the names and majors of students in a sample spreadsheet:
* @see https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit
* @para... |
import {mergeReducer, isFunction} from './index';
function checkAsyncHandlers (handlers) {
const {onWait, onSuccess, onFail} = handlers;
const errMessage = (fnName) => `Expected that the ${fnName} will be a function, and will returns new state`;
if (!isFunction(onWait)) {
throw new Error(errMessag... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.