text stringlengths 7 3.69M |
|---|
/* eslint no-var:0 */
var webpack = require('webpack');
var base = require('./webpack.config');
base.plugins = [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin(),
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.DefinePlugin({
... |
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
'dijit/_TemplatedMixin',
'dijit/_WidgetsInTemplateMixin',
'gis/dijit/_FloatingWidgetMixin',
'dojo/_base/lang',
'dojo/on',
'dojo/dom-construct',
'dijit/registry',
'dojo/text!./LocatorControl/templates/LocatorContr... |
"use strict";
require("run-with-mocha");
const assert = require("assert");
const DistanceModelType = require("../../src/types/DistanceModelType");
describe("types/DistanceModelType", () => {
it("Symbol.hasInstance", () => {
[
DistanceModelType.LINEAR, "linear",
DistanceModelType.INVERSE, "inverse",... |
import PropTypes from "prop-types";
export const propTypes = {
color: PropTypes.string,
start: PropTypes.shape({
x: PropTypes.number,
y: PropTypes.number
}),
end: PropTypes.shape({
x: PropTypes.number,
y: PropTypes.number
})
};
export const defaultProps = {
color: "#8E91A8",
start: { x: ... |
const test = require('../../test');
module.exports = function(argv) {
let options = {
fnName: 'lengthAnnouncer',
esVersion: 5,
allowHigherOrderFns: false
};
let test1 = {
input: 'lengthAnnouncer("Science")',
expected: 'Science has 7 characters!'
};
let test2 = {
input: 'lengthAnnouncer("Arts")',
exp... |
import React, { Component } from "react";
import "./App.css";
import FakeWeather from "./data/FakeWeather.json";
import Search from "./search.js";
import CurrentWeather from "./CurrentWeather";
import WeatherLater from "./WeatherLater";
class App extends Component {
constructor(props) {
super(props);
this.s... |
// Generated by CoffeeScript 1.6.3
var BuildTask, CompileStylus, Future, fs, mkdirp, nib, path, pathToCore, pathUtils, replaceImportRe, stylus, stylusLib, _pathUtils, _ref,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = pa... |
import React from 'react'
import firebase from '../Config/Firebase'
import TouchableScale from 'react-native-touchable-scale'
import { Text, View, StyleSheet, Image, TextInput, ActivityIndicator } from 'react-native'
const VerifyScreen = ({ route, navigation }) => {
const { verificationId } = route.params
const ... |
import React, {Component} from 'react';
import {View, Text} from 'react-native';
import PropTypes from 'prop-types';
import PPRefreshLayout from '../widget/PPRefreshLayout';
import WeatherHeaderWidget from '../widget/WeatherHeaderWidget';
import WeatherHeaderComponent from './WeatherHeaderComponent';
import HourWeath... |
const fs = require('fs');
const path = require ('path');
const { buildSchema } = require('graphql');
const commentClient = require('../client/comment');
const praiseClient = require('../client/praise');
const schema = buildSchema(
fs.readFileSync(path.resolve(__dirname, '..... |
export default function editorUrl(config, file, lineNumber) {
const editor = config.editor;
const editors = {
sublime: 'subl://open?url=file://%path&line=%line',
textmate: 'txmt://open?url=file://%path&line=%line',
emacs: 'emacs://open?url=file://%path&line=%line',
macvim: 'mvim:... |
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const ESLintPlugin = require('eslint-webpack-plugin');
const config = {
entry: './src/index.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'createjs-accessibility.js',
library: {
name: 'createj... |
[{
'id' : "1",
'icon' : "images/menuPanel/tag_blue3.gif",
'text' : "\u6625\u5B63",
'leaf' : true
}, {
'id' : "2",
'icon' : "images/menuPanel/tag_blue3.gif",
'text' : "\u590F\u5B63",
'leaf' : true
}, {
'id' : "3",
'icon' : "images/menuPanel/tag_blue3.gif",
'text' : "\u79CB\u5B63",
... |
var $btn = $('#btn')
var $changeColor = $('#change-color-div')
var $inputSth = $('#input-show-box>input')
var $select = $('#select-box>select')
var $showScrollTop = $('#showscrollTop>p')
var $window = $(window)
//点击方块连续变色
$btn.on('click',function(){
$(this).css('background-color','red')
setTimeout(function(){
$b... |
//toUpperCase();
//toLowerCase();
let someTxt="I'm a lit-tle tea pot";
function titleCase(str) {
let allLettersLowerCase="";
let regMachWord=/\w*['-]?\w*\S/ig; // don't know how to exclude some symbols, for intance if we're gonna have a comma.
let arrSepWords=[];
let transformedSentence="";
allLett... |
angular.module("MainApp").directive('templateForm', function ($compile,$http) {
return {
restrict: 'EA',
scope: {
tMode:'@',
printParams:'@',
tForm: '=',
tTemplate:'=',
},
// template: '<div><input type="text" ng-model="tForm.BP"></div><textbox ng-model="tForm.BP"></textbox>',
link: function (scop... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const THREE = SupEngine.THREE;
class P2Body extends SupEngine.ActorComponent {
constructor(actor) {
super(actor, "P2Body");
this.actorPosition = new THREE.Vector3();
this.actorAngles = new THREE.Euler();
thi... |
const args = require('minimist')(
process.argv.slice(2), {
default: {
accounts: '../accounts.txt'
},
alias: {
accounts: ['a', 'acc']
}
})
require('./consolescreens.js')
const mineflayer = require('mineflayer')
const pvpwarsPlugin = require('./pvpwars.plugin.js')
const server = require... |
import React from 'react'
import { ReactComponent as Comments } from './assets/comments.svg'
import { ReactComponent as Likes } from './assets/likes.svg'
import { ReactComponent as Reposts } from './assets/reposts.svg'
import { ReactComponent as Views } from './assets/views.svg'
const icons = {
comments: Comments,
... |
class MyChildren extends React.Component{
render(){
return (
<CardBlock>
<Card content="This is card A." />
<Card content="This is card B." />
<Card content="This is card C." />
</CardBlock>
);
}
}
class CardBlock extends R... |
import React from "react";
import "./styles/botonesOpciones.css";
import items from '../items.json';
import salsa from '../images/salse.jpg';
import adiciones from '../images/adicion.jpg';
import hamburguesa from '../images/hamburguesa.jpg'
function BotonesOpciones (props){
const facturaAdiciones = (element) =>... |
import Taro from '@tarojs/taro'
import * as Service from '../service';
export default {
namespace: 'productSelect',
state: {
searchTypes: [
{
key: '商品名',
value: 'productName'
},
{
key: '类别',
value: 'customerType'
},
{
key: '备注',
valu... |
import localforage from 'localforage'
import { app } from '~/services/firebaseConfig'
export default {
async initApp ({ rootState, commit, dispatch }) {
if (this.$router.currentRoute.name === 'login') {
commit('setAppStatus', 'loading')
}
await dispatch('demo/getDemoDataStatus', null, { root: true... |
require('../js/app.js');
require('../css/post.css'); |
import createAsyncAction from '../../../createAsyncAction';
import ApiService from '../../services/api.service';
import HttpService from '../../services/http.service';
export const FETCH_EXAMPLE = '@@{{ component_name }}/FETCH_EXAMPLE';
export const FetchExampleAction = createAsyncAction(FETCH_EXAMPLE, () => {
cons... |
$('#post-form').on('submit', function (e) { //задаем действие при отправке данных формы аякс запросом
e.preventDefault();
$.ajax({
url: '/ajax',
type: 'POST',
dataType: 'JSON',
data: $('#post-form').serialize(),
success: function (data) {
if (data.msg==tr... |
const User = require("../modal/user.modal")
const { StatusCodes } = require('http-status-codes')
const jwt = require('jsonwebtoken')
const { OAuth2Client } = require('google-auth-library')
const client = new OAuth2Client('566957944883-4ovoi05bh8g3ktjqju57r7s2fgte1e36.apps.googleusercontent.com')
// node mailer to sen... |
const express = require('express');
const app = express();
const path = require('path')
var cookieParser = require('cookie-parser');
const apiRouter = require('./routes/index');
const port = 8080;
const getPath = (file) => {
return path.join(__dirname + file);
}
app.use(express.urlencoded({ extended: false }));
a... |
const USER_ID = Math.floor(Math.random() * 1000000001);
class IM {
constructor(client, userName) {
return (async () => {
// All async code here
this.client = await client.login({
token: "",
uid: userName,
});
return this; // when done
})();
}
async createChannel(... |
import PersonModel from '../models/personsModel.js'
import XlsGoogleParser from './xlsGoogleParser.js'
import DateHelper from '../helper/dateHelper.js'
import Jimp from 'jimp'
import ImageHelper from '../helper/imageHelper.js'
import StrHelper from '../helper/strHelper.js'
export default class XlsGoogleParserPersons e... |
// @flow
/* eslint no-bitwise: 0 */
/* eslint no-plusplus: 0 */
/* **********************************************************
* File: test/factories/sensorsFactory.js
*
* Brief: Factory for creating pseudorandom sensor objects
*
* Authors: Craig Cheney
*
* 2017.09.22 CC - Document created
*
****************************... |
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import App from './App';
import EventEmitter from 'events';
import getTheme from './themes';
import mkDebug from 'debug';
import parseUrl from 'url-parse';
const debug = mkDebug('budgeteer-landing');
const ... |
'use strict';
angular.module('Normal', ["chart.js"])
.controller('NormalController',
function ($scope, $confirm, $uibModal, Notification) {
$scope.colors = ['#E54125', '#059BFF', '#4BC0C0', '#FFCE56', '#E7E9ED'];
$scope.dataSeries = ['Numeros Aleatorios'];
$scope.onClick = function(points, evt) {
... |
import React from "react";
import classes from "./SectionStatus.module.css";
import { Link } from "react-router-dom";
const SectionStatus = (props) => {
return(
<>
<div className = {classes.innerDiv}>
<Link to = "problem" className = {classes.linkDesign}>
<... |
"usestrict"
let message;
const ADMIN_PASSWORD = "12Rat";
let password = prompt("Input your password, please", );
if ( password === null ) {
message = 'Скасовано користувачем!';
} else if ( password == ADMIN_PASSWORD) {
message = 'Ласкаво просимо!';
} else message = 'Доступ заборонений, невірний пароль!';
alert... |
import { Container } from 'pixi.js';
/**
* Base class for current game state representation
* Provides utilities for state manipulation
*/
export default class State extends Container {
constructor(name, gameContext) {
super();
this.name = name;
this.gameContext = gameContext;
}
... |
var API_getNewslistByPage = require("../../../../utils/config.js").API_getNewslistByPage,
API_referQr = require("../../../../utils/config.js").API_referQr;
var app = getApp();
Page({
onLoad() {
// 页面初次加载,请求第一页数据
this.getNewslist(1,true)
},
onShow() {
wx.reportAnalytics('enter_home_programmatica... |
function ageInDays(){
var birthYear = prompt('What year were you born?');
var ageInDayss =(2020-birthYear)*365;
var h1 = document.createElement('h1');
var textAnswer = document.createTextNode('You are '+ ageInDayss +' days old.');
h1.setAttribute('id','ageInDays');
h1.appendChild(textAnswer);
... |
import React from 'react';
import { css } from 'react-emotion';
import { onlyUpdateForKeys } from 'recompose';
import { readableColor, transparentize, tint } from 'polished';
import { T } from 'ramda';
import { RIEInput } from 'riek';
import PropTypes from 'prop-types';
import {
shevy,
colors,
transitionTim... |
const TestDataEnvironment = require('./resources/test-data-environment.js');
const jasmineReporters = require('jasmine-reporters');
const testDataEnvironment = new TestDataEnvironment();
// conf.js
exports.config = {
restartBrowserBetweenSuites: true,
specs: ['**/*.spec.js'],
suites: {
e2e: 'e2e/**/*.spec.j... |
import React from 'react'
import Heading from "../resuable/Heading"
import TextField from "@material-ui/core/TextField"
import { makeStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
export default function ContactForm() {
const useStyles = makeStyles({
root: {
... |
const btnTrigger = document.querySelector('.btnTrigger');
const notification = document.querySelector('.small-notif-notification');
const close = document.querySelector('.small-notif-close');
btnTrigger.addEventListener('click', (e) => {
e.preventDefault();
// console.log(btnTrigger);
if (!notification.classList... |
$(document).ready(function () {
/*
var beatMe1 = document.getElementById('beat1');
var beatMe2 = document.getElementById('beat2');
var beatMe3 = document.getElementById('beat3');
var beatMe4 = document.getElementById('beat4');
var beatMe5 = document.getElementById('beat5');
var bassMe1 = docum... |
/**
* ER (Enterprise RIA)
* Copyright 2013 Baidu Inc. All rights reserved.
*
* @file 杂而乱的工具对象
* @author otakustay, errorrik
*/
/**
*
* Modified on June 2013
* To fit in the Baidu frontia JS SDK framework.
* @author tongyao@baidu.com
*/
baidu.frontia.util = {};
(function (namespace_) {
var n... |
import React from 'react'
import { Draggable } from 'react-beautiful-dnd'
import PropTypes from 'prop-types'
import s from './DraggableItem.css'
import DeleteIcon from '@components/icons/DeleteIcon'
import GeoIcon from '@components/icons/GeoIcon'
const DraggableItem = ({ itemData, onItemRemove, onItemClick, onShowDeta... |
//all of the variables used on cover page of the quiz
var backgroundImg, coverImg, quiztitleImg, quiztitle, toppictureframeImg, toppictureframe, midpictureframeImg
var midpictureframe, bottompictureframe, bottompictureframeImg, toppictureframephotoImg, toppictureframephoto
var midpictureframephoto, midpictureframeph... |
require('./bundle.js')
module.exports.search = global.search
module.exports.alexa = global.alexa
module.exports.suggest = global.suggest |
var slice = Object.call.bind(Array.prototype.slice);
var forEach = Object.call.bind(Array.prototype.forEach);
var isToken = RegExp.prototype.test.bind(/^[A-Z]+$/);
function Statement(token, expression, param){
this.token = token;
if(expression) this.expression = expression;
if(param!==undefined) this.param = pa... |
/**
* @type {Number}
*
* @properties={typeid:35,uuid:"EAF8EA85-09CD-4E2A-9634-AE491D9F2EDB",variableType:8}
*/
var _idDittaLegata = null;
/**
* @type {Number}
*
* @properties={typeid:35,uuid:"BCA6E9A2-A99B-4899-B06F-93EE1D691890",variableType:8}
*/
var _idDitta = null;
/**
* @type {Number}
*
* @properties... |
import React from 'react';
import './index.css';
import moment from 'moment';
import { Link } from 'react-router-dom';
import style from './voteStyle.css';
let postDate = (timestamp) => {
return moment(timestamp).format('DD/MM/YY HH:mm:ss');
}
export default function List(props) {
if (props.type === "post") {... |
angular.module("app") /// seguindo assim pode ser sem modulos novos só pedir sempre o modulo de app fodasse a performance :)
.component("inicialApp", { //// nomo do componente no html trasformar as maiusculas em traço mais a letra maiscula em minuscula exemplo view-teste
templateUrl: '../html/inicial.html',... |
import $ from '../../core/renderer';
import Toolbar from '../toolbar';
import ContextMenu from '../context_menu';
import DiagramBar from './diagram.bar';
import { extend } from '../../core/utils/extend';
import { hasWindow, getWindow } from '../../core/utils/window';
import DiagramPanel from './ui.diagram.panel';
impor... |
angular.module("mainModule", [
"ngTouch"
]); |
/*global Collection, PagedCollection */
describe('PagedCollection', function() {
var collection;
beforeEach(function() {
collection = new PagedCollection();
collection.url = 'foo';
collection.collectionField = 'item';
collection.countField = 'totalCount';
collection.pageSize = 3;
});
it('sh... |
/**
*
* jQuery Tooltips by Nick Snyder (http://nicksnyder.is)
*
* Copyright (c) 2015 Nick Snyder
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including withou... |
var jsonQuery = require('../src/index.js');
var testJSON = [
['name', 'owner', 'species', 'sex', 'birth', 'death'],
["Fluffy", "Harold", "cat", "f", "1993-02-04", null],
["Claws", "Gwen", "cat", "m", "1994-03-17", null],
["Buffy", "Harold", "dog", "f", "1989-05-13", null],
["Fang", "Benny", "dog", "m", "1... |
import db from '../models/index'
var bcrypt = require('bcryptjs');
var salt = bcrypt.genSaltSync(10);
let handleUserLogin = (email, password) => {
return new Promise ( async (thanhcong,thatbai) => {
try {
let userData = {}
let isExist = await checkUserEmail(email) // check Email có... |
var $data = [];
var currentPage = 1;
var recordsPerPage = 5;
let getData = new Promise((resolve, reject) => {
resolve(
fetch("/assets/data/data.json")
.then(res => res.json())
.then(data => data._embedded.episodes)
);
});
getData.then(data => {
$data = data;
changePage(1);
});
function prevPag... |
import {UserDropdownSystemItem} from "../userDropdownItem";
/** Div which contains Logo svg */
export const StyledDropdownSettingsItem = UserDropdownSystemItem |
var searchData=
[
['h_5fto_5fintl',['H_TO_INTL',['../envelope_8c.html#a9ddc5b683d5a87677c1756fe44ff4217',1,'envelope.c']]],
['hc_5ffext',['HC_FEXT',['../pop_8c.html#ab0029aa20b987416bdcd51e73e7091b5',1,'pop.c']]],
['hc_5ffirst',['HC_FIRST',['../history_8c.html#a405244b558f153aeea5586728370eb85',1,'history.c']]],
... |
//Module dependencies.
var express = require('express');
var app = express();
var http = require('http');
var path = require('path');
var cors = require('cors')
var handlebars = require('express3-handlebars')
bodyParser = require('body-parser');
app.set('views', path.join(__dirname, 'views'));
app.engine('handlebars', ... |
import React, { Component } from 'react';
import { Container, Text } from 'react-pixi-fiber';
import Box from 'Client/Components/Box';
import FlatButton from 'Client/Components/FlatButton';
import Animated from 'animated';
import { connect } from 'react-redux';
const AnimatedBox = Animated.createAnimatedComponent(Box)... |
import React from "react";
import Dialog from "@material-ui/core/Dialog";
// import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/core/DialogContent";
import DialogActions from "@material-ui/core/DialogActions";
// import DialogContentText from "@material-ui/core/DialogCo... |
export * from './DateInputs'
|
// Render the circles using React!
const App = (props) => {
let { circles } = props;
let circleComponents = circles.map( (circle, arrayIndex) => {
return <Circle circle={circle} key={arrayIndex}/>
});
return <div>{circleComponents}</div>
} |
$(function() {
// let backMusic = $("<audio src='../music/background.mp3' autoplay id='hint'/>");//加bg音乐
// backMusic.appendTo("body");
/*自动播放 */
let index = 0; //当前按钮的位置
let next = 0;
let per = 0;
let btnT = false; //判断是否能继续点击
let backMusic = document.getElementsByClassName("backMusic")... |
import React from 'react'
import {
ActivityIndicator,
KeyboardAvoidingView,
Platform,
ScrollView, Image,
TouchableOpacity, FlatList,
View, Dimensions, TextInput, DeviceEventEmitter, TouchableHighlight,
Alert,
ImageBackground,
Linking,
} from 'react-native'
import { colors } from '../... |
var UnityWebGlHttpHandlerPlugin = {
HttpRequest: function (requestPointer) {
var debug = false;
debug && console.debug("HttpRequest");
try {
var requestString = Pointer_stringify(requestPointer);
debug && console.debug("HttpRequest::requestString::" + requestString);
var request = JSON.par... |
/**
* Controller
*/
class Controller {
constructor(){
this.scope = new Scope();
}
init(){
parseDom(document.body, this.scope);
digest();
}
} |
/*
* Sample implementation
*/
$(function(){
// Implementation
$('#swipe').swipe({ swipeTime: 800, swipeX: 100, left: swipeLeft, right: swipeRight });
// Left/Right custom functions
function swipeLeft(){
console.log('user swiped left');
}
function swipeRight(){
console.log('user swiped right');
}
}); |
let counter = 0;
function nextId() {
const res = `[${counter}]`;
++counter;
return res;
}
cc.Class({
extends: cc.Component,
properties: {
label: {
default: null,
type: cc.Label
},
},
// use this for initialization
onLoad: function () {
t... |
const mongoose = require('mongoose')
const config = require('config')
const databaseLink = config.get('mongoURI')
const connectDB = async () => {
//any kind of connection need try-catch
try {
await mongoose.connect(databaseLink, {
useNewUrlParser: true,
useCreateIndex: true,
useFindAndModify:... |
/*
* @lc app=leetcode id=1002 lang=javascript
*
* [1002] Find Common Characters
*/
// @lc code=start
/**
* @param {string[]} A
* @return {string[]}
*/
var commonChars = function(A) {
const cMap = {};
for (let i = 0; i < A.length; i++) {
const string = A[i];
for (let c of ... |
$('li.hot')
|
var express = require('express');
var mongoose = require ('mongoose');
var app = express();
var port = process.env.PORT || 21000;
var User = require('./model/user');
var bodyParser = require('body-parser');
var mongodb = require('mongodb');
var ObjectID = mongodb.ObjectID;
var CONT_C = "users";
var expressValidator = r... |
import React, { useContext } from 'react';
import { FormControl } from 'react-bootstrap';
import { UiContext } from '../../contexts/ui/ui.context';
import { updateSearchField } from '../../contexts/ui/ui.actions';
const SearchBar = () => {
const { state: { searchField }, dispatch } = useContext(UiContext);
const ha... |
import React from "react";
import CardList from "./CardList";
const CardSection = props => {
return (
<div className="row">
<CardList key={props.id} />
</div>
);
};
export default CardSection; |
var searchData=
[
['_7ecollar',['~Collar',['../class_collar.html#a01eb61e5442322342d2823e3238a6b49',1,'Collar']]],
['_7edog',['~Dog',['../class_dog.html#aeacf410641eab28eabea6bc5269eb4ef',1,'Dog']]],
['_7emyvect',['~MyVect',['../class_my_vect.html#a4d71588bb6915adbd6cf32554bdc4264',1,'MyVect']]]
];
|
self.__precacheManifest = [
{
"revision": "ea41e95b8dcdef16e751",
"url": "/static/css/main.8ab80e09.chunk.css"
},
{
"revision": "ea41e95b8dcdef16e751",
"url": "/static/js/main.d16627b9.chunk.js"
},
{
"revision": "42ac5946195a7306e2a5",
"url": "/static/js/runtime~main.a8a9905a.js"
},
... |
import React from 'react';
import uuid from "uuid/v4";
import {getIndentSpace, INDENT_SPACE} from "@/pages/drag-page/utils";
export const category = '原生HTML元素';
export const icon = 'html5';
export default {
text: {
component: 'text',
title: '纯文本',
visible: false,
noWrapper: true, ... |
import jsonld from 'jsonld';
var RoutableTilesToGeoJSON = require('./RoutableTilesToGeoJSON');
//Make sure the client works
var Client = require('demo-routable-tiles-client');
/*
* 🍂class VectorGrid.RoutableTiles
* 🍂extends VectorGrid
*
* A `VectorGrid` for routable tiles fetched from the internet.
* Tiles ar... |
// Chart design for T scores based on original bullet chart by Mike Bostock:
// http://bl.ocks.org/mbostock/4061961
// with d3.chart.js (0.1.2)
// http://misoproject.com/d3-chart/
d3.chart("BulleT", {
initialize: function() {
var chart = this;
this.xScale = d3.scale.linear();
this.base.classed("BulleT", true)... |
import React from 'react';
import { View, Text, StyleSheet, TextInput, TouchableOpacity, Image, Button } from 'react-native';
const Login = props => {
return (
<View style={styles.container}>
<Image style={styles.dcimg} source={require('../assets/DCLogo.png')} />
{/*... |
import {
GET_GENRES,
GET_GENRE,
DELETE_GENRE,
FETCH_GENRE_SEARCH,
GENRE_LOADING
}
from "../actions/types";
const initialState = {
genres : [],
genre : {},
loading : true,
searchQuery:''
}
export default function(state = initialState, action){
switch (action.type) {
... |
import connection from "../../Bd/connection.js";
const deleteRent = async (req, res) => {
try{
const id = req.params.id;
const rental = await connection.query('SELECT * FROM rentals WHERE id = $1', [id]);
if(!rental.rows[0]) return res.sendStatus(404);
if(rental.rows[0].returnDate... |
import auth from "../services/auth.js";
let view = undefined;
function initialize(domElement) {
view = domElement
}
async function getView() {
return view;
}
let homePage = {
initialize,
getView
}
export default homePage; |
// I've added several key-value paris to a list originally written by Colt Steele and edited by Jaime Pagan
var keyData = {
q: {
sound: new Howl({
src: ['sounds/bubbles.mp3']
}),
color: '#1abc9c',
size: 500,
num: 3,
speed: .9,
pulse: 8
},
w: {
sound: new Howl({
src: ['sounds/clay.mp3']
}),
... |
function hola(){}
asdfasd |
/**
* Miguel Ramirez
* @param idBtn
*/
function adMasterButton(idBtn){
$("#"+idBtn).addClass("ad-button");
$("#"+idBtn).addClass("ad-widget");
$("#"+idBtn).addClass("ad-state-default");
$("#"+idBtn).addClass("ad-button-text-only");
$("#"+idBtn).addClass("ad-button-text");
$("#"+idBtn+" ... |
"use strict";
let HTML = "";
let weatherDataArray = [];
const containerReference = document.querySelector(".container");
const searchBoxReference = document.querySelector("#searchbox");
const weatherDataHTML = function (i, main, description) {
let kelvinTempAtZeroCelzius = 273.15;
let temperatureInCelzius =
we... |
// This function does not modify the lockfile. It asserts that packages do not use SSH
// when specifying git repository
function afterAllResolved(lockfile, context) {
const pkgs = lockfile['packages'];
for (const [pkg, entry] of Object.entries(pkgs)) {
const repo = entry.resolution['repo'];
if (repo !== un... |
import PropTypes from "prop-types";
import styled from "styled-components";
const mapScaleToPixels = scale => {
switch (scale) {
case "s":
return 4;
case "m":
return 8;
case "l":
return 16;
case "xl":
return 24;
case "xxl":
return 32;
default:
return 4;
}... |
import FileUpload from "./FileUpload";
export {FileUpload}
export default FileUpload |
//Correction
function isPalindrome(str) {
// The charecters that I'll remove from the string
var specialChars = ' 0123456789,.;:-_';
// Initialize
var strInverse = '';
var strNoSpecialChars = '';
// Loops each letter of the string
for (var i = 0; i < st... |
var vm = new Vue({
el:'#app',
mixins:[myMixin],
data:{
navIndex:1,//当前所在导航项的index
keyword:'',
pid:'',//省
cid:'',//市id
aid:'',//区县id
addressList:[],
pLists:[],
cLists:[],
aLists:[],
hospitalLists:[],
pageData:{currentPage:1,totalPage:10,total:90},
mHide:false,
popTitle:'油站信息',
hospitalNam... |
import { html, LitElement } from "@polymer/lit-element";
import { FormMixin } from "../../function/form-function";
import { connect } from "pwa-helpers/connect-mixin.js";
// This element is connected to the Redux store.
import { store } from "../../store/store";
// These are the actions needed by this element.
import... |
import React, { Component } from 'react';
export class ListPane extends Component {
render() {
return (
<div className='list-group list-pane' >
{ this.props.recipeNames.map((item) => {
return <li className="list-group-item" id={item.recipe.replace(/ /g, '-')} onClick... |
import React, { Component } from "react"
import { connect } from 'react-redux';
import * as actions from '../../../store/actions/general';
import Image from "../../Image/Index"
import imageCompression from 'browser-image-compression';
import swal from 'sweetalert'
import axios from "../../../axios-orders"
import Trans... |
/**
* Created by John on 2015-10-17.
*/
var a=1;
var b=2;
|
import Vue from 'vue'
import { mapState, mapGetters } from 'vuex'
import IntlMessageFormat from 'intl-messageformat'
import { get } from 'lodash'
export const localizeMixin = {
computed: {
...mapState(['localizedStrings', 'locale']),
...mapGetters(['getCountryShortName', 'getIsCountryAustralia'])
},
meth... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.