text stringlengths 7 3.69M |
|---|
jQuery(document).ready(function() {
if ($("body").hasClass("item-detail-page")) {
var b = document.createElement("button"); //Create the button.
b.id = "check"; //Add an id to it.
var t = document.createTextNode("Display Random Table"); //Add some text to the button.
b.appendChild(t);
va... |
(function ($) {
/**
* crl2Breakpoints JS Behavior
* This behavior actively sets two variables:
*
* Drupal.settings.crl2.breakpointActive
* The active breakpoint the current user is on
*
* Drupal.settings.crl2.breakpointFrom
* The previous breakpoint the user just came from
*
* @type {Object}
*/
Drupal.... |
'use strict';
// Small JSON database
const root = require('app-root-path');
const low = require('lowdb');
const FileSync = require('lowdb/adapters/FileSync');
const stickerDB = low(new FileSync(`${root}/db/sticker.json`));
const defaultCycleDB = low(new FileSync(`${root}/db/default_cycle.json`));
stickerDB.defaults({
... |
// 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... |
import React, { useEffect, useState } from 'react'
import Context from './context'
const Link = props => {
const { to } = props
return (
<Context.Consumer>
{state => {
return <a onClick={e => state.history.push(to)}>{props.children}</a>
}}
</Context.Consumer>
)
}
export default Link... |
import React from 'react';
import { Field, reduxForm } from 'redux-form';
import {toastr} from 'react-redux-toastr';
import { connect } from 'react-redux' ;
import { Link } from 'react-router-dom' ;
import {logIn} from '../actions' ;
import history from '../history';
class LogIn extends React.Component {
onSubmi... |
import React from 'react';
import ReactDOM from 'react-dom';
import * as d3 from "d3";
import {range} from 'lodash';
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++ ) {
color += letters[Math.floor(Math.random() * 16)];
}
return colo... |
import esbuild from 'rollup-plugin-esbuild';
import dts from 'rollup-plugin-dts';
const inputFile = 'src/index.ts';
const outputFile = 'dist/index.js';
const outputDts = 'dist/index.d.ts';
export default [
{
input: inputFile,
plugins: [
esbuild()
],
external: [
'fa-minify',
'plug... |
import ConsCard from 'comps/common/Card.vue'
import ConsItem from 'comps/common/ConsItem.vue';
import Summary from "comps/common/Summary.vue";
let MyPlugin = {};
MyPlugin.install = function (Vue){
Vue.component(ConsCard.name,ConsCard);
Vue.component(ConsItem.name,ConsItem);
Vue.component(Summary.name,Summ... |
import { classNameBindings } from '@ember-decorators/component';
import BaseModalDialog from 'ember-bootstrap/components/base/bs-modal/dialog';
@classNameBindings('showModal:show', 'inDom:d-block')
export default class ModalDialog extends BaseModalDialog {
centered = false;
scrollable = false;
}
|
import React, { useContext } from 'react'
import './final.scss'
import { BirdContext } from '../context/BirdContext'
import winBird from '../../img/winBird.gif'
import soundPlayer from '../../utils/soundPlayer'
import winAudio from '../../sounds/winAudio.mp3'
export const Final = () => {
const {state} = useConte... |
import React, { Component } from 'react'
import { connect } from "react-redux";
import {
Col,
Row,
} from 'reactstrap';
import OrderTypeItem from '../OrderTypeItem'
import InformationForm from '../InformationForm'
import LocationForm from '../LocationForm'
import Stats from '../Stats'
import { selectShippingI... |
/*Mejorado*/
var fs = require('fs')
, path = require('path')
fs.readdir(process.argv[2], function(err, archivos){
archivos
.filter(function(archivo){ return path.extname(archivo) === '.' + process.argv[3]; })
.forEach(function(archivo){ console.log(archivo); })
})
/*
var fs = require('fs');
var path = requir... |
/*
* @Author: Daniel Hfood
* @Date: 2018-03-11 20:17:13
* @Last Modified by: Daniel
* @Last Modified time: 2018-04-15 00:22:40
* @name:公共方法库
*/
var utils ={
/**
* @name:改变根元素font-size
*/
changeRootSize: function(){
var html=document.documentElement; //根元素
var clientWidth = ... |
import { useRef, useState } from "react";
import { Canvas } from "react-three-fiber";
import { OrbitControls, RoundedBox } from "@react-three/drei";
import useMeasure from "react-use-measure";
import { ResizeObserver } from "@juggle/resize-observer";
export default function Index() {
const [ref, bounds] = useMeasure... |
let dataCacheName = 'greenScreenData-v1';
let cacheName = 'greenScreenPWA-1';
let filesToCache = [
'/',
'/index.html',
'/assets/img/Screen01.png',
'/assets/img/Screen02.png',
'/assets/img/Screen03.png',
'/assets/css/app.css',
'/assets/js/app.js'
];
self.addEventListener('install', function(e) {
console... |
var data = {landing: {}}; |
var camera, scene, renderer;
var geometry, material, mesh;
init();
animate();
function init() {
scene = new THREE.Scene();
group = new THREE.Group();
camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, .1, 1000);
camera.position.set(0,0,100);
camera.lookAt(scen... |
import React from 'react';
import './index.css';
export class AppContentTripDetailImage extends React.Component{
render(){
const { tripDetailData } = this.props;
return (
<div className="app-content-trip-detail-image">
<div className="app-content-trip-detail-image-left">
<img classNam... |
'use strict';
/**
* @ngdoc function
* @name snaprOrgngApp.controller:MissionCtrl
* @description
* # MissionCtrl
* Controller of the snaprOrgngApp
*/
angular.module('snaprOrgngApp')
.controller('MissionCtrl', function ($scope, $http, $routeParams) {
$scope.locale = $routeParams.locale;
var url = 'https:... |
#!/usr/bin/node
var cheerio = require('cheerio');
var events = require('events');
var stdin = process.openStdin();
var data = "";
stdin.on('data', function(chunk) {
data += chunk;
});
stdin.on('end', function() {
console.log("DATA:\n" + data + "\nEND DATA");
});
function BlocketParser() {
this.parseAds = fu... |
var fs = require('fs');
// 3d Vector x,y,z
Vector3 = function(x,y,z){
this.x = x;
this.y = y;
this.z = z;
}
// Create a copy of the Vector
Vector3.prototype.clone = function(){
return new Vector3(this.x, this.y, this.z);
}
// Add Vectors this and v
Vector3.prototype.add = function(v){
this.x = th... |
QUnit.module("Values", () => {
['value', 'values', 'val', 'vals'].forEach(key => {
QUnit.test(`Can parse ${key} attribute`, (assert) => {
// Arrange
let el = createHtml(`<div id="data">
<div data-dtn-${key}="name">John</div>
</div>`);
... |
import axios from "axios";
export const deleteExercise = async (id) => {
const res = axios
.delete(`${process.env.REACT_APP_API_URI}/${id}`)
return (await res).data;
};
export const postExercise = async (exercise) => {
const res = axios
.post(`${process.env.REACT_APP_API_URI}/add`, exercis... |
// Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements.
// Input: nums = [0,1,0,3,12]
// Output: [1,3,12,0,0]
// Input: nums = [0]
// Output: [0]
// Solution 1
var moveZeroes = function(nums) {
let k = 0;
for (let i = 0; i < nums.length; i+... |
import React, { Component } from 'react'
import ReactDom from 'react-dom'
import './index.scss'
import axios from 'axios'
import Modal from 'sub-antd/lib/modal'
import Message from 'sub-antd/lib/message'
import Button from 'sub-antd/lib/button'
import SysIcon from 'components/sysIcon'
function show(options){
const ... |
//
// Logica Login
//
//
//
// boton de enviar del form
const botonEnviar = document.querySelector("#botonEnviar");
function toggleBoton(activado) {
// Es boton vuelve a su estado original ( que se pueda hacer click )
if (activado) {
botonEnviar.removeAttribute("disabled");
botonEnviar.innerText = "Ing... |
var COMPILED = false;
var goog = goog || {};
goog.global = this;
goog.global.CLOSURE_DEFINES;
goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) {
var parts = name.split(".");
var cur = opt_objectToExportTo || goog.global;
if (!(parts[0] in cur) && cur.execScript) {
cur.execScript("var " + pa... |
function initMap(){
var Acenter = new google.maps.LatLng(0.005745, 34.602172);// center of the map
var posA = new google.maps.LatLng(0.010451, 34.597889); // location of the map label
//create the map
var map = new google.maps.Map(document.getElementById('map'), {
center: Acenter, //define center of map
zoom:... |
Ext.define('App.model.Project', {
extend: 'App.model.BaseModel',
alias: 'model.project',
title: 'Project',
url : '/project',
fields: [{
name: 'id',
type: 'int'
},{
name: 'name',
type: 'string'
}]
}); |
Template.contact.onRendered(function() {
Session.set('contactSent', false);
this.autorun(function() {
const baseURL = Meteor.absoluteUrl().slice(0, -1);
setMeta({
title: 'Contacto',
});
});
});
Template.contact.helpers({
contactSent: function() {
return Session.get('contactSent');
},
})... |
var that = null;
var zoom = 1;
var clicked = null;
function InitializeTreatment(url, treatmentId, gender)
{
$('.severity').hide();
$('#treatment-menu a').click(function (event) {
$('#treatment-menu li').removeClass('selected');
$(this).parent().addClass('selected');
$('#treatm... |
const express = require('express');
const app = express();
const formidable = require('formidable');
const fs = require('fs');
const ExifImage = require('exif').ExifImage;
app.set('view engine', 'ejs');
app.get('/', (req, res) => {
res.render("upload");
})
app.get('/map', (req, res) => {
let location = {
... |
const express = require('express')
const router = express.Router()
const mongoose = require('mongoose')
const Menu = require('../models/menu')
const MenuItem = require('../models/menu_items')
const Cart = require('../models/cart')
const Order = require('../models/order')
const User = require('../models/user')
const c... |
define([ require ], function() {
'use strict';
var utilities = {
showDebug : function(data) {
console.log(data);
},
/* drawText: function(controlObject, position, partPosition){
$('#cameraX').html(Math.floor(position.x)/20);
$('#cameraY').html(Math.floor(position.y)/20);
$('#cameraZ').html(Math.fl... |
import React, {Component } from 'react';
import {fetchMovie} from "../actions/movieActions";
import {setReview} from "../actions/movieActions";
import {connect} from 'react-redux';
import {Card, ListGroup, ListGroupItem} from 'react-bootstrap';
import {Image} from 'react-bootstrap';
import {BsStarFill} from 'react-icon... |
const nodemailer = require('nodemailer');
const config = require('../config/config.js');
function sendEmail(msg, callback) {
const transporter = nodemailer.createTransport('smtps://' + config.MAILER_USER + ':' + config.MAILER_PASS + '@smtp.gmail.com');
let mailOptions = {
from: '"Master the TOEFL" <contact@ma... |
'use strict';
describe('lists location orders', function () {
var $scope;
var element;
var $location;
var orderFactory;
var locationFactory;
var splashFactory;
var q;
var deferred;
var $httpBackend;
beforeEach(module('myApp', function($provide) {
orderFactory = {
query: function () {
... |
import React from "react";
export class Title extends React.Component {
render() {
return (<h1 className={this.props.styleName}>Holly Schoenbauer</h1>);
}
}
Title.defaultProps = {
styleName: 'title'
}; |
const Event = require('../../../models/event'),
User = require('../../../models/user'),
{ dateToString } = require('../../../helpers/date'),
{ transformEvent } = require('../common'),
log = require('../../../helpers/logger/log')(module.filename),
HttpError = require('../../../error/HttpError');
const createEvent ... |
export async function login (values) {
if(values.username == 'guest' && values.password == 'guest'){
// console.log("写的对")
// console.log(values.username)
// console.log(values.password)
// setTimeout("console.log('等三秒回传')","3000");
return true;
}else{
// console.log("写的bu对")
// console.log(v... |
'use strict';
/*
* NLP BASE
*/
const HandlerBase = require(`../handlerBase`);
module.exports = class NlpBase extends HandlerBase {
/*
* Initialises a new NLP handler.
*/
constructor (type, handlerId) { // eslint-disable-line no-useless-constructor
super(type, handlerId);
this.ROUNDING_NUM_DECIMALS = 6;... |
module.exports = function(db){
return {
"Application": require('./application'),
"UserType": require('./userType')(db),
"User": require('./user')(db),
"Role": require('./role')(db),
"Key": require('./key')(db)
}
} |
import React from 'react';
export default class HomePage extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div style={{
width: "100%",
height: "100%"
}}>
<h1> This is the homepage </h1>
</div>
);
}
}
|
export const FETCH_STYLES_REQUEST = 'FETCH_STYLES_REQUEST'
export const FETCH_STYLES_SUCCESS = 'FETCH_STYLES_SUCCESS'
export const FETCH_STYLES_FAILURE = 'FETCH_STYLES_FAILURE'
import { CALL_API } from '../middleware/api'
import { config } from '../config.js'
export function fetchStyles() {
return {
[CALL_API]:... |
var i=1;
var loc;
var data ={"name":'',"date":undefined, "time":40,"items":undefined, "desc":undefined,"cost":undefined,"allergies":undefined,"toatl":undefined};
var events=[];
var allergies=[];
var todo=[];
var weekday =["Sun", "Mon", "Tue", "Wed","Thur", "Fri","Sat"]
var monthNames = ["Jan", "Feb", "Mar", "Apr", "Ma... |
console.log('Sanity Check: Quick Sort');
var unsorted = [3, 6, 1, 8, 2, 4, 9, 5, 7];
// debugger;
function quickSortStarter(array) {
return quickSort(array, 0, array.length-1);
function quickSort(array, left, right) {
// debugger;
var i = left;
var j = right;
var pivot = array[Math.floor((left+r... |
import React from 'react';
import {
makeStyles,
IconButton,
Dialog,
Slide,
AppBar,
Toolbar,
Typography,
Box
} from '@material-ui/core';
import CloseIcon from '@material-ui/icons/Close';
import FilmDetail from './FilmDetail';
const Transition = React.forwardRef(function Transition(props, ref) {
retur... |
import { GET_TOPICS, ADD_TOPIC, GET_CHATS, ADD_CHAT, DELETE_TOPIC, SET_VISIBLE_FALSE, GET_USER_CHATS } from '../actions/types';
const initialState = {
topics: [],
topicLoaded: false,
chats: [],
chatLoaded: false,
userChats: [],
snackBarVisible: false,
snackBarMessage: ''
}
const forumReduc... |
import React from "react";
import {Card, Col, InputNumber, Row, Slider} from "antd";
class SliderWithNumber extends React.Component {
state = {
inputValue: 1,
};
onChange = (value) => {
this.setState({
inputValue: value,
});
};
render() {
return (
<Card className... |
import React from 'react';
import classes from './BuildControls.module.css';
import priceFormatter from '../../../utilities/priceFormatter';
import BuildControl from './/BuildControl/BuildControl';
const BuildControls = props => {
const ingredientQuantities = Object.values(props.ingredients);
const ingredientsLis... |
// Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
// You must write an algorithm with O(log n) runtime complexity.
// Input: nums = [1,3,5,6], target = 5
// Output: 2
// Input: nums = [1,3... |
this.VelhaMania.module('HomeApp', function (HomeApp, App, Backbone, Marionette) {
var API;
HomeApp.Router = Marionette.AppRouter.extend({
appRoutes: {
'': 'home'
},
before: {
'': function () {
var user = App.request('user:entity');
... |
import React, { Component } from "react";
export default class ScrollToTop extends Component {
constructor(props) {
super(props);
this.state = {
is_visible: false
};
}
componentDidMount() {
var scrollComponent = this;
document.addEventListener("scroll", function(e) {
scrollCompon... |
$(document).ready(function($) {
// smooth scrolling
$('.internal').click(function(e){
e.stopPropagation();
$target = $( $(this).attr('href') );
offset = $target.offset().top - 51; //for header bar
$('body').animate({scrollTop: offset}, 400);
});
$('.read_more').click(function(e... |
function replace(message, parameters) {
let msg = '';
for (let i = 0; i < parameters.length; i += 1) {
msg = message.replace(`{${i}}`, parameters[i]);
}
return msg;
}
export const ISREQUIRED = 'Campo Obrigatório.';
export const HABILITADO_SUCESSO = 'Registros habilitado com sucesso.';
export const DESABI... |
"use strict";
const util = require('util');
const Message = require(__dirname + '/message');
const REQUIRED_ARGUMENTS = ["richMedia"];
function RichMediaMessage(richMedia, optionalKeyboard, optionalTrackingData, timestamp, token, optionalAltText, minApiVersion) {
this.richMedia = richMedia;
this.altText = !optional... |
/**
* Ast node class for xtemplate
* @author [email protected]
*/
KISSY.add("xtemplate/ast", function (S) {
var ast = {};
ast.ProgramNode = function (lineNumber, statements, inverse) {
this.lineNumber = lineNumber;
this.statements = statements;
this.inverse = inverse;
};
a... |
import React, { Component } from 'react';
export default class searchBar extends Component {
constructor(props) {
super(props);
this.state = {
route: "",
stop : "",
all: ""
};
this.handleChange = this.handleChange.bind(this);
}
handleChange(event){
if(event.target.value > 0){
fetch("/routes/"+e... |
import React from "react";
export default function RegisTable({user, logout = f => f}) {
return (
<div>
<table>
<tbody>
<tr>
<td>Imię</td>
<td>{user.name}</td>
</tr>
<tr>
... |
const express = require('express');
const crypto = require('crypto');
const db = require('../db/mysql');
const router = express.Router();
router.get('/login', function (req, res) {
const {auth} = req.session;
res.render('login', {
auth,
error: !!req.query.error,
});
});
router.get('/regis... |
// Ce fichier de fonctions JavaScript a été récupéré
// du code de l'administration des applications SDX
// Auteurs : AJLSM
// revu et réarrangé par Pierre DITTGEN
/**
* Clears the select content
* @param selectId HTML select element id
*/
function _2colsClearSelection(selectId) {
var select = document.getElement... |
#!/usr/bin/env node
require('../global');
const dvxCLI = require('./config');
const yargs = dvxCLI.getYargs();
const argv = yargs.argv;
const command = argv._[0];
if (command in dvxCLI.cmd) {
dvxCLI.cmd[command](argv);
} else {
yargs.showHelp();
}
|
const gulp = require('gulp');
const zip = require('gulp-zip');
gulp.task('zip', [
'lint',
'clean:bin',
'clean:dist',
'run:webpackProd',
'copy:manifest',
'copy:html',
'copy:img',
'copy:i18n',
'copy:background',
], () =>
gulp.src('bin/**/*')
.pipe(zip('archive.zip'))
... |
const express = require ('express')
const router = express.Router()
const usuario = require ('../controllers/Usuario')
//const conn=require('../database/db')
router.get('/',(req, res)=>{
//conn()
res.render('index')
})
//CONTROLLERS
router.post('/registrar', usuario.registrar)
module.exports=router |
// const resourceRoutes = require("./resource");
const jsonServer = require('json-server');
const middlewares = jsonServer.defaults();
const router = jsonServer.router('data.json');
// // resources routes
// router.use("/resourece", resourceRoutes);
module.exports = router; |
var searchData=
[
['windows',['WINDOWS',['../util_8c.html#a3e30c662f9b7dcccc3466253b65e7b1aa24dfb0dfbc26bfbff6ba7d638f7b9ceb',1,'util.c']]]
];
|
import DS from 'ember-data';
import EmberObject, { computed, get } from '@ember/object';
import parseResponseHeaders from 'ember-ajax/-private/utils/parse-response-headers';
import { all, resolve, Promise as EmberPromise } from 'rsvp';
import { schedule, next } from '@ember/runloop';
import { singularize } from 'ember-... |
import React from 'react';
import { render, screen } from '@testing-library/react';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import Main from './Main';
import { BrowserRouter as Router } from 'react-router-dom';
const server = setupServer(
rest.get(
'https://hey-arnold-api.herokuapp.co... |
import { Fab, Icon } from 'native-base';
import React from 'react';
import { FlatList, StyleSheet, Text, View } from 'react-native';
import { connect } from "react-redux";
import { desvincularClinica } from "../../actions/medicos/CadastroMedicosAction";
import { buscarMedicoEdicao } from "../../actions/medicos/MeusMedi... |
var user1 = {
id: 1,
name: "Jimena Luperdi",
}
var user2 = {
id: 2,
name: "Carmen Rodriguez",
}
var book1 = {
title: "Cujo",
category1: "Horror",
ISBN: 843030407,
}
user1.books = [];
user2.books = [];
var book2 = {
title: "Carrie",
category: "Horror",
ISBN: 8497364678,
}
v... |
import DS from 'ember-data';
import App from 'ember-application';
App.UserModel = DS.Model.extend({
username: DS.attr('string'),
email: DS.attr('string'),
contactInformation: DS.belongsTo('contact-information', {
async: false
}),
profiles: DS.hasMany('profile', {
async: false
})... |
function frequency(){
document.getElementById("frequency_list").innerHTML = "";
var text = document.getElementById("text").value;
var array = String(text).split('');
var textLength = array.length;
var collection = [];
var ascii;
var counter = 0;
var asciis = [];
var arrayForEntropy = [];
for (var i = 0; i <... |
//Defining Event for submit. When size is submitted by the user, call makeGrid()
var sizePicker = document.getElementById("sizePicker");
var table = document.getElementById("pixelCanvas");
sizePicker.addEventListener('submit', function(event) {
event.preventDefault();
makeGrid();
})
//Defining makeGrid fun... |
import React, { Component } from 'react';
import { takeRightWhile, last } from 'lodash';
import { View, Heading, Title, TouchableOpacity, TextInput } from '@shoutem/ui';
import CircleButton from './CircleButton';
const CommitmentDay = ({ done, style }) => (
<View style={style} styleName={done ? 'done' : 'undone'... |
// console.log(`hello`);
// In (pass it) ->
// Do something
// 1. Purely related to the input and output (pure function)
// 2. Or cause an effect elsewhere in the app (a side effect)
// Get something out (return) ->
// Input a string
// Reverse it
// Output that reversed string
// (){}: skeleton (): parameters/arg... |
require('dotenv').config();
const express = require('express');
const cors = require('cors');
const apiRoutes = require('./routes/api');
const authorRoutes = require('./routes/author');
const publisherRoutes = require('./routes/publisher');
const bookRoutes = require('./routes/book');
const bookCategoryRoutes = requir... |
const express = require('express');
const HttpStatus = require('http-status-codes');
const invitations = require('./datastore');
const cors = require('cors');
const app = express();
app.use(express.static('public'));
app.use(cors());
app.get('/', async(req, res) => {
let email = req.query.email;
console.log(e... |
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(ex... |
//Javascript for dynamically creating selectboxs
function go() {
//gets the body tag of the html
var body = document.getElementsByTagName("body")[0];
// creates a div tag
var divTag = document.createElement("div");
//creates the select box
var selectBox = document.createElement("select");
... |
const AWS = require('aws-sdk');
var express = require('express');
var router = express.Router();
var util = require("util");
var fs = require("fs");
var multer = require('multer');
const config = require('./../config.json');
const path = require('path');
const readFile = require('fs').readFile;
AWS.config.update({... |
import React, { Component } from 'react';
import {
StyleSheet, View, Text, Image, TouchableOpacity,
} from 'react-native';
import moment from 'moment';
import CommonStyles from '../common/Styles';
import math from '../config/math';
import * as nativeApi from '../config/nativeApi';
export default class WMOrderBottomB... |
'use strict';
angular.module('mkSynthesizer.view', [
'mkSynthesizer.view.synthesizer'
]); |
import React from 'react';
import { StyleSheet, TouchableOpacity, View, Text } from 'react-native';
function CalcButton({
text, bgColor, txtColor, nightMode, setNightMode,
displayText, setDisplayText, decimal, setDecimal,
equation, setEquation, newNum, setNewNum}){
//Convert text to a number
fun... |
let button = document.getElementById("backup");
button.addEventListener("click", () => {
button.disabled = true;
button.innerHTML = "Please wait...";
chrome.cookies.getAll({}, (ret) => {
downloadTextAsFile(`cookies-${getDateAsString()}.kukiz`, JSON.stringify({cookies: ret}));
b... |
import "./ListGroup.css";
import {NavLink} from "react-router-dom"
class ListGroup extends React.Component {
render(){
return (
<div className="ListGroup">
{this.props.children}
</div>
)}
}
class ListItem extends React.Component {
render(){
return (
<NavLink to={this.props.to} className="ListItem flex... |
app.controller('page' , ['$scope' , '$http' , '$route' , '$routeParams' ,'$location' , 'authen', 'localStorageService' , 'dateTime' , 'Pages' , 'pageTitle', 'Upload', '$timeout', 'Users', '$state', '$stateParams', function($scope, $http, $route, $routeParams, $location, authen, localStorageService, dateTime, Pages, pag... |
import axios from "axios";
const apiUrl = process.env.REACT_APP_API_URL;
export const GetPopular = () => {
return axios.get(`${apiUrl}/movie/popular`, {
params: { language: "en-US" },
});
};
export const SearchMovies = (searchText) => {
return axios.get(`${apiUrl}/search/movie`, {
params: { language: "... |
const aeristaRoute = require('express').Router();
const { aeristaController } = require('../controllers/index');
aeristaRoute.get('/aerista/list', aeristaController.list);
module.exports = aeristaRoute; |
import React from 'react';
import { ToastContainer } from "react-toastify";
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createFirestoreInstance } from 'redux-firestore';
import store from './redux/store';
import { initFirebase, firebase, rrfConfig } from './firebase/firebase';
imp... |
import { keyframes } from 'styled-components'
export const slide = (start, isAbsolute) =>
isAbsolute ? slideIn(start) : relativeSlideIn(start)
const slideIn = start => keyframes`
from {
top: ${start};
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
`
const relativeSlideIn = start => keyframes`
... |
export const remote = {
dialog: {
showOpenDialog: jest.fn(),
showSaveDialog: jest.fn()
}
} |
var consoleStyle = 'background: #222; color: #bada55';
var Homework = new function(){
var self = this;
self.problems = [
{
title: "Numbers",
body: function(){
// Write a script that prints all the numbers from 1 to N.
self.helperFunctions.printNumbersToN(10);
}
},{
title: "Numbers not divisible",
b... |
"use strict";
var constants_1 = require('../constants');
var immutable_1 = require('immutable');
var INITIAL_STATE = immutable_1.fromJS({
token: null,
user: {},
hasError: false,
isLoading: false
});
function sessionReducer(state, action) {
if (state === void 0) { state = INITIAL_STATE; }
if (act... |
const express = require('express');
const bodyParser = require('body-parser');
const morgan = require('morgan');
const dotenv = require('dotenv');
dotenv.config();
const cors = require('cors');
const { authCheck } = require('./helpers/jwt');
const {
subscribersRoutes,
authRoutes,
userRoutes,
} = require('./route... |
/*require配置:定义js文件路径*/
require.config({
paths: {
jquery: 'lib/jquery',
ejs: 'lib/ejs_production',
shopcar:'lib/shopcarutils',
weixin:'lib/wx',
bootstrap:'lib/bootstrap'
}
});
requirejs.config({
shim:{
'bootstrap':{
deps:['jquery'],
exp... |
import * as React from 'react';
export default class QuestionScreen extends React.Component {
constructor(props) {
super(props)
this.state = {
type: this.props.route.params.type,
question: this.props.route.params.question,
incorrect_answers: this.props.route.para... |
$(document).ready(function() {
var map;
var myCenter=new google.maps.LatLng(53, -1.33);
var contentString = 'htrtutuy';
var infowindow = new google.maps.InfoWindow({
content: contentString
});
function initialize() {
var mapProp = {
center:myCenter,
zoom: 14,
draggable: true,
scrollwhe... |
/**
* CSS property that will contain text to a given amount of lines when used in combination with `display: -webkit-box`. It will end with ellipsis when `text-overflow: ellipsis` is included.
* @see https://caniuse.com/css-line-clamp
*/
/**
* @type {import('../features').Feature}
*/
export default {
'line-clam... |
const fs = require('fs')
const Discord = require('discord.js')
const client = new Discord.Client()
const info = JSON.parse(fs.readFileSync('./token.JSON'))
const token = info.token
client.once('ready', () => {
console.log('Ready!')
})
client.on('message', msg => {
var prefix = msg.content.split(' ', 2)[0].toLowe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.