text stringlengths 7 3.69M |
|---|
var country = $("#destination").text();
var code = "";
switch (country) {
case "AUSTRALIA":
code = "AU";
break;
case "FRANCE":
code = "FR";
break;
case "BRAZIL":
code = "BR";
break;
case "PERU":
code = "PE";
break;
case "ICELAND":
code = "IS";
... |
$(function() {
// console.log('sending message from content script!');
// chrome.runtime.sendMessage({greeting: "hello"}, function(response) {
// console.log('now logging response');
// console.log(response.farewell);
// });
// chrome.runtime.onMessage.addListener(
// function(request, sender, sendRespon... |
/*
* Copyright (C) 2009-2017 SAP SE or an SAP affiliate company. All rights reserved.
*/
sap.ui.define(["sap/uxap/BlockBase"],function(B){"use strict";var V=B.extend("fin.re.conmgmts1.view.valuationblocks.ValuationList",{metadata:{}});return V;});
|
import React, { useState, useEffect } from "react";
import PledgeFromData from "./PledgeFormData";
import StaticForm from "../../components/StaticForm";
import ObjectUtil from '../../components/ObjectUtil';
import {
Button,
Container,
LinearProgress
} from "@material-ui/core";
import { makeStyles } from ... |
"use strict";
jQuery(document).ready(function (e) {
function t(t) {
e(t).bind("click", function (t) {
t.preventDefault();
e(this).parent().fadeOut();
})
}
e(".dropdown-toggle").click(function () {
var t = e(this).parents(".dropdown").children(".dropdown-menu").is(":hidden");
e(".dr... |
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Enemy = (function (_super) {
__extends(Enemy, _super);... |
/*const { Pool } = require('pg');
const connectionString = 'postgresql://postgres:1234@127.0.0.1:5432/mydatabase'
const pool = new Pool({
connectionString: connectionString,
})*/
module.exports = function(app) {
app.dataSources.database.automigrate(function(err) {
if (err) throw err;
app.models.... |
const message = require("../messages.js");
module.exports = (bot, chatId) => {
bot.sendMessage(chatId, message.herbalRecipe);
}
|
import iterableToArrayLimit from "../iterableToArrayLimit";
import { expect } from "chai";
describe("Test iterableToArrayLimit", () => {
it("basic test", () => {
const obj = {
a: 1,
b: "str",
c: true,
};
const arr = iterableToArrayLimit(obj, 2);
expect(arr[0]).to.equal(obj.a);
e... |
import React, {useState, useEffect, useContext} from "react";
import { userContext } from "../../utils/Context.js";
import { Link, useHistory } from "react-router-dom";
//basic layout components
import Col from "../../components/Col";
import Container from "../../components/Container";
import Row from "../../components... |
const express = require('express');
const router = express.Router();
const Device = require('../../models/devices');
router.post('/', (req, res) => {
const user = req.body.user;
const name = req.body.name;
Device.findOne({ user: user, name: name }, (err, docs) => {
if (err) {
console.lo... |
import React from "react";
const Updates = () => {
return (
<div>
<button
className="btn btn-secondary"
id="updates"
type="button"
data-toggle="collapse"
data-target="#updatesCollapse"
aria-expanded="false"
aria-controls="updatesCollapse"
>
Updates
</button>
<div classNam... |
import { postJSON } from '@lodgify/fetch-helpers';
import { ORIGIN } from '../constants';
import { getPathname } from './getPathname';
import { getUrl } from './getUrl';
import { getPostFormHeaders } from './getPostFormHeaders';
/**
* @param {string} pathnameTemplate
* @param {number} websiteId
* @param {Objec... |
const peerIdHelper = require('./peerIdHelper');
const find = require('lodash/find');
module.exports = class SimpleAccountStorage {
getStorage() {
// return JSON.parse(fs.existsSync(storagePath) ? fs.readFileSync(storagePath, {encoding: 'utf8'}) : '{}');
return this.storageData || {};
}
setS... |
export default async function handler(req, res) {
const { email } = req.query;
let sql;
if(email) {
sql = `SELECT * from tryshape.users WHERE email='${email}'`;
} else {
sql = `SELECT * from tryshape.users`;
}
const request = await fetch(process.env.NEXT_PUBLIC_DB_URL,... |
import { init, h } from '../'
import sbStyle from 'snabbdom/modules/style'
import sbEvents from 'snabbdom/modules/eventlisteners'
const { attach } = init([ sbStyle, sbEvents ])
let MOUSE_X = 0
let MOUSE_Y = 0
const render = attach(() => {
const COLOR = "black"
const SIZE = 20
const MARGIN = 40
const... |
const User = require('../../models/user');
const logout = (request, response) => {
const userId = request.body.userId;
const sendError = () => {
response.status(400);
response.json({
status: 'error',
text: 'there is no such user'
});
};
const sendResponse = (logoutUser) => {
if (!... |
import React from 'react';
import {View, Text} from 'react-native'
import { ExpoConfigView } from '@expo/samples';
export default class HomeWorldScreen extends React.Component {
// static navigationOptions = {
// title: 'Person',
// header: {
// style: {
// backgroundColor: '#42a5f5',
// ... |
const storage = require('../../util/storage.js')
exports.normal = function (bot, message) {
const currentGuilds = storage.currentGuilds
const content = message.content.split(' ')
if (content.length !== 2) return
let found = false
currentGuilds.forEach(function (guildRss, guildId) {
if (found) return
... |
import fs from 'fs';
import { matchRoutes } from 'react-router-config'
import routes from '../../client/page/routes';
async function clientRoute(ctx, next) {
const branch = matchRoutes(routes, ctx.url);
if (branch.length > 0) {
await ctx.render('index')
} else {
await next();
}
}
expor... |
'use strict';
const path = require('path');
const helpers = require('yeoman-test');
const assert = require('yeoman-assert');
const pwd = path.resolve('./');
describe('generator', () => {
let generator;
beforeEach((done) => {
const deps = ['../app'];
helpers.testDirectory(path.join(__dirname, 'temp'), (... |
import React from 'react';
import {
Image,
StyleSheet,
Text,
TouchableOpacity,
View,
FlatList,
WebView,
} from 'react-native';
/*
import Entypo from 'react-native-vector-icons/Entypo';
import Feather from 'react-native-vector-icons/Feather';
*/
import {
widthPercentageToDP as wp,
hei... |
var printTemperature = (temperature, apparentTemperature, celsius) => {
var scale = '°F';
if (celsius) {
temperature = convertToCelsius(temperature);
apparentTemperature = convertToCelsius(apparentTemperature);
scale = '°C';
}
console.log(`It's currently ${temperature.toFixed(2)} ${scale}. It feels ... |
window.onscroll = function() {
const nav = document.getElementById("header");
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
nav.style.height = "10vh";
} else {
nav.style.height = "25vh";
}
};
var main_triggers = (function() {
document.querySelectorAl... |
/**
* @class Ext.ux.util.ObjValidate
* @author lightyear(liuyu) (lightyear416@gmail.com)
*
* If you need to check some str whether is part of strs, you can use isInStrings
* If you need to check bankno whether obey Luhn
*
* Usage:
*
* Add Ext.Require
* 'Ext.ux.util.ObjValidate',
* ]);
*
*/
Ext.def... |
export const CREATE_TASK = 'CREATE_TASK';
export const DELETE_TASK = 'DELETE_TASK';
export const SELECT_TASK = 'SELECT_TASK';
export const UPDATE_TASK = 'UPDATE_TASK';
export const DESELECT_TASK = 'DESELECT_TASK';
|
import React from 'react';
import {View, Text, Image, Dimensions} from 'react-native';
let {width, height} = Dimensions.get('window');
const Footer = () => {
let {container, itemsContainer} = styles;
return(
<View style={container}>
<View style={{
height: 20
}}>... |
/**
* Users access and update.
*/
var db = require('./database'); // database connection and collection cursors
var config = db.config;
var log = config.log;
var thisModule = 'dao/utility.js';
log.debug('initializing',thisModule);
// make sure a numeric id
// is numeric and > 0
exports.parseNumericId = function(... |
import React from 'react'
import { render, fireEvent } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import Parallax from "./Parallax";
describe('<Parallax />', () => {
it('renders a <div>', () => {
const { getByTestId } = render(
<Parallax
src="dummy/link"
... |
var express = require('express');
var app = express();
var multer = require('multer');
var upload = multer({dest: 'uploads/'});
app.post("/", upload.single("upload-file"), function(req, res) {
res.send({"size": req.file.size});
});
app.use(express.static('public'));
var port = process.env.PORT || 8000
app.listen(po... |
const msgContainer= document.getElementById('message')
const player1Dice = document.getElementById('p1-dice')
const player1ScoreContainer = document.getElementById('p1-score')
const player2Dice = document.getElementById('p2-dice')
const player2ScoreContainer = document.getElementById('p2-score')
const btnRoll = documen... |
import Bank from "../models/Bank";
class BankController {
async index(req, res) {
try {
const data = await Bank.findAll({
attributes: { exclude: [ 'created_at', 'updated_at'] },
});
return res.json(data) ;
} catch (error) {
res.status(400).json({ message: `Erro ao retornar os... |
angular.module("app")
.controller("menuCtrl",function($scope, menuRepo){
$scope.currentMenu = "学生管理"; //保存当前的menu值,默认为第一个menu
//获得菜单选项
$scope.menus = menuRepo.getMenus();
//点击menu,获得当前的menu值
$scope.getCurrentMenu=function(currentMenu){
$scope.currentMenu... |
/*
Напишите код, который будет спрашивать логин с помощью prompt.
Если посетитель вводит «Админ», то prompt запрашивает пароль, если ничего не введено или нажата клавиша Esc – показать «Отменено», в противном случае отобразить «Я вас не знаю».
Пароль проверять так:
Если введён пароль «Я главный», то выводить «Здравс... |
import React from 'react';
import {Link} from 'react-router';
export default class Faq extends React.Component {
render() {
return (
<div id="faq" className="aboutUs">
<div className = "container">
<h2><b>How it works</b></h2>
<hr />
... |
/*
* @Descripttion:
* @version: 1.0
* @Author: Ankang
* @Date: 2021-05-18 19:39:40
* @LastEditors: Ankang
* @LastEditTime: 2021-05-25 22:39:33
*/
$(function(){
$(".cancle").click(function(){
window.history.go(-1);
return false;
});
var i = 10
setInterval(function(){
i -= 1;
$('#dumiao span').html(`... |
export default function(){
return [
{title: 'Javascript'},
{title: 'Rin rin rin'},
{title: 'bi bi bi'},
{title: 'a bi rin'}
]
} |
import React, { Component } from 'react';
import { NavBar, Icon, WhiteSpace, Button } from 'antd-mobile';
import {RecdetailsWrap,H1Border} from './Recdetails.styled'
import left from '@a/images/iconku/left.png'
import collection from '@a/images/vegetables/collection.png'
import light from '@a/images/vegetables/collect-... |
import React from 'react';
import PropTypes from 'prop-types';
import axios from 'axios';
import { FaHeart, FaRegHeart } from 'react-icons/fa';
import './index.scss';
const Like = ({ isLiked, likeCount, projectId }) => {
return (
<div className="like">
<div className="heart">
{isLiked ? (
... |
;$(function(){
var tab = new dell.Tab();
tab.init('.tab1',{
'event':'mouseenter',
'delay':1000
});
$(tab).on('beforeChange', function() {
alert(1);
});
var tab2 = new dell.Tab();
tab2.init('.tab2');
tab2.autoPlay();
$(tab2).on('beforeChange', function() {
alert(2);
});
});
|
import React from 'react';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCar } from "@fortawesome/free-solid-svg-icons";
import { faSmokingBan } from "@fortawesome/free-solid-svg-icons";
import { faTrain } from "@fortawesome/free-solid-svg-icons";
const MyMaps = () => {
return(
... |
// Karma configuration
var webpack = require('./webpack.config');
module.exports = function(config) {
//Set basic Brixo karma configuiration
require('brixo-framework/config/karma.conf.js')(webpack)(config);
config.set({
// Here you can override any default settings from Brixo
});
};
|
import styled from "styled-components";
export const PostJobForm = styled.form`
color: green;
margin-top: 20px;
// border: 1px solid blue;
`;
export const InputTitles = styled.label`
color: blue;
font-size: 1.8rem;
// border: 1px solid yellow;
`;
export const Input = styled.input`
width: 30%;
margin-... |
class Validator {
constructor() {
$('#error00').hide();
$('#error01').hide();
$('#error02').hide();
$('#error03').hide();
$('#error04').hide();
$('#error05').hide();
$('#error06').hide();
$('#error07').hide();
$('#error08').hide();
$('#error09').hide();
$('#error10').hide();
$('#error11').h... |
var NAVTREEINDEX3 =
{
"class_otter_1_1_line2.html#a9777cb673293e71ee3f389f1618d6f7b":[1,0,1,68,2],
"class_otter_1_1_line2.html#aa377417dc2328b80cdf45c7e8e676275":[1,0,1,68,12],
"class_otter_1_1_line2.html#ab08efc7aa80e42e8c7bf5b2422f0c58a":[1,0,1,68,6],
"class_otter_1_1_line2.html#ab95af220004e98d31a2991f772deaf04":[1,... |
import Vue from "vue"
import Vuex from "vuex"
import actions from './actions'
import getters from './getters'
import state from './state'
import mutations from './mutations'
Vue.use(Vuex);
export default new Vuex.Store({
state,
mutations,
actions,
getters
})
/* const store =ne... |
import React from 'react';
import styled from 'styled-components';
import { BrowserRouter as Router } from "react-router-dom";
import './App.css';
import NavBar from './components/NavBar';
import Roteamento from './routes/Rotas';
const Layout = styled.div`
display: grid;
grid-template-columns: 1fr 2fr 1fr;
gap:... |
import React, { PureComponent } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
import Particles from 'react-particles-js'
import { loginRequest, registrationRequest } from '../../actions/auth'
import { getAuthError } from '../../reducers/auth'
import ParticlesParams from './... |
var mongoose = require('mongoose');
// var User = mongoose.model('User');
var Tag = mongoose.model('Tag');
var dreamSchema = new mongoose.Schema({
date: {
type: Date,
default: Date.now
},
location: {
type: [Number]
},
title: {
type: String
},
content: {
type: String,
required: tr... |
exports.loggedIn = async function (ctx, next) {
if (!ctx.isAuthenticated()) {
//TODO: If I don't have the right privs
//TODO: if I have the right privs
await next();
} else {
//Try to login
await ctx.login();
console.log(ctx.state.user);
ctx.response... |
let router = require("express").Router();
const listController = new require("./list-controller.js");
router.get("/", (req, res) => {
res.send(JSON.stringify({}));
});
// endpoint to take action based on parsed request.body.text
router.route("/takeAction").post(function (req, res) {
var uncleaned = req.body.t... |
/*
function 키워드를 통해 정의한다.
function funcName( parameter ) { ... 실행할 구문}; 의 형태
Javascript 엔진은 함수와 변수를 프로그램의 첫머리로 끌어올리기 때문에
함수 정의 이전에 함수를 사용하여도 문제없이 동작한다.
*/
// 제곱 함수
function square(x) {return x * x;}
console.log(square(3));
/* parameter(인자) 와 argment(인수) 의 차이 :
argument - 함수의 괄호 안에 들어가는 데이터, parameter - 함수 정의시의 인... |
console.log('guessing game');
/*
Let's make a guessing game
setup a secret number
the user should be asked to guess a number
output a happy message if the guess is correct
output a sad message if guess is wrong, asked to guess the number again, until the end of time
- variables
- if statement
- output
- loops
*/
... |
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
import {Card, CardActions, CardHeader, CardTitle, CardText} from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';
import ReportGenerateTweets from './Report.GenerateTweets';
// import ReportGenerateInfographic from './Re... |
import {fromJS} from 'immutable';
const defaultState = fromJS({
topicList: [
{
id:1,
title:'社会热点',
imgUrl: '//upload.jianshu.io/collections/images/2194/android.graphics.Bitmap_6dd6427.jpeg?imageMogr2/auto-orient/strip|imageView2/1/w/144/h/144/format/webp'
},
... |
//const fs = require('fs');
/**
* A fileSystemLoader utility method to handle & load all file systems for application
* @author Esari praneeth kumar
* @modifiedBy Esari praneeth kumar
* @param {Object} config configuration object
* @requires fs fs npm module
*/
const fileSystemLoader= () =>{
// var assetFile... |
$.extend($, {
/**
* 类Android Toast提示框
* @param string message
* @param JSONstring options
* @param int millisecond
*/
toast: function(message, customCSS, millisecond) {
var dom = $("<div></div>"); //新建的dom元素 Toast元素
//初始化
switch(arguments.length) {
case 1: customCSS = {};millisecond = 3000;
... |
function Stack() {
if (Stack.flag !== undefined) {
return Stack.flag
}
this.store = []
this.top = 0
Stack.flag = this
}
Stack.prototype = {
push: function (val) {
this.store[this.top++] = val
},
peek: function () {
return this.store[this.top-1]
},
reset... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.conf = Object.freeze({
host: process.env.POSTGRES_HOST || 'localhost',
user: process.env.POSTGRES_USER || 'docker',
password: process.env.POSTGRES_PASSWORD || 'docker',
port: Number(process.env.POSTGRES_PORT) || 5432,
... |
import React from "react";
import * as S from "./styled";
import * as I from "@styled-icons/boxicons-regular/";
const Atom = ({ layers }) => {
const [play, setPlay] = React.useState(true);
const size = [2, 1.8, 1.7, 1.4, 1.3, 1.1, 1, .9]
return (
<S.Wrapper>
<S.Button
onClick={() => {
... |
import React, { PropTypes, Component } from 'react';
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/std:accounts-ui';
import Router from '../../router.js';
import Dropdown, { DropdownTrigger, DropdownContent } from 'react-simple-dropdown';
import { ContextPasser } from "meteor/nova:core";
impo... |
let model = require('../models/imageModel.js');
module.exports = {
getImages: function(req, res, next) {
console.log('getImages controller');
model.getAll((err, result)=>{
if(err) console.log(err);
else res.send(result);
});
},
getImage: function(req, res, next) {
console.l... |
/*
* Module de création des boutons modifier pour l'interface utilisateurs
*/
export function createBlocksModifier()
{
if (!sessionStorage.getItem("flagModif"))
{
const body = document.querySelector("body");
const intro = document.querySelector("#introduction>article");
const proje... |
export {
signIn,
logout
} from './auth'
export {
listenPosts,
stopListenPosts,
sendNewPost,
sendEditPost,
removePost
} from './post' |
import React, { Component } from 'react';
import axios from 'axios';
import myHOC from '../HOC/myHOC';
import {connect} from 'react-redux';
import { withAlert } from 'react-alert'
import DeckIcon from '../../media/deckIcon.png';
import TruckIcon from '../../media/truckIcon.png';
import WheelIcon from '../../media/wheel... |
define(['apps/system3/business/business'], function (app) {
app.module.factory("projectService", function (Restangular, stdApiUrl, stdApiVersion) {
var restSrv = Restangular.withConfig(function (configSetter) {
configSetter.setBaseUrl(stdApiUrl + stdApiVersion);
})
return {
... |
function Slide(){
// constructor
/*
-- UITLEG SUBSLIDES --
Ik ben van mening dat een multidimentionale array niet te oplossing is aangezien
de class Presentation geen weet heeft van de eventuele SubSlides. Het is naar mijn idee handiger om
bij iedere slide op te slaan of er subslides aanwezig zijn of niet. ... |
import Asserter from './utils/Asserter';
import MinMax from '../src/common/operator/MinMax';
import EventIn from '../src/common/source/EventIn';
import tape from 'tape';
tape('MinMax', (t) => {
t.plan(5);
t.comment('processSignal');
const eventIn = new EventIn({
frameSize: 512,
frameType: 'signal',
... |
// Generated by CoffeeScript 1.3.3
(function() {
window.vote_lock = false;
$(function() {
var addSubmissionToPage, buildPage, buildRow, dedownvote, deupvote, socket;
window.submissions = [];
socket = io.connect("/");
socket = io.connect();
socket.on("listing", function(data) {
console.lo... |
import React from 'react';
import { findDOMNode } from 'react-dom';
import ReactTestUtils from 'react-dom/test-utils';
import { getDOMNode, getInstance } from './TestWrapper';
import HelpBlock from '../src/HelpBlock';
import FormGroup from '../src/FormGroup';
describe('HelpBlock', () => {
it('Should render a HelpBlo... |
import { createLocalVue, shallowMount } from "@vue/test-utils";
import OptionButtons from "@/components/OptionButtons";
const localVue = createLocalVue();
describe("OptionButtons component", () => {
it("Should render with slotted children", () => {
const wrapper = shallowMount(OptionButtons, {
loc... |
define(function(require, exports, module){
function Fndo( opts ) {
opts = opts || {};
this.oWrap = opts.oWrap;
this.fnDo = opts.fnDo || null;
this.sTarget = opts.sTarget || '';
this.lock = false;
}
Fndo.prototype = {
init: function() {
this.addEvent();
},
addEven... |
import Vue from 'vue'
import Router from 'vue-router'
import CartListScene from '@/cart-list/CartListScene'
import CartDetailsScene from '@/cart-details/CartDetailsScene'
import CartItemDetailsScene from '@/cart-item-details/CartItemDetailsScene'
Vue.use(Router)
export const hierarchy = ['cart.list', 'cart.details', ... |
var searchData=
[
['start_2eform',['Start.form',['../_start_8form.html',1,'']]],
['start_2ejava',['Start.java',['../_start_8java.html',1,'']]]
];
|
import GAME from "./util/constants.js";
class Obstacle {
constructor(pX, v) {
this.height = Math.max(Math.min(Math.random() * 100, GAME.OBSTACLE.MAX_HEIGHT), GAME.OBSTACLE.MIN_HEIGHT);
this.width = Math.max(Math.min(Math.random() * 100, GAME.OBSTACLE.MAX_WIDTH), GAME.OBSTACLE.MIN_WIDTH);
... |
/*
* Copyright 2017 PhenixP2P Inc. Confidential and Proprietary. All Rights Reserved.
* Please see the LICENSE file included with this distribution for details.
*/
/* global __dirname */
const path = require('path');
const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const baseConfig... |
import React from "react";
import Header from "./Header";
import Footer from "./Footer";
class MeParecioVerUnLindoGatito extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open" });
this.shadowRoot.innerHTML = `
<style>
.gatito {
background: black;
border-radius... |
import {URL} from "../constants/config";
import React, {Component} from 'react';
import {
View,
Text,
YellowBox,
FlatList,
Image,
TouchableOpacity,
ActivityIndicator
} from 'react-native';
import VideoItem from "../components/VideoItem";
import {Header} from "../components/Header";
class ... |
var db = require('./db');
//Trains
exports.list = function(req, res, next) {
db.any('select * from public.trains')
.then(function (data) {
res.status(200)
.json({
status: 'success',
data: data,
message: 'Retrieved ALL Trains'
});
})
.catch(function (err... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsExplicit = {
name: 'explicit',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h4v2h-4v2h4v2H9V7h6v2z"/></svg>`
};
|
import React from 'react';
import PropTypes from 'prop-types';
import { FormControl, TextField, MenuItem } from '@material-ui/core';
const renderListItem = items =>
items.map(item => (
<MenuItem key={item} value={item}>
{item}
</MenuItem>
));
const SelectForm = ({ title, onChange, value, property }... |
const express = require("express")
const router = express.Router()
const orm = require('../config/orm')
router.get("/",function (req,res){
orm.selectAllCategories(function(err,category){
if(err){
return res.status(501).json({
message:"ops sth bad happend"
})
... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsHd = {
name: 'hd',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1... |
const {
create,
getDispatches,
getDispatchByID,
updateDispatch,
deleteDispatch,
getDispatchesPagination,
getDispatchCount,
searchDispatch,
approveDispatch,
} = require("./dispatches.service");
const aws = require("aws-sdk");
aws.config.update({
accessKeyId: process.env.AWS_ACCESS_KEY,
secretAcces... |
'use strict';
import React, { Component } from 'react'
import {
View,
Text,
TouchableOpacity
} from 'react-native'
class HomeContainer extends Component {
render () {
return (
<View style={{
flex:1,
alignItems: 'center',
justifyContent: 'center'
... |
import './App.css';
import Searchform from './components/Searchform'
import Buttons from './components/Buttons'
import Stories from './components/Stories';
import ScrollUpButton from "react-scroll-up-button";
function App() {
return (
<>
<Searchform />
<Buttons />
<Stories />
<ScrollUpButton />
</>
)... |
/**
* Created by guominghui on 17/8/11.
*/
let util = {
getBytesLength:function(str) {
// 在GBK编码里,除了ASCII字符,其它都占两个字符宽
return str.replace(/[^\x00-\xff]/g, 'xx').length;
},
ab2str:function(buf) {
return String.fromCharCode.apply(null, new Uint8Array(buf));
},
str2ab:function(str) {
... |
// Ex01
let nutella = document.getElementsByClassName('tartine');
console.log(nutella[0].textContent);
// Ex02
let brioche = document.getElementById('toast');
console.log(brioche);
// Ex03
let chocolat = document.querySelectorAll('.tartine');
console.log(chocolat[chocolat.length-1]);
|
if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
var SCREEN_WIDTH = window.innerWidth;
var SCREEN_HEIGHT = window.innerHeight;
var container, stats;
var camera, scene, renderer;
var characters = [];
var mixers = [];
var nCharacters = 0;
var baseCharacter;
var cameraControls;
var controls = {
moveForward: false,... |
import React from 'react';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import styles from 'Course/components/stylesheets/InstructorList.scss';
const { array } = PropTypes;
/**
* Render list of instructors
*
* @param {Object} instructor - individual instructor
* @param {Number} n... |
(function(g){
var Person = function(name){
this.name = name;
}
Person.prototype.sayHello = function(){
return 'hi,'+this.name;
};
g.Person = Person;
}(global));
//exports.Person = Person; |
'use strict';
$(function() {
$('.hamburger').click(function() {
$(this).toggleClass('hamburger_on');
$('.top-navigation').toggleClass('top-navigation_open');
$('.page').toggleClass('page_fixed');
$('.connection').toggleClass('connection_scroll');
$('.top-slider__slider').slick('refresh');
... |
import Circle from './Circle.js'
const animation = {
startTime: 0,
nextBallDelay: 60,
canvasElt: null,
ctx: null,
circles: [],
gravity: 1,
elasticity: 0.91,
colors: ['#654c52', '#1e3857', '#d97cdf', '#5FF6B7', '#e87b1b', '#56A6B7', '#A6A6FF', '#56FFB7'],
init() {
this.canvas... |
/**
* Created by Chandan Sharma on 2/6/17.
*/
'use strict'
var mongoose = require('mongoose');
//mongoose schema
var SeekerProductSchema = mongoose.Schema({
booking_id:String,
seeker_id:String,
product:[{
product_id:String,
quantity:String
}]
},
{
co... |
$(function () {
$("#staffTypeUpdate_btn").click(function () {
var check1=confirm("确认要更改吗?");
if (check1){
var a_id = $("#aid").val();
var type = $("input:radio:checked").val();
if (type==""||type==null){
alert("请选择管理员职位");
}else {
... |
var quotes = [];
var authors = [];
quotes[0] = "I have a new philosophy. I'm only going to dread one day at a time.";
authors[0] = "Charles Schulz";
quotes[1] = "Reality is the leading cause of stress for those in touch with it.";
authors[1] = "Jack Wagner";
quotes[2] = "Few things are harder to put up with than the a... |
import 'date-fns';
import React from 'react';
import Grid from '@material-ui/core/Grid';
import DateFnsUtils from '@date-io/date-fns';
import { makeStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
import InputLabel from '@material-ui/core/InputLabel';
import MenuItem from '@mater... |
(function(){
var starttime;
var settime;
var acctime;
var now;
acctime=new Date().getTime()/1000;
starttime=Math.trunc(acctime);
settime=starttime;
//Wait for the second roll over so our clock is aligned
// (we could do this on a millisecond rollover)
while (settime===startt... |
import { GraphQLString, GraphQLID, GraphQLObjectType } from 'graphql';
import { GraphQLBoolean } from 'graphql';
export const outdoorFeaturesType = new GraphQLObjectType({
name: "outdoor_features",
description: 'outdoor features of property listing',
fields: () => ({
id: { type: GraphQLID },
... |
import React, {
ActivityIndicatorIOS,
ProgressBarAndroid,
Component,
PropTypes,
Platform
} from 'react-native'
class Spinner extends Component {
static defaultProps={
//rgba(241,196,15, 1.0)
color: 'rgba(148, 14, 241, 1)'
}
render() {
if (Platform.OS === 'android') {
return (
<ProgressBarAndroid
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.