text stringlengths 7 3.69M |
|---|
const mongoose = require('mongoose');
// connection à la base de donnée (le serveur mongo doit être lancé et la base doit avoir ét créée)
mongoose.connect("mongodb://localhost/mydb");
const models = require('./models');
User = models.User;
Todo = models.Todo;
// crée un User avec un name et un email
User.create(
... |
import React, { useEffect, useState } from 'react';
import './style.css';
import Header from '../../components/UI/homePageLayout/header';
import BodyContainer from '../../components/UI/homePageLayout/bodyContainer';
import Navbar from '../../components/UI/homePageLayout/navbar';
import { useDispatch, useSelector } from... |
import React from "react";
import { ApolloClient, InMemoryCache } from "@apollo/client";
import { ApolloProvider } from "@apollo/client/react";
import { SchemaLink } from "@apollo/client/link/schema";
import { makeExecutableSchema } from "@graphql-tools/schema";
import { addMocksToSchema } from "@graphql-tools/mock";
i... |
import {useEffect, useState} from "react";
import {client} from '../utils';
import {createContext} from "react";
export function useMocks() {
const [mocks, setMocks] = useState(null);
const [error, setError] = useState(null);
const isLoading = mocks === null && error === null;
const hasError = Boolean(... |
/*
GAME RULES:
- The game has 2 players, playing in rounds
- In each turn, a player rolls a dice as many times as he whishes. Each result get added to his ROUND score
- BUT, if the player rolls a 1, all his ROUND score gets lost. After that, it's the next player's turn
- The player can choose to 'Hold', which means th... |
"use strict";
const modFs = require("fs"),
modPath = require("path"),
modMime = require("./mime.js"),
modVfs = require("./vfs.js");
/* Creates a hierarchy of directories recursively.
*/
function mkdirs(path, callback)
{
var dir = modPath.dirname(path);
var name = modPath.basename(path);
... |
import Vue from "vue";
import Vuex from "vuex";
import localforage from "localforage";
import VuexPersistence from "vuex-persist";
import shuffle from "../helpers/shuffle";
Vue.use(Vuex);
const vuexLocal = new VuexPersistence({
storage: localforage
});
const state = {
veggies: [],
months: [],
favorites: {},
... |
import React, {Component} from "react";
import Home from "./screens/Home";
import SideBar from "./SideBar";
import About from "./About";
import {DrawerNavigator} from "react-navigation";
const DrawerScreenRouter = DrawerNavigator(
{
Home: {screen: Home},
About: {screen: About}
},
{
... |
exports.help = {
name: "emoji",
description: "Get some info on a emoji",
usage: "emoji <:emoji:>",
type: "general"
};
const Discord = require("discord.js")
exports.run = async(client, message, args) => {
let emoji = args[0]
let regex = /<?(a)?:?(\w{2,32}):(\d{17,19})>?/
let unicode... |
/*
* @Author: baby
* @Date: 2016-07-12 09:53:05
* @Last Modified by: mikey.zhaopeng
* @Last Modified time: 2016-09-01 09:47:05
*/
'use strict';
require("babel-core/register");
// function testable(target) {
// target.isTestable = true
// }
// @testable
// class MyTestableClass {}
//
// console.log(MyTesta... |
import test from 'ava';
import request from 'supertest-as-promised';
import server from '../build/server';
test('role:GetAll', async t => {
t.plan(2);
const res = await request(server(5000))
.get('/role')
.send();
const roles = res.body;
t.is(res.status, 200, 'gets a 200 response');
t.true... |
import React, { Component } from 'react';
import { List, ListItem, ListItemContent, ListItemAction, Icon} from 'react-mdl';
class Contact extends Component{
render(){
const icons = {
phone: 'url(https://img.icons8.com/carbon-copy/2x/phone.png) center / cover',
email: 'url(http://cdn... |
import React from "react";
import { pages } from "./navigation";
export const createLoadBeerList = (actions, router) => ({
view: model => (
<div>
<a href={router.getLink(pages.breweryBeerList.id, {breweryId: model.brewery.id})}
>Load beer list</a>
{" "}
<button className="btn btn-default... |
'use strict';
const chai = require('chai');
const should = chai.should(); // eslint-disable-line
const expect = chai.expect; // eslint-disable-line
const chaiHttp = require('chai-http');
chai.use(chaiHttp);
const ApiServer = require('../../../src/ApiServer');
const TEST_NAME = 'Test ApiServer and ResponseHelper';
l... |
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import moxios from 'moxios';
import expect from 'expect';
import { editComment } from '../comment';
const middlewares = [thunk];
const mockStore = configureMockStore(middlewares);
describe('comment actions', () => {
beforeEach(fu... |
var box = document.getElementById('box');
var screen = box.children[0];
var ul = screen.children[0];
var ol = screen.children[1];
var arr = document.getElementById('arr');
var arrLeft = document.getElementById('left');
var arrRight = document.getElementById('right');
... |
$(document).ready(function(){
$('p').hide(2000);
}); |
var MongoDB = require('mongodb').Db;
var Server = require('mongodb').Server;
var mongoose = require('mongoose');
var assert = require('assert');
var isDev = process.env.OPENSHIFT_MONGODB_DB_URL ? false:true;
if (!isDev) {
var dbPort = process.env.OPENSHIFT_MONGODB_DB_PORT;
var dbHost = process.env.OPENSHIFT_... |
function completeCampaign( id ) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var url = "/api/campaigns/"+id+"/complete";
$.post(url, function (response) {
console.log( response.msg );
location.reload();
})... |
const router=require("koa-router")();
const mysql=require("../utils/mysql");
router.get("/cate",async ctx=>{
const sql="SELECT a.YPLB AS cate,COUNT(b.YPBM) AS count,a.LBMC AS cate_name FROM base_ypxx_yplb a LEFT JOIN base_ypxx b ON a.YPLB=b.YPLB WHERE a.STATUS=1 AND a.LBMC <> '其他' AND a.YPLB_GRADE=? AND a.PORGID=?... |
import React from 'react'
export default function QuanLyNguoiDungModal() {
return (
<div>
mo dal
</div>
)
}
|
/**
* [serialize 序列化表单]
* @parts {[Array]} form [保存将要创建的字符串的各个部分]
* @field {[HTMLCOLLECTION]} form [表单的子元素集合]
* @param {[type]} form [description]
* @param {[type]} form [description]
* @return {[type]} [description]
*/
function serialize(form) {
var parts = [],
field = null,
i,
len,
j,
optLen,
o... |
import React, { useState } from "react";
import PropTypes from "prop-types";
import cn from "classnames";
import styles from "./Tabs.module.css";
const Tabs = ({ tabs }) => {
const [activeTabIndex, setActiveTabIndex] = useState(0);
const tabHandler = (index) => setActiveTabIndex(index);
const { Content, props... |
import { Skeleton } from 'antd';
function SkeletonLoading(props) {
const { loading, children } = props;
return (
<Skeleton
active
loading={loading || true}
>
{ children ? '' : children }
</Skeleton>
);
}
export default SkeletonLoading; |
import {combineReducers} from 'redux';
import {restaurantReducer} from "./restaurantReducer";
export default combineReducers({
restaurant: restaurantReducer,
}); |
import React from 'react';
import{
AppRegistry,
StyleSheet,
View,
Text,
TouchableHighlight,
TouchableOpacity
} from 'react-native';
export default class Comp1 extends React.Component{
onPress3(item){
switch (item){
case 1:
console.log('Area1 Pressed');
break;
case 2:
console.log('Ar... |
const dotenv = require("dotenv");
const line = require('@line/bot-sdk');
dotenv.config()
const TOKEN = process.env.LINE_ACCESS_TOKEN
const CHANNEL_ID = process.env.CHANNEL_ID
const client = new line.Client({
channelAccessToken: TOKEN
});
module.exports = {
TOKEN,
CHANNEL_ID,
client
} |
import React from 'react'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { push } from 'react-router-redux'
import omit from '../../util/omit'
import TextInput from '../../components/TextInput'
import Button from '../../components/Button'
import Tag from '../../components/Tag'... |
import styles from "./Table.module.css";
import React, { Component, Fragment } from "react";
import Table from "../antd/Table";
import Pagination from "../antd/Pagination";
const PAGE_SIZE_OPTIONS = ["10", "20", "50", "100"];
class CBTable extends Component {
handleTableChange = (pagination, filters, sorter) => {
... |
// import React from 'react'
// import SVG from 'react-svg-inline'
// // import Logo from 'img/recipelist/branding.svg'
// const Recipelist = () =>
// <div>
// <section className="container full">
// <div className="col-12-of-12">
// {/* <img
// src={require('img/recipelist/macbook.jpg')... |
var bannedIpAddress =
{
init: function (validationErrorIcon, deleteUrl) {
$.validator.addMethod(
'validIpAddress',
function (value, element) {
return this.optional(element) || /^((25[0-5]|2[0-4][0-9]... |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ re... |
define([
'jquery',
'underscore',
'backbone',
'domReady',
'router',
'models/login',
'models/post',
'models/comment',
'collections/user',
'collections/post',
'collections/comment',
'views/home',
'views/navbar',
'views/search',
'views/login',
'views/user/list',
'views/post/list',
'view... |
import React, { Component } from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import NavBar from './components/NavBar'
import Header from './components/Header'
import Main from './components/Main'
import Travel from './components/Travel'
import TechEvents from './components/TechEvents'
impo... |
import React , {Component} from 'react';
import {Button} from 'reactstrap';
import {MAIN_API} from '../../service/apiService.js';
import {NotificationContainer, NotificationManager} from 'react-notifications';
class DeleteCellRender extends Component {
/**
*
*/
constructor(props) {
super(pro... |
function even_group_calculate_average(arr) {
var res = [];
var even = [];
for(var i = 1; i < arr.length; i += 2 ){
if(arr[i] % 2 == 0){
even.push(arr[i]);
}
}
var param = 10;
for(var i = 0; i < 10; i++ ){
var tmp = 0;
var count = 0;
for(var j = 0; j < even.length; j++ ){
if(M... |
/**
* Export all helpers
* @type {Object}
*/
module.exports = {
hashString: require('./lib/hashString'),
isFile: require('./lib/isFile'),
readJsonFile: require('./lib/readJsonFile'),
removeFile: require('./lib/removeFile'),
writeFile: require('./lib/writeFile'),
/**
* All classes
*/
Request: req... |
$(function(){
//pop 視窗控制
$.fn.extend({
//重新給定搜尋窗的值
setSearchBox: function(list) {
_parents=$(this).closest("[alt=popWindow]")
popWindow_SearchBox=$(_parents).find("[alt=popWindow_SearchBox]");
$(popWindow_SearchBox).html("");
searchList="";
if($(list).len... |
/*
* @Author: xr
* @Date: 2021-04-10 21:48:08
* @LastEditors: xr
* @LastEditTime: 2021-04-19 17:20:56
* @version: v1.0.0
* @Descripttion: 功能说明
* @FilePath: \api\apis\private\admin.js
*/
const express = require('express');
const router = express.Router();
const { getAdminPage, deleteAdmin, updateAdmin, addAdmin ... |
export default ({
'G': [{src:'videos/ga-met.mp4',type:'video/mp4'},{src:'videos/ga-met.webm',type:'video/webm'}],
'M': [{src:'videos/mien-tron.mp4',type:'video/mp4'},{src:'videos/mien-tron.webm',type:'video/webm'}],
'B': [{src:'videos/banh-canh-ghe.mp4',type:'video/mp4'},{src:'videos/banh-canh-ghe.webm',typ... |
const checkStats=(NodeStats)=>{
NodeStats.on('update',(stats)=>
{
console.log('Lastest Stats:%j',stats);
const snapshot = stats.snapshot
console.log('stats: %j', snapshot)
});
}
module.exports.Stats=checkStats;
|
// 加载
require('../css/chatScreen.css')
require('../css/icons.css')
var Recorder = require('./recorder.js')
// 文件下标计数
var fileId = 0;
// 文件数组容器
var fileArray = [];
// 视频文件发送
var videoFile;
// 长按录音
var luyin;
//文件消息初始
var fileInitial = () => {
fileId = 0;
fileArray = [];
};
var EmojiSourcePeople = [
"\u263a", "\u... |
var interface_c1_connector_register_user_response_public =
[
[ "C1ConnectorRegisterUserPublicBlock", "interface_c1_connector_register_user_response_public.html#a519c491976ebc6e0663582450fe1c458", null ],
[ "user", "interface_c1_connector_register_user_response_public.html#ab7ba93623fb10f4914d957b763812aca", nul... |
// Given a binary tree t, determine whether it is symmetric around its center, i.e.each side mirrors the other.
// build a binary tree. *currently unused.*
function Tree(x) {
this.value;
this.left = null;
this.right = null;
}
// recursive check symmetry helper function
const checksymm = (left, right) => ... |
let mongoose=require('mongoose');
let Schema=mongoose.Schema;
let userSchema=new Schema({
email:{
type:String,
required:true,
unique:true
},
user_name:{
type:String,
required:true,
unique:true
},
password:{
type:String,
r... |
// function SocketCollectedPriceInfo(){
//
// }
class SocketCollectedPriceInfo{
constructor(protocol, exchange, quoteA, quoteB, price, height) {
this.protocol = protocol;
this.exchange = exchange;
this.quoteA = quoteA;
this.quoteB = quoteB;
this.price = price;
this.h... |
import React from 'react';
import Social from './Social';
import Body from './Body';
function Card(props) {
return (
<div className="card">
<div className="body">
<Body />
</div>
<div className="social">
<Social />
</div>
</div>
);
}
export defau... |
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const { repos } = require('./repos');
const cogs = require('./cogs');
const mocks = require('./mocks');
const { parser } = require('./parser');
const github = require('./github');
const users = require('./users');
const panel = re... |
// require("babel/polyfill");
let foo = (a, b) => a + b
var x = 4;
var u = "ustun";
if (u.endsWith == "un") {
console.log("ok ends with");
}
console.log(`Hello ${1+3}`);
let calculate = () => {
let j = 10;
for (let i = 0; i < 10; i++) {
let j = i + 5;
console.log("i", j);
}
}... |
import React from 'react'
import { connect } from 'react-redux'
import { StyleSheet } from 'quantum'
import Swipeable from 'react-swipeable'
import { openMobileMenu, closeMobileMenu } from '../actions'
import { RowLayout, Layout, AutoSizer } from 'bypass/ui/layout'
import Header from './Header'
import Footer from './Fo... |
module.exports = {
logging: function() {
return require('./log');
},
config: function() {
return require('./config');
},
wxs: function() {
return require('./wxs');
}
};
|
//libraries
let dictionary = [
'phlegm',
'deciduous',
'conscientious',
'daiquiri',
'exhilarate',
'hierarchy',
'mischievous',
'questionnaire',
'diarrhea',
'awkward',
'bagpipes',
'fjord',
'haphazard',
'jukebox',
'memento',
'numbskull',
'ostracize',
'rhythmic',
'wildebeest'
];... |
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.controllers' is found in controllers.js
ang... |
var user = prompt("Which one do you want to enter (NAME || AGE)?");
function user(name, age) {
document.write (name + " is " + age + " years old.");
}
(user == "name") ? alert("your name is " + prompt("please enter your name.") + "your name is"): alert("your age is " + prompt("please enter your age.") + " years ... |
var myUserId = "jNDvvE3w8Hh9EEW0yIwp2ogO2Hl1"
module.exports = matchesMap = {
"06zLPWzLrKYQZCjYQV9v": {
"userId": myUserId,
"result": "loss",
"isCurrentSRChanged": false,
"map": "Busan",
"newSR": 3648,
"heroes": [
"Winston",
... |
import React from 'react'
const heroIconSize = 32
const mapCenter = 200 - (heroIconSize / 2)
export const mapScale = 400
export default (player, k) => <i
key={k}
className={`d2mh hero-${player.hero_id}`}
style={{
position: 'absolute',
transition: '0.8s',
left: `${(player.x * mapScale) + mapCenter}px... |
export default {
baseUrl: "https://kitapunya.setakarim.xyz/api/v1"
// baseUrl: "http://192.168.1.12:8000/api/v1"
} |
import React, { Component } from 'react';
import Header from './header';
import OnlineList from './onlineList';
import UsersAPI from '../api/users';
export default class App extends Component {
state = {
shouldUpdateList: false,
username: ''
}
componentDidMount() {
if (localStorage.username && loc... |
const test = require('tape');
const btoa = require('./btoa.js');
test('Testing btoa', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof btoa === 'function', 'btoa is a Function');
t.equals(btoa('foobar'), 'Zm9vYmFy', 'btoa("foobar... |
const url = require('url');
const spawn = require('child_process').spawn;
module.exports = function (params) {
const snmp_client = spawn('python3.6', [__dirname + '/snmp_V3.py', '-host', params.relay.uri, '-user', params.relay.username, '-password', params.relay.password]);
snmp_client.stdout.on('data', (data) =>... |
// const tampilNama = function (nama) {
// return `Hallo, ${nama}`
// }
// console.log(tampilNama('Juang'))
// const tampilNama = (nama) => { return `Hallo, ${nama}` }
// console.log(tampilNama('Juang'))
// const mahasiswa = ['Bangkit Juang Raharjo', 'Muhammad Mujahid Muslim', 'Rahmat Bagus Latami']
// const j... |
// Source: https://leetcode.com/problems/shuffle-the-array/
// nums = array; n = first el post x, and start el of y
// i.e. x[],y[n]
const shuffle = (nums, n) => {
// This check isn't necessary for this challenge.
// if(n === nums.length || n===0) {
// return nums;
// };
let result_arra... |
//https://stackoverflow.com/questions/28440262/web-audio-api-for-live-streaming/62870119#62870119
//https://sonoport.github.io/web-audio-clock.html (muy buena explicacion)
//https://www.html5rocks.com/en/tutorials/audio/scheduling/ (no entendi mucho)
/* Schedule e interfaz grafica */
const durSamp = 512.0... |
import * as types from './userActionTypes';
import codeClanApi from '../../api/apiUtils';
export const getUserProfileApi = () => {
return dispatch => {
dispatch({ type: types.USER_START });
return codeClanApi
.get('profile')
.then(res => {
dispatch({ type: types.USER_SUCCESS, payload: res... |
/**
* Function to check if datatype of a given value is of reference type
* @param {*} value - value to be checked
* @returns {Boolean} - true if the given value is reference type; false otherwise
*/
const checkReferenceType = (value) => {
if (value) {
return typeof value === "object" || typeof value === "fun... |
// actions 提交的是 mutation, 而不是直接变更状态
// Action 通过 store.dispatch('setEmpirical') 方法触发
export default {
setEmpiricalAsync: (context) => {
setTimeout(() => {
context.commit('setEmpirical', 10); // context提交
}, 2000);
}
};
|
import React from "react";
import "../../../grid.css";
import "./dinner.css";
import img1 from "../../../img/Eating/dinner/1b____horizontal.jpg";
import img2 from "../../../img/Eating/dinner/20200504_165630____horizontal.jpg";
import img3 from "../../../img/Eating/dinner/detailtietkiem____horizontal.png";
const Dinne... |
define([
'models/BaseCollection',
'models/ImageModel'
], function(BaseCollection, ImageModel) {
'use strict';
var ImageCollection = BaseCollection.extend({
model: ImageModel
});
return ImageCollection;
}); |
import React from 'react';
import {YMaps, Map, Placemark, ZoomControl} from 'react-yandex-maps';
import './location.css';
const Location = ({x, y, zoom, conf}) => {
return (
<div className={"location"}>
<YMaps >
<Map defaultState={{center: [x, y], zoom: zoom, behaviors: ['drag... |
function CGame(bChallengeMode){
var _bChallengeMode;
var _fGravityIncrease;
var _iScore = 0;
var _iHiScore = 0;
var _iTimeElaps;
var _oBall;
var _oInterface;
var _oPlayer;
var _oEndPanel;
this._init = function(bChallengeMode){
_bChallengeMode = bChallengeMode;
... |
import React, { useEffect, useState } from 'react'
import CourseNavbar from '../Navbars/CourseNavbar'
import { useDispatch, useSelector } from 'react-redux'
import { clearCurrentCourse, setCurrentCourse } from '../../store/courses/reducer'
import { clearLessons, setLessons } from '../../store/lesson/reducer'
import { g... |
// some logics are learned from linkedin Learning JavaScript Essential Training
//global constant variables(some were given)
const testWrapper = document.querySelector(".test-wrapper");
const testArea = document.querySelector("#test-area");
const originText = document.querySelector("#origin-text p"); //had to remove in... |
const express = require('express');
const router = express.Router();
const is_admin = require("../../middleware/admin/is-admin")
const controller = require("../../controllers/admin/users")
const userModel = require("../../models/users")
const globalModel = require("../../models/globalModel")
const multer = require("mul... |
import React from 'react'
export default function ChildComponent(props) {
const {changeMes} = props;
return (
<div>
<button onClick = {() => {changeMes('child')}}>Send message to parent component</button>
</div>
)
}
|
var logger = require("../utils/logger");
var SuperDappCall = require("../utils/SuperDappCall");
var locker = require("../utils/locker");
// inputs: limit, offset
app.route.post('/issuers', async function(req, cb){
logger.info("Entered /issuers API");
var total = await app.model.Issuer.count({
deleted... |
routerApp.controller('homeCtrl', function ($rootScope, $scope) {
$scope.cur_view = 'f';
var date = new Date();
var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
$scope.facilities = [
{'img':'img/background1.jpg', 'loc':'HSR sector 1','name':'Pretty Hate Machine ','des':'Nine Inch Nails,Nin... |
import React from 'react'
import Message from './components/Message'
import Time from './components/Time'
import Counter from './components/Counter'
import StopWatch from './components/Stopwatch'
import Amount from './components/Amount'
import { Euro, Pound } from './components/Currency'
import TemperatureCalculator fr... |
/*
MODULES
*/
const chalk = require('chalk');
const path = require('path');
const fs = require('fs');
const Discord = require('discord.js');
const bot = new Discord.Client();
const modules = require('./modules/modules_manager.js');
const hidden = require('../../tuba kun hidden/export.js');
var firstRun = true;
... |
module.exports = {
"Dragon Ward": {
name: "Dragon Ward"
description: "Allies adjacent to the user have a Luck x 0.5% chance of receiving half damage from enemy attacks",
class: ["Hoshido Noble"],
level: 5,
cost: "1500"
},
"Hoshidan Unity": {
name: "Hoshidan Unity"
description: "Adds 10... |
import React from 'react';
import {Link, IndexLink} from 'react-router';
import {orange500, blue500} from 'material-ui/styles/colors';
const Header = ({onLogout}) => (
<div>
<div>
<h3>Portfolio</h3>
</div>
<div>
<nav>
<div className="nav-wrapper">
... |
const cheerio = require('cheerio');
const request = require('request');
//Functions
const checkUrl = require('./checkUrl')//Function to check if url is relative or direct
const collectLinks = require('./collectLinks'); // Function to collect all urls from the body of the page
module.exports = function visitUrl(url ,... |
import React, { Component } from "react";
import { Nav, Navbar, Container } from "react-bootstrap";
import logo from "../assets/logo5.png";
export class Footer extends Component {
render() {
return (
<Navbar
variant="dark"
style={{ backgroundColor: "#F6E6CB" }}
className="justify-con... |
import React from 'react';
const Notes = () => (
<div>
<div className="header-home-section">
<span>Notes</span>
</div>
</div>
);
export default Notes; |
const fakeAuthorization = (email, password) => {
if (email === 'demo@demo.com' && password === 'demo') {
localStorage.setItem('user-token', 'js-token-demo');
return true;
}
return false;
};
export default fakeAuthorization;
|
import colors from 'vuetify/es5/util/colors'
export default {
primary: colors.indigo.lighten1,
secondary: colors.deepPurple.lighten5, // colors.blue.lighten4
tertiary: "#E81087",
accent: colors.blue.lighten1,
}
|
var clonemerge = require('../');
exports.clonemerge = {
"Clone": function(test) {
var source = { a: 1, b: 2 };
var copy = clonemerge(source);
copy.b = 3;
test.expect(2);
test.equal(source.b, 2);
test.equal(copy.a, 1);
test.done();
},
"Merge": fu... |
/*
Global Banner Ad Control:
===============================================================================
*/
(function (win) {
win.define("banner-ads", ["jquery"], function ($) {
win.AdServ = win.AdServ || {
adspaces: []
};
var drBannerAds = {
/*
Define each banner id's for ea... |
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
var __rest = (this && this.... |
import React from "react";
// components
export default function CardSocialTraffic() {
return (
<>
<div className="relative flex flex-col min-w-0 break-words bg-white w-full mb-6 shadow-lg rounded">
<div className="rounded-t mb-0 px-4 py-3 border-0">
<div className="flex flex-wrap items-... |
/**
* author: Chris Holle
* file: meridianTheme.js
*
* Description:
* Meridian theme. Contains colors and other branding.
*/
let meridianTheme = {
primary: "#55c7b1",
secondary: "#3a9483",
}
export default meridianTheme
|
'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.bulkInsert('Rooms', [{
number: 200,
available: true,
capacity: 200,
createdAt: new Date(),
updatedAt: new Date()
}, {
number: 325,
available: false,
capacity: 150,
... |
/*
* moveWarehouseUpcSwapController.js
*
* Copyright (c) 2016 HEB
* All rights reserved.
*
* This software is the confidential and proprietary information
* of HEB.
*/
'use strict';
/**
* Controller to support the page that allows users to move a warehouse upc to a new item code.
*
* @author m314029
*... |
import angular from 'angular'
import Graph from '../../../egraph/src/graph'
import graphDirective from "../directives/graph"
const modName = 'ece.directives.example3';
const template = `
<div ng-repeat="graph in example3.graphs">
<graph graph="graph"/>
</div>
`;
angular.module(modName, [graphDirective]).config(($r... |
/* global SCOUTFILE_APP_CONFIG */
'use strict';
module.exports = SCOUTFILE_APP_CONFIG;
|
const fs = require('fs');
var fetchNotes = function() {
try{
var notesString = fs.readFileSync('notes_data.json');
return JSON.parse(notesString);
}
catch (e) {
return [];
}
}
var saveNotes = function(notes) {
fs.writeFileSync('notes_data.json', JSON.stringify(notes));
}
... |
'use strict';
// Setting up route
angular.module('users').config(['$stateProvider', function ($stateProvider) {
// Users state routing
$stateProvider.state('profile', {
url: '/settings/profile',
views: {
'aside': { templateUrl: 'modules/core/views/sidebar/todo.client.view.html' },
'main-view': {
templ... |
const Play = require('../models/Play');
async function createPlay(playData){
const play = new Play(playData);
return play.save();
}
async function getAllPlays(orderBy){
if(orderBy == 'likes') {
return Play.find({ public: true }).sort({ usersLiked: 'desc' }).lean();
}
return Play.find({ pub... |
module.exports = function(Referencia) {
};
|
var argv = process.argv;
argv = argv.slice(2);
console.log(argv.join(" "));
|
import { makeStyles, Button, Grid } from "@material-ui/core";
import Link from "next/link";
const styles = makeStyles((theme) => ({
box: {
width: "75%",
margin: "15px auto",
},
rainbowText: {
background:
"linear-gradient(45deg, rgba(255, 0, 255, 1) 0%,rgba(0, 255, 255, 1) 100%)",
WebkitBackgroundClip: "t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.