text stringlengths 7 3.69M |
|---|
ig.module(
'game.entities.gravitychangersmall'
)
.requires(
'impact.entity'
)
.defines(function(){
EntityGravitychangersmall = ig.Entity.extend({
size: {x:70, y:420},
gravityFactor: 0,
animSheet: new ig.AnimationSheet( 'media/smallair.png', 70, 420 ),
powerOn: ... |
// If you want to use the preview API please define
// CONTENTFUL_HOST and CONTENTFUL_PREVIEW_ACCESS_TOKEN in your
// environment config.
//
// CONTENTFUL_HOST should map to `preview.contentful.com`
// CONTENTFUL_PREVIEW_ACCESS_TOKEN should map to your
// Content Preview API token
//
// For more information around the ... |
import React from 'react';
import * as BooksAPI from '../utils/BooksAPI';
import '../css/App.css';
import { Route } from 'react-router-dom';
import BookList from './BookList';
import SearchPage from './SearchPage';
import NotFoundPage from './NotFoundPage';
class BooksApp extends React.Component {
state = {
boo... |
var tb = $('#top-nav');
tbs = "top-bar-scrolled";
$(window).scroll(function() {
if($(this).scrollTop()) {
tb.addClass(tbs);
} else {
tb.removeClass(tbs);
}
});
|
import _ from "lodash";
const DashkitIcon = function ({ name, style, fill, size, width, height, ...rest }) {
let svgContent = require(`./icons/${name}.svg`);
let attrs = svgContent.split(" ");
let sizes = {};
let ratio = 1;
attrs.map((attr) => {
if (_.startsWith(attr, "viewBox")) {
let r = attr.s... |
/* ************************************ */
/* Define helper functions */
/* ************************************ */
var post_trial_gap = function() {
return gap;
}
/* Append gap and current trial to data and then recalculate for next trial*/
var appendData = function() {
gap = Math.floor( Math.random() * 500 ) + 50... |
const Cheerio = require('cheerio');
const getSource = require('./getSource');
class caImporter {
constructor() {
this.data = null;
this.baseUrl =
'http://leginfo.legislature.ca.gov/faces/billSearchClient.xhtml';
}
async identifySourceBills(sessionId) {
this.data = await getSource(
`${
... |
import React from 'react';
import {StyleSheet, Text, TouchableOpacity} from 'react-native';
//Config
import color from '../config/color';
import font from '../config/font';
const Button = ({onPress, text}) => {
return (
<TouchableOpacity style={styles.container} onPress={onPress}>
<Text style={styles.text}... |
var Election = artifacts.require("./Election.sol");
contract("Election", function(accounts) {
it("initialized with two candidates", function(){
return Election.deployed().then(function(instance){
return instance.candidateCount();
}).then(function (count){
assert.equal(count... |
import axios from 'axios'
import hotPepperApiKey from '../api_keys/hotpepper'
// -------------------------------------------------------
// リストの取得
// -------------------------------------------------------
export function getListHotpepper (options) {
const params = Object.assign({
key: hotPepperApiKey,
forma... |
function addBullet(){
if(addBullets){
if(playerBullets.length!=0){
if(playerBullets[playerBullets.length-1].y + 150 <= player.y){
playerBullets.push(new bullet(player, 'player'));
bulletSound.play();
}
}
else{
playe... |
/*
let userChoice = prompt("Would you like to calculate a random number or Average Square")
function randomNum(x) {
let randomNum = Math.floor(Math.random() * 10) +1
return randomNum * x
}
function calcAvgSquare(num1, num2, num3) {
return ((num1 + num2 + num3)/3) * num1**2
}
if (userChoice == "random numbe... |
import React from 'react';
import AddItemtoBudget from './AddItemtoBudget';
import SeeBudgetforItem from './SeeBudgetforItem';
class ItemRow extends React.Component {
state = {
budgetItem: [],
collapseStatus: false
}
displayCollapse = () => {
console.log(this.props)
... |
import { LOGIN_REQUEST, LOGIN_SUCCESS, LOGOUT } from '../constants/actionTypes'
import { auth, db } from '../firebase/firebase'
import * as routes from '../constants/routes'
import { store } from '../store'
import { push } from 'connected-react-router'
export const loginRequest = () => {
return {
type: LOGIN_REQ... |
import React, { Component } from 'react';
import './App.css';
import Box from './Box.js'
import NavBar from './NavBar'
import shuffle from 'shuffle-array'
import ScoreBoard from './ScoreBoard'
const NUM_BOXES = 16
const cardState= {
HIDING: 0,
SHOWING: 1,
MATCHED: 2
}
class App extends Component {
constructo... |
var Test = artifacts.require("./Test.sol");
module.exports = function(deployer) {
deployer.deploy(Test, {gas: 6700000});
}; |
import React from 'react';
import logo from './logo.svg';
import './App.css';
import Navbar from 'react-bootstrap/Navbar';
import Nav from 'react-bootstrap/Nav';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faBuilding } from '@fortawesome/free-solid-svg-icons'
const App = () => {... |
import React from 'react'
import {
View,
// Text,
TextInput,
FlatList,
YellowBox,
StyleSheet,
ImageBackground,
Alert,
Platform,
TouchableOpacity,
Dimensions,
ActivityIndicator
} from 'react-native'
import {
Container,
Header,
Content,
Card,
CardItem,
Body,
Text
} from 'native-base... |
var table;
var is_importing = false;
var queue = [];
function createQuery(params) {
let res = "";
params.forEach((query) => {
if (res === "") res += query;
else res += '&' + query;
});
return res;
}
function makeUrl() {
let res = "/search-user?";
/** GET NAME */
let word = ... |
import React, { Component } from "react";
import LoadingIcon from "./loading";
class EmployeeLI extends Component {
render() {
const { errorDetails, isLoaded, employees } = this.props;
console.log("error", errorDetails);
console.log("isLoaded", isLoaded);
console.log("employees", employees);
if (... |
quiz1 = {
"question1": [3,4,6,8,7],
"question2": [1,2,3,4,5],
"question3": [4,34,25,45,6],
"question4": [1,5,6,4,3],
"question5": [5,6,4,4,3]
};
//#region FYS splitter
// keeps versions to have different questions, never intersect
//Fischer Yates shuffle function
//http://bost.ocks.org/... |
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, Image, ScrollView, TouchableOpacity, Button} from 'react-native';
import { createAppContainer} from 'react-navigation';
import img from './BG/BG3.png'
import firebase from 'firebase'
export default class Programacao extends Component {
... |
class CarAppointmentDetailController {
constructor (API, $state, $stateParams, $scope, $uibModal) {
'ngInject'
this.API = API
this.$state = $state
this.$scope = $scope
this.$uibModal = $uibModal
this.services = ""
this.appointmentId = $stateParams.appointmentId
let appointmentId = this.appointme... |
import React, { Component } from 'react';
import './PetSimulation.css';
import PetImage from '../PetImage/PetImage';
import PetInteraction from '../PetInteraction/PetInteraction';
export default class PetSimulation extends Component {
render() {
return (
<div>
<PetImage />
<PetInteraction /... |
import React, { useContext } from "react";
import { Row, Col } from "reactstrap";
import CommentIcom from "../../../assets/comment.png";
import AgreeIcon from "../../../assets/agree.png";
import EditIcon from "../../../assets/edit.png";
import deleteIcon from "../../../assets/delete.png";
import { GlobalContext } from ... |
var system = require('../app/system.js');
var sensors = require('../app/sensors.js');
var equipment = require('../app/equipment.js');
var fs = require('fs');
var path = require('path');
var async = require('async');
var socket;
var lasttempout;
exports.setSocket = function(socketio) {
socket = socketio;
}
exports.l... |
var React = require('react');
var Backbone = require('backbone');
var BaseLayout = require('./layouts/base.jsx').BaseLayout;
var RecipeCollection = require('../models/recipe.js').RecipeCollection;
class RecipeListContainer extends React.Component {
constructor(props){
super(props)
var recipeCollection = n... |
import React, { useState } from 'react'
import RegistrationModal from '../Form/Registration'
import LoginModal from '../Form/Login'
import { Nav, Navbar, Form } from 'react-bootstrap'
import Link from 'next/link'
import UserImage from './UserImage'
import withPageSize from '../HOC/withPageSize'
import { getIsAuth } fro... |
import mongoose from 'mongoose';
const { Schema } = mongoose;
const adminSchema = new Schema({
uesrName: String,
password: String,
})
const Admin = mongoose.model('Admin', adminSchema);
export default Admin; |
export { default as NonAuthHome } from "./NonAuthHome.";
export { default as AuthHome } from "./AuthHome";
|
'use strict';
const Card = require ('./card.js');
const EventEmitter = require('events');
class Shoe extends EventEmitter {
constructor(decks) {
super();
this.decks = decks;
this.cards = [];
this.createDecks();
}
createDecks() {
for (let i = 0; i < this.decks; i... |
import zhLocale from "element-ui/lib/locale/lang/zh-CN" //引入element语言包
const riyu = {
"menu": {
"jilu": "記録",
"wenxunjilu": "聞き取り記録",
"biaodanxiangqing": "フォームの詳細",
"guanquguanli": "区域を閉鎖する",
"guanquliebiao": "エリア管理",
"guanyuanguanli": "関係者",
"guanyuanliebiao": "管理員",
"biaodan": "フォーム",
"b... |
import React, {Component} from 'react';
// import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import makeAction from '../../redux/actions/makeAction';
import ActionTypes from '../../redux/actions/actionTypes';
import './TasksList.scss';
import SingleTask from '../SingleTask/SingleTask';
class Tas... |
const mongodb=require('mongodb');
var {Product}=require('../models/products');
var {mongoose}=require('../mongoose/mongoose');
var arr=[
{
name:'TV',
price:10000
},{
name:'AC',
price:15000
},{
name:'Fridge',
price:5000
},{
name:'Geyser',
price:1000
},{
name:'Washing-Machine',
price:8000
},{
na... |
import React from 'react'
const Loading = () => {
return (
<div className="container is-max-desktop">
<p className="subtitle is-3">Loading, please make sure the API is working</p>
<progress className="progress is-medium is-dark" max="100">45%</progress>
</div>
)
}
expor... |
angular.module('OfertaYempleo', [ 'servicios.ofertaYempleo', 'AppAlojamiento', 'transporteApp', 'restauranteApp', 'agenciasOperadorasApp', 'agenciaViajeApp' , 'AppEmpleo' ] )
.controller("ListadoEncuestasOfertaEmpeloCtrl",[ "$scope", "$state", "OfertaEmpleoServi", function($scope, $state, OfertaEmpleoServi){
... |
//function add(){
// var a = 'here i am';
//}
//console.log(a);
//funtion getGreeting(name){
// var greeting = 'hello';
// return greeting + name;
//}
// console.log(getGreeting('Shane')); //'hello Shane'
// console.log(greeting); // undefined
//for(var i = 0; i < 10; i++){
//
// var x = i;
//}
//console.log(i,... |
import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import { Constants, BarCodeScanner, Permissions } from 'expo';
import { connect } from 'react-redux';
import { Header, Button, Icon, Left, Body, Right, Title, Container, Content, Text } from 'native-base';
import { productUpdate... |
(function () {
'use strict';
angular
.module('Egharpay')
.factory('MobileService', MobileService);
MobileService.$inject = ['$http'];
function MobileService($http) {
var service = {
retrieveMobiles: retrieveMobiles,
searchMobile: searchMobile,
... |
import React from 'react'
import { StyleSheet } from 'quantum'
import { ColumnLayout, Layout } from 'bypass/ui/layout'
import { Text } from 'bypass/ui/text'
import Links from './Links'
const styles = StyleSheet.create({
self: {
boxShadow: '0 3px #e0e0e0',
background: '#eceff1',
padding: '10px',
width... |
require("babel/polyfill");
var makeAjaxCall = function (url, cb) {
setTimeout(function () {
cb("Result for " + url);
}, 100);
};
function request(url) {
// this is where we're hiding the asynchronicity,
// away from the main code of our generator
// `it.next(..)` is the generator's iterat... |
var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/", {
templateUrl : "index.html"
})
.when("/createaccount", {
templateUrl : "CreateAccount.html",
controller:"c... |
import React from "react";
import PropTypes from "prop-types";
import styled, { withTheme, css } from "styled-components";
const Progress = styled.div`
${props => css`
text-align: center;
display: inline-block;
padding: ${props.theme.steps.border}px;
margin-bottom: ${props.margin ||... |
import React from 'react'
function Info() {
return (
<div className='container-fluid'>
<div className='row menko'>
<div className="col-md-6 col-lg-6">
</div>
<div className="col-md-6 col-lg-6 text-center sisko">
<p className="sub"> <br /><br /... |
game.Pathfinder = Object.extend({
init: function() {
},
getPath : function getPath( start, end){
console.log("path test",start,end)
// console.log('Start:', start , 'End:', end , 'layerName:', layerName);
// Get layer object
var layer = me.game.currentLevel.getLayerByName("collision");
// set ar... |
import {createStore} from "redux"
const add = require("./script-add.js"); //外部のjsファイルを参照
console.log("合計値:" + add.add(120,50)); //script-add.jsのaddメソッドを実行
let store = createStore(function() {
return "Hello !!!";
});
onload = function(){
let contents = document.getElementById("main");
contents.innerHTML = sto... |
import { createStore, combineReducers } from 'redux';
import red1 from './redux/red1';
import { hashHistory } from 'react-router';
import { routerReducer, syncHistoryWithStore } from 'react-router-redux';
console.log('red1: ', red1);
const defaultState = {
red1
};
const rootReducer = combineReducers({red1, routing: ... |
// @desc this is the Email Template component on the admin dashboard.
/**
* @author odewale Ifeoluwa
* @author Sylvia Onwukwe
*/
import React from "react";
import NavPills from "../../components/NavPills/NavPills";
import PasswordReset from "./PasswordReset/passwordReset";
import AccountRegistration from "./AccountR... |
import React, { Component } from "react";
import {Redirect} from 'react-router-dom'
import axios from "axios";
class ParkAdd extends Component {
constructor(props){
super(props);
this.state = {
name: "",
description: "",
imagePark: "",
... |
/*
* application.js
*/
var ws = null;
var close_connection = function () {
if(ws) {
ws.send(JSON.stringify({
"type" : "leave",
"data" : {
"room" : room
}
}));
}
};
$(function () {
if(typeof(WebSocket) == "undefined") {
alert("WebSockets aren't supported in your browser!"... |
const twitterIcon = document.querySelector('.twiiter_icon');
const content = document.querySelector('.main_content_body');
const navButton = document.querySelector('.navButton');
const sideDrawerBtn = document.querySelector('.side_drawer_button');
twitterIcon.addEventListener("click",()=>{
document.getElementById... |
const notificationReducer = (state = null, action) => {
switch (action.type) {
case '@notification/set':
clearTimeout(state.delay);
return action.message
case '@notification/clear':
return null
default:
return state
}
}
/*
ACTIONS CR... |
// aqiscaleReducer.js
import { FETCH_AQI_SCALES, RECEIVED_AQI_SCALES } from '../actions/types';
export default function aqiScaleReducer(state = { isFetchingAqiScales: true, aqiScales: [] }, action) {
switch (action.type) {
case FETCH_AQI_SCALES:
return {
...state,
isFetchingAqiScales: ... |
//$("#imagen_profile").change(function(e) {
$(document).on("change", "#imagen_profile", function() {
var input = this;
console.log('profile_image_show');
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$('.profile_image_show').at... |
const mongoose = require("mongoose");
const { Schema } = mongoose;
const visitScheme = new Schema({
userId: String,
patientName: String,
doctorName: String,
visitDate: String,
complaint: String,
});
module.exports = Visit = mongoose.model("visits", visitScheme); |
import { Toast } from 'antd-mobile';
import React from 'react';
export default class CustomToast {
static info = (content, duration, onClose, mask) => {
Toast.info(content, duration, onClose, mask);
const toastElement = document.getElementsByClassName('am-toast-mask')[0];
toastElement &&
toastEleme... |
let HTP = require("http");
let URL = require("url");
let myFunction = function (request, response) {
let data = URL.parse(request.url, true);
let Num1 = parseInt(data.query.Num1);
let Num2 = parseInt(data.query.Num2);
if (data.pathname == "/") { response.write("Homepage"); }
else if (data.pathname... |
import React, { Fragment } from "react";
import "./App.css";
//components
import InputQuiz from "./components/quiz/inputQuiz";
import ListQuiz from "./components/quiz/listQuiz";
function App() {
return (
<Fragment>
<div className="container">
<InputQuiz />
<ListQuiz />
</div>
</F... |
'use strict';
const chai = require('chai');
const should = chai.should(); // eslint-disable-line
const expect = chai.expect; // eslint-disable-line
const TEST_NAME = 'Test Example';
describe(TEST_NAME, () => {
it('should Pass',() => {
true.should.be.eql(true);
});
}); |
import models from '../../models';
//import { } from './utils'
export const getPaginationDepartamentos = (limit, offset) => {
return models.Departamento.findAll({ offset, limit })
.then(dpto => dpto)
.catch(error => console.log(error));
};
export const totalDepartamentos = () => {
return models.Departame... |
import * as serviceWorker from "./serviceWorker"
const cache = {}
const inFlightCache = {}
function getURLAsBuffer(url, onProgress = function() {}) {
return new Promise((resolve, reject) => {
if (cache[url]) {
resolve(cache[url])
} else if (inFlightCache[url]) {
const checkCacheOnce = function() ... |
'use strict';
const request = require('request');
const debug = require('debug')('sts:makeRequest');
const _ = require('lodash');
module.exports = makeRequest;
const noCacheRe = /no-cache/i;
function makeRequest(options, resolve, reject) {
let result;
const requestOptions = {
qsStringifyOptions: {
... |
//comprueba que los campos de registrar cliente no esten vacios.
$(document).ready(function (){
limpiarCampos();
$('#btnRegistrar').click(function (){
validarDatos();
});
$('#btnCancelar').click(function (){
history.back();
});
});
function limpiarCampos(){
$('.te... |
//@version: test
//@for: jquery
function print(str){ console.log(str); } //print默认弹出打印机程序,强制覆盖
(function(){
var objectName = 'my';
window[objectName] = {}
function registerFunc(funcname, funcaddr){ //注册函数
if(window[funcname] !== undefined){ ... |
const sequelize = require("./sequelize");
const authUtils = require("../../utils/authUtils");
const Workshop = require("../../model/sequelize/Workshop");
const User = require("../../model/sequelize/User");
const Car = require("../../model/sequelize/Car");
const RepairOrder = require("../../model/sequelize/RepairOrder"... |
import Rule from '../ValidationRule'
class Min extends Rule {
init() {
super.setName("min")
super.setMessage("Het veld moet minstens :min characters bevatten")
}
validate(text, options) {
text = text.trim()
let passes = text.length >= options[0]
return super.getResu... |
! function() {
var e = {
attached: function() {
this._androidVideoAutoplayListener = this._onAndroidVideoAutoplayTap.bind(this), document.addEventListener("touchstart", this._androidVideoAutoplayListener, !0)
},
detached: function() {
this._removeListener()
}... |
/*
* @Author: your name
* @Date: 2021-09-22 16:27:13
* @LastEditTime: 2021-09-22 16:27:14
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /qiankun-micro-vue/vue.config.js
*/
const path = require("path");
module.exports = {
devServer: {
// 监听端口
port: 8080,
... |
const db = require('../models')
const sequelize = require('sequelize')
const districts = require('../location/district.json')
const Restaurant = db.Restaurant
const Category = db.Category
const customQuery = process.env.heroku ? require('../config/query/heroku') : require('../config/query/general')
const pageLimit = 6... |
var vt = vt = vt || {};
vt.LogicClass_500137 = cc.Class.extend({
m_view: null,
ctor: function () {},
setTableView: function (view) {
this.m_view = view;
},
refreshTableView: function () {
//this.m_view.reloadData();
},
setVar: function (key, value) {
this[key] = value;
},
run: function (context, t... |
import React from "react";
import ReactDOM from "react-dom";
function PasswordRevealer({ value }) {
const [shown, setShown] = React.useState(false);
return (
<div>
<input
type={shown ? "text" : "password"}
value={value}
onChange={() => {}}
/>
<button
onClic... |
"use strict";
"use warning";
var QuestManager = new function() {
var INSTANCE = this;
var code;
var name;
var maxClearValue;
var rewardAmount;
var index;
var state;
var rewardState;
var clearValue;
var currentValue;
var product = [1, 2, 3, 1, 4, 0];
va... |
import React from 'react'
import {DragSource} from 'react-dnd'
const DragBox = (props) => {
const {
children,
isDragging,
connectDragSource,
style = {},
draggingStyle = {},
beginDrag,
endDrag,
level,
type,
id,
...others
} =... |
import styled from "styled-components";
import {Button} from "@material-ui/core";
const PrimitiveButton = function ({noMargin, small, color, ...props}) {
if (color == "warning") color = "primary";
return (
<Button {...props} color={color}>
{props.children}
</Button>
);
};
const StyledButton = styl... |
angular.module('User', ['firebaseResource']).
factory('User', function ($rootScope, firebaseResource) {
var User = firebaseResource(
{
path: 'users',
hasMany: ['Post']
}
);
return User;
});
angular.module('Post', ['firebaseResource']).
factory('Post', function ($rootScope, ... |
var Scheduler = require('./scheduler.js');
var vercast = require('./vercast.js');
module.exports = function(sched) {
this.objCache = {};
this.jsonCache = {};
var tracer = new vercast.Tracer('cache');
this.store = function(id, obj, json) {
tracer.trace({store: [id, obj]});
this.objCache[id] = obj;
th... |
import React from 'react';
import { Link } from 'react-router-dom';
import axios from 'axios';
import Home from './Home.js';
import Header from './Header.jsx';
import Match from './Match.jsx';
import ChatRoom from './ChatRoom.jsx';
class MatchList extends React.Component {
constructor(props){
super(props)
... |
function initHTimeline(){
window.filters = [];
settings = {
margin: { top: 10, bottom: 45, left: 60, right: 60},
chicHeight: 14,
chicWidth: 20,
cLowerLim: 13,
cUpperLim: 15,
zoom: true,
hiddenTypes: [],
xAxisHeight: 43,
fade_ms: 700,
}
var h = new HorizontalTimeline(settings... |
import {
startConfetti,
stopConfetti,
removeConfetti
} from '../../Vendors/js/confetti.js';
const playerScoreEl = document.getElementById('player-score');
const playerChoiceEl = document.getElementById('player-choice');
const computerScoreEl = document.getElementById('computer-score');
const computerChoi... |
var _api = require("../../../utils/api.js");
var _api2 = _interopRequireDefault(_api);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Component({
/**
* 组件的属性列表
*/
properties: {
tjCollege: {
type: Array,
val... |
var Ochs = Ochs || {};
Ochs.Article = {
init: function() {
Ochs.pageType = "article";
Ochs.showOverlay();
Ochs.drawNavBar();
Ochs.addSiteNav();
this.removeMisc();
this.reduceArticleInline();
this.removeSubscribeToModule();
this.insertAds();
Ochs.hideOverlay();
},
removeMisc: function(){
... |
const mysql = require('mysql');
const db = require("./db");
const Promise = require('bluebird');
const TABLE = 'Team';
module.exports.createTeamByName = function (groupname) {
return new Promise(function (resolve, reject) {
db.getConnection().then(function (connection) {
let sql = `INSERT INTO... |
import React from "react";
import { BrowserRouter as Router, Switch } from "react-router-dom";
import ThreadsIndex from "../Pages/Threads/ThreadsIndex";
import ThreadShow from "../Pages/Threads/ThreadShow"
import Header from "../Pages/Layouts/Header";
import Footer from "../Pages/Layouts/Footer";
import AuthLayoutRo... |
(function () {
'use strict';
angular
.module('Egharpay')
.controller('SellerMobileController', SellerMobileController);
SellerMobileController.$inject = ['$window', 'SellerMobileService', 'Paging', 'OrderService', 'OrderBy', 'Order'];
function SellerMobileController($window, SellerMo... |
(function () {
"use strict";
describe("CreateEventModalCtrl", function () {
/* global $q */
var ctrl,
modal,
modalInstance,
ManageEventModalService,
NetworksService,
content;
beforeEach(function () {
inject(function (_$injector_) {
modal = _$inject... |
const express = require('express');
const axios = require('axios');
const app = express();
app.set('view engine', 'ejs');
app.use(express.static('public'));
app.get('/', (req, res) => {
res.render('pages/home');
});
app.get('/search', (req, res) => {
const title = req.query.title;
const booksURL = `https://www... |
export { default } from './RealtimeData'
|
import React from "react"
import { render } from "@testing-library/react"
import "@testing-library/jest-dom/extend-expect"
import YearFilterButtons from "./year-filter-buttons"
jest.mock("gatsby")
const handleYearFilter = jest.fn()
const filters = ["All", "2018", "2019"]
describe("Year filter buttons tests", () => {... |
var buttons = document.getElementsByClassName("buttons"),
numbers = document.getElementsByClassName("numbers");
//console.log(buttons[0]);
//console.log(buttons[1]);
//console.log(numbers[0]);
//console.log(numbers[1]);
// **************************************************************************************
var... |
var cmine = 50,minesize = 20,places = [], prohrals = false, zbminy = 0, firstclick = true, score, remminy = 0, realzbminy, vyhrals = false;
let winmus, losemus, clickmus, markmus;
var cas;
var cass = 0;
var pocmin, velikostplochy,start;
//var helpingarray = [];
//helpingarray = new Array();
function setup() {
nact... |
/**
* Reducer para las listas de reproduccion destacadas
*
*/
const defaultState = {
featuredPlaylists: []
}
const featuredPlaylistsReducer = (state = defaultState, action) => {
switch(action.type){
case "FETCH_FEATURED_PLAYLISTS":
return {
featuredPlaylists: ac... |
const slots = [
{
id: 9,
label: '09 AM - 10 AM',
date: new Date(), // set default prop of day to today's date
booked: false, // booked is false, will make this green
name: 'Dante Rump', // name is default as unset, unbooked.
phone: '555 555-5555',
... |
CommonLayout = React.createClass({
render() {
return <div>
<div className='row'>
<div className='nav-cell'>
<a href='/task/list'>Simple Demo</a>
</div>
<div className='nav-cell'>
<a href='/task-dd/list'>Data-driven Demo</a>
</div>
<div className='n... |
import React from 'react';
import ReactDOM from 'react-dom';
import {
renderIntoDocument,
scryRenderedDOMComponentsWithClass,
findRenderedComponentWithType,
Simulate
} from 'react-addons-test-utils';
import Board from '../../src/components/Board';
import BoardContainer from '../../src/containers/BoardContainer';
im... |
//modules
require('dotenv').config()
const express = require('express')
const mongoose = require('mongoose')
const app = express()
const dbLink = process.env.DBLINK
const port = process.env.PORT
const authorRoute = require('./src/routes/authorRoute')
const bookRoute = require('./src/routes/bookRoute')
// database c... |
/**
* Created by zhuliang on 2018/5/7.
*/
|
import React from 'react';
import style from './News.module.css';
const News = (props) => {
return (
<div className = {style.content}> SUP News</div>
);
}
export default News; |
var client = null
var subscription = null;
$(document).ready(function() {
client = new Faye.Client(NODE_SERVER + '/faye');
subscription = client.subscribe('/foo', function(message) {
$("#messages ul").prepend("<li>" + message + "</li>");
});
})
function sendMessage(obj) {
var message = $("#post_message").val()... |
import style from './style';
const s = Object.create(style);
s.title = {
fontSize: '28px',
marginTop: '20px',
marginBottom: '0.5vh',
textAlign: 'center'
};
s.subtitle = {
fontSize: '18px',
marginTop: '10px',
marginBottom: '0.5vh',
textAlign: 'center'
};
s.dialog = {
width: '400px',
maxWidth: 'no... |
module.exports = {
red: '\x1b[31m',
green: '\x1b[32m',
yellow: '\x1b[33m',
default: '\x1b[0m',
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.