text stringlengths 7 3.69M |
|---|
#!/usr/bin/env node
var port = process.env.PORT || 3000
var dotenv = require('dotenv').load({silent: true})
// dependencies
var express = require('express')
var logger = require('morgan')
var cookieParser = require('cookie-parser')
var bodyParser = require('body-parser')
var expressSession = require('express-session')
... |
import './src/page-tracker.js'; |
/// <reference path="familymembertemplate.html" />
(function () {
'use strict';
angular
.module('DivineChMS')
.controller('membersListCtrl', membersListCtrl);
membersListCtrl.$inject = ['$scope', 'DivineFactory', 'usSpinnerService', 'toastr', 'uiGmapGoogleMapApi'];
function membersLi... |
import logo from './logo.svg';
import './App.css';
import styled from "styled-components"
import SideBar from './Component/SideBar/SideBar';
function App() {
return (
<Container>
<Wrapper>
<Left>
<SideBar/>
</Left>
<Right>Right</Right>
</Wrapper>
</Container>
... |
import React, { useState } from "react";
import "bootstrap/dist/css/bootstrap.min.css";
import "../../App.css";
import "tailwindcss/tailwind.css";
import Spotify from "../../Components/Spotify";
import Weather from "../../Components/Weather";
import IMDB from "../../imdb/IMDB";
import Unsplash from "../../Components/U... |
/**
* 装饰者模式
* 动态地给一个对象添加一些额外的职责。
* 就增加功能来说,装饰者模式相比生成子类更为灵活
*/
//咖啡的抽象类
function Coffee() {}
Coffee.prototype = {
constructor:Coffee,
getPrice:function () {
throw new Error('这是一个抽象方法');
}
};
//咖啡的具体类,不带任何配料
function SimpleCoffee(price) {
this.price = price;
}
SimpleCoffee.prototype = Object.... |
import React from 'react';
import Button from '@material-ui/core/Button'
import { Menuitem } from "./Menuitem"
import './Navbar.css'
const Navbar = ({onButtonSubmit}) =>{
return(
<nav className="Navbar-items">
<h1 className="Nav-logo">WWW
... |
const colorMove = (newPlayer, color) => {
const newArray = [];
for (let item of color) {
const row = newPlayer[0] - item[0];
const column = newPlayer[1] - item[1];
const rowAbs = Math.abs(row);
const columnAbs = Math.abs(column);
if (rowAbs === columnAbs) {
newArray.push(item);
} else ... |
import * as config from './config';
/* global google */
const gm = google.maps;
const ge = gm.event;
const mt = gm.MapTypeId;
/**
*
*/
export default class OverlappingMarkerSpiderfier {
/**
* @param {google.maps.Map} map
* @param {Object} [options]
*/
constructor(map, optio... |
var strFns = function(str ){
strFns.str = str;
console.log('original strFns input: ', str );
return {
removeDuplicates: function(){
for (var i=0; i<strFns.str.length; i++ ){
for (var j=i+1; j<strFns.str.length; j++ ){
if (strFns.str[i] === strFns.str[j] ){
strFns.str.splice(j, 1);
j--;
... |
import React, { Component, Fragment } from 'react';
import { Link } from 'react-router-dom';
import { authUserLinks, authUserSubLinks, unauthUserLinks } from './header.js';
import { getCategories } from '../helpers/firebaseRequests.js';
import { AuthUserContext } from '../context/context.js';
import ROUTES from '../con... |
module.exports = function() {
return `
<link rel="dns-prefetch" href="//shopback.sg"/>
`
} |
import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import PasswordForgetForm from './PasswordForget';
import { auth } from '../firebase';
import * as routes from '../constants/routes';
import { byPropKey } from '../constants/utilities'
const SignInPage = ({ history }) =>
<div>
... |
(function() {
'use strict';
// TODO: create controller with info, text and rotation function, run tests
})(); |
window.app = ((ng) => {
const templates = {
home: 'templates/home.html',
a: {
index: 'templates/a.html',
aa: 'templates/aa.html',
ab: 'templates/ab.html',
ac: 'templates/ac.html',
aaa: 'templates/aaa.html',
aab: 'templates/aab.... |
function artistArticlesController(data){
for(var i = 0; i < data.response.docs.length; i++){
if (data.response.docs[i].multimedia[0] == undefined){
data.response.docs[i].multimedia.push({url: "./assets/icons/newspaper_icon.jpg"})
}else{
data.response.docs[i].multimedia[0].url = "https://static01.n... |
window.addEventListener("load", function (event) {
const AssetsManager = function () {
this.test_img = undefined;
};
AssetsManager.prototype = {
constructor: Game.AssetsManager,
requestImage: function (url, callback) {
let image = new Image();
image.addEventListener("load", function (event) {
... |
var searchForm = null;
function SEARCH_CODE_Click() {
}
function openSearchForm(url) {
parent.OpenSearch(url);
return false;
if (searchForm && !searchForm.closed) {
searchForm.focus();
}
else {
var width = 820;
var height = 600;
var left = (screen.widt... |
const models = require('../models')
const Sequelize = require('sequelize');
const Op = Sequelize.Op;
const save = (req,res)=> {
const book = {
isbn: req.body.isbn,
title: req.body.title,
edition: req.body.edition,
totalCopy: req.body.totalCopy,
remCopy: req.body.remCopy
... |
import React from 'react';
import List from '@material-ui/core/List';
import ListItemText from '@material-ui/core/ListItemText';
import ArrowForwardIosIcon from '@material-ui/icons/ArrowForwardIos';
import { useHistory, useLocation } from 'react-router';
export default function MyList(props){
const items = [];
con... |
import passport from "passport";
import routes from "../routes"
import User from "../models/User";
import Board from "../models/Board";
import moment from "moment";
export const home = async (req, res) => {
try {
const posts = await Board.find({}).sort({no:-1}).limit(5).populate('creator');
const p... |
import './style/style.css';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, hashHistory, IndexRoute } from 'react-router';
import ApolloClient from 'apollo-client';
import { ApolloProvider } from 'react-apollo';
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache } f... |
import React from 'react';
import BasicCard from './BasicCard/BasicCard.jsx';
import ExpandableCard from './ExpandableCard/ExpandableCard.jsx';
import ControlledExpandableCard from './ControlledExpandableCard/ControlledExpandableCard.jsx';
import Divider from 'material-ui/Divider';
const style = {
height: innerHeight... |
import * as types from 'kitsu/store/types';
const initialState = {
algoliaKeys: {},
pushNotificationEnabled: false,
};
export const appReducer = (state = initialState, action) => {
switch (action.type) {
case types.ALGOLIA_KEY_SUCCESS:
return {
...state,
algoliaKeys: action.payload,
... |
/*
Usage:
Copypaste this script into web-browser console, press [Enter] key.
It will save visible messages of currently open chat log into UTF-8 HTML file in your download folder on disk.
Saved file will not include linked images and CSS, only links.
The content is saved exactly as it was in HTML of the page in brows... |
import axios from 'axios';
import APIPath from '../utils/fetchUrls';
export const signin = (email, password) => {
var bodyFormData = new FormData();
bodyFormData.append('email', email);
bodyFormData.append('password', password);
const response = axios({
method: 'post',
url: APIPath.root_url + `/api/ac... |
var xr = require('xr');
function DataRep() {
this.allFoodLocations = [];
this.populationData = [];
GetFoodLocations(this.allFoodLocations);
GetKidPopulation(this.populationData);
}
var GetFoodLocations = function (allFoodLocations) {
var promise = xr.get('./DataSource/arcgis-ga-only-v2.json');
... |
module.exports = require('./src/daouoffice'); |
import React, {useEffect, useState} from "react";
import {
Box,
Divider,
Grid,
LinearProgress,
MenuItem,
Paper,
Select,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TablePagination,
TableRow,
Typography
} from "@material-ui/core";
import {Alert} fro... |
var ipcRenderer, app, path, fs;
try { // Fallback for testing on non-Electron environment
ipcRenderer = require('electron').ipcRenderer;
app = require('electron').app, path = require('path'), fs = require('fs');
// Click handler for layout items
function layoutListClick(layoutName ,event) {
... |
const inquirer = require('inquirer');
const fs = require('fs');
const generateHtml = require('./src/template.js');
const Employee = require('./lib/Employee.js');
const Engineer = require('./lib/Engineer.js');
const Intern = require('./lib/Intern.js');
const Manager = require('./lib/Manager.js');
const employeeArray... |
import React from "react";
import Router from "react-router";
import TransitionGroup from "react/lib/ReactCSSTransitionGroup";
const { Route, DefaultRoute, RouteHandler, Link } = Router
// components
, { SearchBar, StoryList, StoryDetail, Stats, StatsDay } = require('./components/index')
;
var App = React.c... |
"use strict";
var Sejour = /** @class */ (function () {
function Sejour(nom, prix) {
this.nom = nom;
this.prix = prix;
}
Object.defineProperty(Sejour.prototype, "Nom", {
get: function () {
return this.nom;
},
set: function (nom) {
this.nom = no... |
import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import vuetify from './plugins/vuetify'
import store from './store'
Vue.config.productionTip = false
Vue.filter('urlFormatter', function(value) {
if (!value) return ''
return value.replace(/^http:\/\//... |
import React,
{
useEffect,
useReducer
}
from 'react';
import Form from './Form';
import List from './List';
import { data as DefaultData } from './Data';
import Loader from './Loader';
import Banner from './Banner';
import { postReducer } from './reducer';
import './App.css';
const App = () => {
let... |
besgamApp
.controller("userPromotions", function( $scope, $http, $location, dataFactory, $sessionStorage, $translate, timeOut)
{
/* Controlar que se esta en sesion */
var session = timeOut.timeOut();
$scope.dataPromo = [];
$scope.textInfo ="Cargando datos...";
$scope.$stor... |
import firebase from "firebase";
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyCzxwhcww9ExHBA6mt1J3C20o67Y5QjiEU",
authDomain: "clone-6a509.firebaseapp.com",
projectId: "clone-6a509",
storageBucket: "clone-6a509.appspot.com",
messagingSe... |
import React, { Component } from 'react';
import { Redirect } from 'react-router-dom'
import alertify from 'alertifyjs'
import { get, assign } from 'lodash'
import { Card, ButtonToolbar, Button } from 'react-bootstrap';
import { GoHome, EventForm } from '../../components'
import { eventsService, commons } from '../../s... |
P.views.library = {}; |
/*
* name: setEvents
* desc: Stage all events.
* paramaeters: none
* returns: none
*
*/
function setEvents() {
setSubmitEvents();
setNotificationEvents();
setClickEvents();
}
/*
* name: setSubmitEvents
* desc: Stage all non-standard submit events actions.
* paramae... |
/**
Testing the inventory system.
@author laifrank2002
@date 2020-01-02
*/
var TestInventory = (
function()
{
Engine.log("Adding tests for Inventory...");
var testItem1 = new InventoryItem(0);
var testItem2 = new InventoryItem(1);
var testItem3 = new InventoryItem(2);
var testItem4 = new InventoryItem(... |
const urls = {
baseUrl: 'https://kiva-api.netsolutionindia.com/',
getAllData: 'user/getAllData',
signup: 'user/userSignUp',
login: '/user/login',
forums: '/user/all-forums',
addTopic: '/user/add-topic',
singleforum: '/user/single-forum-data',
forgotPassword: '/user/forgotPassword',
l... |
const { mapArticle } = require('../util')
// - Create 5 articles per each type (a, b, c)
async function task1(collection) {
try {
const articles = Array.from({length: 5}).fill(['a','b','c']).flat()
.map(i => ({ type: i }))
.map(mapArticle);
const { result } = await collection.insertMany... |
"use strict";
const uuidV4 = require("uuid/v4");
const Joi = require("@hapi/joi");
const mysqlPool = require("../../../database/mysql-pool");
async function validateSchema(payload) {
const schema = Joi.object({
sector: Joi.string()
.min(1)
.max(45)
.required(),
});
Joi.assert(payload, sch... |
/**
* External dependencies
*/
import {
isEmpty,
get,
} from 'lodash';
/**
* WordPress dependencies
*/
const {
select,
dispatch,
} = wp.data;
/**
* Internal dependencies
*/
import { DEFAULT_STATE } from '../constants';
import getCgbBlocks from '../../utils/getCgbBlocks';
export function pullSettingsFrom... |
export const CHANGE_INPUT_VALUE='Spectrometer/CHANGE_INPUT_VALUE';
export const CHANGE_DATAS='Spectrometer/CHANGE_DATAS';
export const CHANGE_DATAS_FOREVER='Spectrometer/CHANGE_DATAS_FOREVER';
|
const share_icon = document.querySelector('.share_icon');
const share_container = document.querySelector('.share_container');
share_icon.addEventListener('click', function () {
share_icon.classList.toggle('filter_flag');
share_container.classList.toggle('show');
});
|
'use strict'
let jokeButton = document.getElementById("jokeButton");
jokeButton.addEventListener('click',function(){
let fetchJoke = fetch("https://api.jokes.one/jod");
let jokeResponse = fetchJoke.then(function (response){
console.log("Processing results", response);
return response.json();
})
jo... |
define([
'jquery',
'underscore',
'backbone',
'js/config'
], function($, _, Backbone, APP){
APP.Models.NewEntry = Backbone.Model.extend({
defaults: {
type: 'number',
placeholder: 'ph no',
spanClass: 'minusNumber'
}
});
}); |
function stretch($em) {
alert( document.getElementById('search-music').offsetWidth );
} |
import React from 'react';
import { Link, withRouter } from 'react-router-dom';
import MarkerManager from '../../util/marker_manager';
class ShowsMap extends React.Component {
componentDidMount() {
const mapOptions = {
center: { lat: 40.759147, lng: -73.9802785 },
zoom: 12
};
this.map = n... |
import './group'
|
import React from 'react';
export const Loading = () => {
return (
<p style={{textAlign: 'center'}}>
<b>Loading ...</b>
</p>
);
};
|
export const skills = [
{
name: "HTML5",
description:
"Crear una estructura de forma fácil de leer y escalar, anidamiento de etiquetas, implementación correcta para mejorar el SEO, crear atributos personalizados, etiquetas block, inline, inline-block, listas, tablas.",
img: "/img/html.png",
},
{
name: "Ja... |
import React from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AppBar from 'material-ui/AppBar';
import IconButton from 'material-ui/IconButton';
import injectTapEventPlugin from 'react-tap-event-plugin';
import Content from './Content';
import RestaurantIcon from 'material-ui/svg... |
import {
LOAD_RESTAURANTS,
ADD_RESTAURANT,
APPLY_FILTER,
REMOVE_FILTER,
CLEAR_FILTERS,
SET_CURRENT_RESTAURANT_ID,
LOAD_RESTAURANT_BY_ID,
TOGGLE_MODAL_OPEN_STATE
} from "../constants/ActionTypes";
import {
fetchRestaurants,
createRestaurant,
createReview,
fetchRestaurantById
} from "../lib/Restau... |
/* eslint-disable */
'use strict';
// polyfill swiper for IE11
if (!String.prototype.startsWith) {
Object.defineProperty(String.prototype, 'startsWith', {
value: function(search, rawPos) {
var pos = rawPos > 0 ? rawPos|0 : 0;
return this.substring(pos, pos + search.length) === search;
... |
import React from 'react';
import Carousel from 'react-multi-carousel';
import { connect } from 'react-redux';
import GifItem from '../gifItem/gifItem';
import icon from '../../images/flash.svg';
import styles from './artistList.module.css';
import 'react-multi-carousel/lib/styles.css';
const artistList = (props) => {... |
(function (angular) {
angular.module('app').factory('AuthService', AuthService);
function AuthService($http, $rootScope, User, LoopBackAuth, $state) {
/**
* Envia um requisição POST para /register indicando que uma intenção
* de login está sendo requisitada.
* @param user Ob... |
import React, {useState} from 'react'
const GitIgnoreComponent = (props) =>{
const [input, setInput] = useState('')
const handleOnChange = (event) =>{
setInput(event.target.value)
}
return(
<div className='componentTitle'>
<h3>{props.title}:</h3>
<h5>{props.description}</h5>
<label className='componentSpaceBetw... |
const passport = require('passport');
const JWTStrategy = require('passport-jwt').Strategy;
const LocalStrategy = require('passport-local').Strategy;
const CustomStrategy = require('passport-custom').Strategy;
const FacebookStrategy = require('passport-facebook').Strategy;
const FacebookTokenStrategy = require('passpor... |
Ext.define('App.view.SettingsPage' ,{
extend: 'Ext.Container',
alias : 'widget.settingsPage',
id:'SettingsPage',
config: {
items:[
{
xtype:'toolbar',
style:'background:#30b457',
title:'Settings'
},{
html:... |
export {
increment,
decrement,
add,
substract
}
from './counterActions';
export {
storeResult,
deleteCounter
}
from './resultActions'; |
// Copyright 2012 Dmitry Monin. All Rights Reserved.
//
// 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 applica... |
(function () {
angular.module('MenuApp',['ui.router','Data','CategoryModule', 'ItemModule']);
})();
|
var fs = require('fs');
var data = fs.readFileSync('../files/paly.txt');
console.log(data.toString());
console.log('over!'); |
const express = require('express');
const mongoose = require('mongoose');
const dotenv = require('dotenv');
const cors = require('cors');
dotenv.config();
// setup server
const app = express();
app.use(cors({ origin: true }));
const PORT = process.env.PORT || 5000;
app.listen(PORT, () => {
console.log(`server star... |
import React,{ PureComponent } from 'react'
import g from '../../../gowns/g1.jpg';
import {HiUserGroup} from 'react-icons/hi';
import {FcLike} from 'react-icons/fc';
import {FaCommentDots} from 'react-icons/fa';
import Polar from './Polar';
import CrazyChart from './CrazyChart';
const MainBody = () => {
return (
... |
// 这里可以有独自的state、mutation、action、getter、
// 这里做演示就直接写在一个js文件内了
export default {
namespaced:true,
state:{
userName:'sll'
},
getters:{
getUserName(state){
return state.userName + "999"
}
},
mutations:{
info(state,nUserName){
state.userName = nUserName
}
},
actions:{
inf... |
const mongoose = require('mongoose')
const bcrypt = require('bcryptjs')
const Schema = new mongoose.Schema({
nome: {
type: String,
required:true
},
casa: {
type: Number,
required: true
},
whatsapp: {
type: Number,
unique: true,
required: true
... |
/* Utility Modules*/
import React,{useState,useEffect} from 'react'
import {Jumbotron,Alert,Container,Card,Spinner} from 'react-bootstrap'
import {CloudUpload} from 'react-bootstrap-icons'
import axios from 'axios'
import {useHistory} from 'react-router-dom'
/* Components */
import Loading from '../AdditionalC... |
"use strict";
const arr = [
[5, 3, 6],
[7, 11, 2],
[15, 9, 4]
];
const minValue = Math.min(...arr.flat());
const result = arr.map(subArray =>
subArray.map(valueToMultiple =>
(valueToMultiple % 2) ? (valueToMultiple * minValue) : valueToMultiple));
console.log(result);
... |
import ResultsList from './ResultsList';
import TopsList from './TopsList';
import UsersList from './UsersList';
export { ResultsList, UsersList, TopsList };
|
import React from 'react'
import { TouchableOpacity, Text } from 'react-native'
import { styles } from './styles'
import { Spinner } from '../../components'
import { colors } from '../../utils'
function Button(props) {
return (
<TouchableOpacity
activeOpacity={0}
onPress={props.onPress}
style={... |
import axios from 'axios';
import cookie from 'js-cookie';
export function getCookieFromServer (key, req) {
if (!req.headers.cookie) {
return undefined;
}
const rawCookie = req.headers.cookie
.split(';')
.find(c => c.trim().startsWith(`${key}=`));
if (!rawCookie) {
retur... |
// app.filterController.js
(function() {
"use strict";
angular.module("myApp")
.controller("filterController", FilterController);
FilterController.$inject = ["lovesFilter"];
function FilterController(lovesFilter) {
let vm = this;
const originalMessage = "Vitalii loves cookies";
vm.sayLoves... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var protractorUtils_1 = require("../utils/protractorUtils");
var ts_deferred_1 = require("ts-deferred");
var BaseComponent = /** @class */ (function () {
function BaseComponent(elementId) {
this.elementId = '';
this.element... |
// import uuid from 'uuid';
import express from 'express';
import { getRectangles, putRectangles, deleteRectangles, postRectangles } from './database.js';
var router = express.Router();
// Get all rectangles
router.get('/', function(req, res, next) {
console.log("GETTING RECTANGLES");
console.log("REQ", req);
r... |
'use strict';
import request from 'request';
import FeedParser from 'feedparser'
import { Meteor } from 'meteor/meteor';
import { Feeds } from '../imports/api/feeds';
import { Items } from '../imports/api/items';
var addSubscription = function(userId, feedId) {
Meteor.users.update({
_id: userId
},
{
$ad... |
import reducer from './DictionaryReducer';
import * as types from 'constants/ActionTypes';
const initialState: TransformationDictionary =
{
id: "999",
name: "Marketing colours",
targetProperty: "colour",
// color mapping goes here
dictionary: {
"Anthracite": "Grey",
}
};
describe('Dic... |
// Objetivo: Contiene las funciones JavaScript llamadas desde el Sistema CAMELIA.
function validaRut(variable,digit){
/*----------------------------------*/
Sum = 0;
digito = 0;
factor = 2;
largo = variable.length;
while (largo !== 0) {
Sum = Sum + (variable.substring(largo, largo-1) * factor);... |
const http = new HTTP();
// GET
http.get('https://jsonplaceholder.typicode.com/posts', function(error, response) {
if(error){console.log(error)}else{console.log(response)}
});
// POST/PUT data
const data = {
title: 'Custom Post',
body: 'This is a custom body post!'
};
// POST
http.post('https://jsonplac... |
'use strict';
var gulp = require('gulp'),
glob = require('glob'),
sass = require('gulp-sass'),
sassLint = require('gulp-sass-lint'),
sassGlob = require('gulp-sass-glob'),
cleanCSSMinify = require('gulp-clean-css'),
autopref... |
import React from 'react'
import styled from 'styled-components'
import styles from './MainTitle_styles'
const MainTitle_base = ({size, children, color, ...props}) => {
return (
<h1 {...props}>
{ children }
</h1>
)
}
const MainTitle = styled(MainTitle_base)`
${ styles }
`
expo... |
import styled from 'styled-components'
export const Container = styled.div`
padding: 30px;
background: black;
border-radius:10px;
footer{
display: flex;
justify-content: space-between;
align-items: center;
color: #f5f5f5;
padding: 5px;
margin-top: 10px;
button{
background: #f5f5f... |
import React from 'react';
import moment from 'moment';
import { Button } from 'reactstrap';
import { hoje } from '../../constants';
import { RelatorioBarra as S } from './styles';
const RelatorioBarra = ({ datai, dataf, mudaDatai, mudaDataf }) => {
const diario = () => {
mudaDatai(hoje);
mudaDataf('');
}... |
var path = require('path');
var fs = require('fs');
var defaults = require('./default');
var resolve = require('../persistence/file-resolve');
var config = require('../util/config.js').configData;
var pageNameValidator = require('../../client/app/js/page-name-validator');
/**
* This is a simple JSON REST service... |
"use strict";
/* jshint browser: true */
/* jshint esversion: 6 */
import fdpaResolutions from 'fdpa/fusionApi.js';
['passed', 'inWork', 'inWork,materialsSent'].forEach(function(statusSought) {
fdpaResolutions.getResolutionsCount({
status: statusSought,
fusiontable: '10Uc_t_dBYUV_K_j6HdCMSgLXGs94b... |
/* ========================================================================
* App.plugins.role v1.0
* 101.角色管理插件
* ========================================================================
* Copyright 2016-2026 WangXin nvlbs,Inc.
* ======================================================================== */
(f... |
import React from "react";
import styles from "./Pokemon.module.css";
import { API_POKEMON } from "../../api";
const Pokemon = ({ name, type }) => {
const [pokemon, setPokemon] = React.useState({});
React.useEffect(() => {
async function loadPokemon() {
try {
const { url, options } = API_POKEMON... |
$(function () {
var hh = $("body").height();
var h1 = $(".navbar").height();
$(".container-fluid-full").height(hh - h1);
}); |
var connect = require('connect');
var express = require('express');
var http = require('http');
var bodyParser = require('body-parser');
var app = express();
// requiring a file
var safetyData = require('./data.js');
// for bodyparser
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
... |
'use strict';
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var LutteTypeSchema = new Schema({
type: String
});
module.exports = mongoose.model('LutteType', LutteTypeSchema); |
/**
* @fileoverview A PointSet visual
* @author Tony Parisi
*/
goog.provide('SB.PointSet');
goog.require('SB.Visual');
SB.PointSet = function(param) {
SB.Visual.call(this, param);
this.param = param || {};
this.param.color = this.param.color || 0;
this.param.opacity = this.param.opacity || 1;
... |
import { renderString } from '../../src/index';
describe(`Return the first item of a sequence.`, () => {
it(`unnamed case 0`, () => {
const html = renderString(`{% set my_sequence = ['Item 1', 'Item 2', 'Item 3'] %}
{{ my_sequence|first }}`);
});
}); |
module.exports = /* @ngInject */ function($routeProvider) {
$routeProvider
.when('/cfd', { controller : 'CfdCtrl', templateUrl : 'partials/cfd.html' })
.otherwise( { redirectTo : '/cfd' });
}; |
function Bomb(panel, mapx, mapy, base_attack, type, range, shape){
this.mapx = mapx;
this.mapy = mapy;
this.panel = panel;
this.type = type;
this.range = range;
this.shape = shape;
this.countdown_time = 2000;
this.explosion_time = 500;
this.timer = 0;
this.area = range == 'large_... |
import express from 'express'
import {
isEmpty,
isFunction,
} from 'lodash'
import { tokenValidator } from '../../lib/routerMiddlewares'
import {
formatedUserInfo,
imageUploadInfo,
} from '../../lib/util'
import db from '../../lib/db'
import model from '../../model'
const router = express.Router()
router.get... |
import query, { dq } from "../../analysis.mjs";
// The colors supported by object views. They are shifted by 1 with respect to linechart colors,
// to reflect the correlation being used
const multiSeriesColors = [
{
low: "rgba(255, 99, 132,0.6)",
high: "rgba(255, 99, 132,0.1)",
background: "rgba(255, 99... |
var searchData=
[
['lean_79',['Lean',['../namespace_lean.html',1,'']]],
['touch_80',['Touch',['../namespace_lean_1_1_touch.html',1,'Lean']]]
];
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.