text stringlengths 7 3.69M |
|---|
export * from './T1'
export { T1 as default } from './T1';
|
import React, { useEffect, memo } from 'react';
import { func } from 'prop-types';
import { useTranslation } from 'react-i18next';
import useModalView from '../hooks/useModalView';
import Popup from './Popup';
import ReportForm from './ReportForm';
const propTypes = {
onSubmit: func.isRequired,
};
const ReportPopu... |
const express = require('express');
const bodyParser = require('body-parser');
const mongoose = require('mongoose');
const dxfparsing = require('dxf-parsing');
const dxf = dxfparsing.Parser;
const authenticate = require('../authenticate');
const cors = require('./cors');
const PropertyVat = require('../models/propert... |
'use strict'
const files = require('serve-static')
const path = require('path')
const app = require('../../index')({
disableResponseEvent: true
})
app.use(require('http-cache-middleware')())
const serve = files(path.join(__dirname, 'src'), {
lastModified: false,
setHeaders: (res, path) => {
res.setHeader('... |
var $form = $('#questionForm');
var $result = $('#question-result');
var $cnt = $('#answer-cnt-prompt');
var $answer = $('input[type=text][name=answer]');
var $submit = $('input[type=submit][name=answer]');
var $skip = $('input[type=button][name=skip]');
var $back = $('#back-btn');
var $submitPrompt = $('#submit-prompt... |
import React, { Component } from 'react';
import './App.css';
import Roster from './components/roster';
import Options from './components/options';
import PokedexService from './services/pokedex';
class App extends Component {
constructor() {
super();
this.state = {
options: {
maxEvolutionsOn... |
$(document).ready(function () {
"use strict";
var av_name = "TransformGrammarsFS";
var av = new JSAV(av_name,);
var Frames = PIFRAMES.init(av_name);
// Frame 1
av.umsg("Now we start our exploration of useful transformations for CFGs.");
av.displayInit();
// Frame 2
av.umsg(Frames.addQuestion("memb... |
import { SNComponent, http, snu, router } from "@socialNetwork";
class TabsComponent extends SNComponent {
constructor(config) {
super(config);
this.data = {
ip: ''
}
}
afterInit() {
let comp = document.querySelector('.nav-pills');
let url = router.getUr... |
import React from 'react';
import Next from './Next';
export const Section4Parcours = () => (
<section id="section4" className="section sectionParcours rel">
<div className="chevron abs haut1 larg1" onClick={Next}>
<i className="chevronBas fas fa-chevron-down"></i>
</div>
<div c... |
const ServerErrors = require('../../helpers/ServerErrors');
const { YouBike } = require('../../schemas/YouBike');
async function model(args) {
try {
const result = await searchSiteByBikes(args.num);
return Promise.resolve(result);
} catch (err) {
return Promise.reject(err);
}
}
// 根據可借車位數搜尋站場
async ... |
var start = performance.now();
var clickMade = 0;
function radius() {
var shape = Math.random();
if (shape > 0.5) {
return "50%";
} else {
return "0%";
}
}
function randomColours() {
var allowed = "ABCDEF0123456789", S = "#";
while(S.length < 7){
S += al... |
module.exports = {
url:
"mongodb+srv://development:XYem3mEh4nbDTUq@cluster0-fgeyn.mongodb.net/small-chat?retryWrites=true&w=majority",
};
|
const express = require("express");
const app = express();
const port = 3100;
const cors = require("cors");
var corsOptions = {
origin: "http://localhost:3000",
};
app.use(cors(corsOptions));
const fakeResponse = [
{
id: "c9a5c012-6295-48d5-a103-68ca76ff047b",
name: "Intelligent Concrete Computer",
de... |
import React from 'react';
import {Text, StyleSheet, View} from 'react-native';
const ComponentScreen = () =>
{
const name = 'Pedro'
return(
<View>
<Text style={styles.textStyle}>Getting started wit components</Text>
<Text style={styles.subHeaderStyle}>My name is {name}</Text>
... |
export { default } from "./ListAdmin" |
// @flow
import React from 'react';
import styles from './Footer.scss';
import applyClasses from './../../utils/applyClasses';
const footerIconClassNames = applyClasses({
footerIcon: true,
'fa fa-heart-o': true
});
const Footer = () => (
<footer className={styles.footer}>
<p>Gabriel García Seco</p>
<p>
... |
angular.module('focus.models.companyuser', [
'ngResource'
])
.factory('companyUserModel', [
'$resource',
function($resource) {
return $resource('/api/companyuser/:id', { id : '@Id' }, {});
}
]); |
import React from 'react';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import Paper from '@material-ui/core/Paper';
class SimpleTabs extends React.Component {
state = {
value: 0,
};
handleChange = (event, value) => {
this.setState({value});
... |
/*
* Copyright (c) 2012 Mike Chambers. All rights reserved.
*
* 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 without limitation
* the rights to use, copy... |
const Recommendation = () => {
const currentMonth = new Date().getMonth();
const isSpring = currentMonth >= 2 && currentMonth <= 5
return (isSpring ? (<div>It's spring, repot! 🌱 </div>) : null)
}
export default Recommendation; |
import firebase from 'react-native-firebase';
import { Actions } from 'react-native-router-flux';
export const SET_USER_IN_STATE = 'SET_USER_IN_STATE';
export const USER_AUTH_ERROR = 'USER_AUTH_ERROR';
export const USER_LOGOUT = 'USER_LOGOUT';
// AUTHENTICATION
export function registerUser(email, password) {
ret... |
module.exports = class Delivery {
constructor(order, adress) {
this.order = order
this.adress = adress
}
}
|
require('dotenv').config()
const AppError = require('../../../../../shared/errors/AppError')
const usersRepository = require('../../repositories/UsersRepository')
const domain = process.env.DOMAIN
class AuthenticateUserService {
constructor() {}
async execute(user, password) {
const foundUser = awa... |
import React, { useState, useEffect } from "react";
import { Line } from "react-chartjs-2";
import { connect } from "react-redux";
import styled from "styled-components";
import { getAverages } from "../utils/getAverages";
import { getDataFromDateRange } from "../actions/bwActions";
import { formatDateForInput } from ... |
'use strict';
angular.module('controller.order.items', [])
.controller('itemsOrderCtrl', ['$scope', '$state', '$ionicModal', 'itemsFactory',
function ($scope, $state, $ionicModal, itemsFactory) {
$scope.orderitems ={};
// Load the add / change dialog from the given template URL
... |
const mini = {
// 滚动时触发
onScroll(e) {
// console.log(e.detail.scrollTop);
let scrollTop = e.detail.scrollTop;
if (scrollTop > 200 && !this.data.showBackTop) {
this.setData({
showBackTop: true
});
} else if (scrollTop < 200 && this.data.showBackTop) {
this.setData({
... |
import React from 'react';
import './App.css';
import { Header, Container, Table, } from 'semantic-ui-react';
import Cards from "./Cards";
import CardForm from "./CardForm";
class App extends React.Component {
state = {
cards: [
{ id: 1, cardFront: "State", cardBack: "Always an 'object'", showBack: false,... |
The MIT License (MIT)
Copyright (c) 2014 Ali Gajani (http://www.aligajani.com)
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 without limitation the rights
to us... |
// 需求: 你要封装一个方法, 我给你一个要读取文件的路径, 你这个方法能帮我读取文件, 并把内容返回给我
const fs = require('fs')
const path = require('path')
function getFileBypath(fpath, succCb, errCb){
// 异步读文件的方法
fs.readFile(fpath, 'utf-8', (err, dataStr)=>{
// 如果报错 后续代码就不用执行了
if(err) return errCb(err)
succCb(dataStr)
... |
(function() {
'use strict';
angular
.module('app.products')
.service('ProductService', ProductService);
ProductService.$inject = ['$q', '$http', 'AuthService'];
function ProductService($q, $http, AuthService) {
////////////////
this.get = function () {
... |
const express = require('express')
const bodyParser = require('body-parser')
const app = express()
const mysql = require('mysql')
require('dotenv').config()
const port = process.env.CHIRPER_PORT
const connection = mysql.createConnection({
host : process.env.CHIRPER_DB_HOST,
user : process.env.CHIRPER... |
//Constructor
function Chronometer() {
this.intervalId = 0
this.currentTime = 0
}
var minDec = document.getElementById("minDec");
var minUni = document.getElementById("minUni");
var secDec = document.getElementById("secDec");
var secUni = document.getElementById("secUni");
var milDec = document.getElementBy... |
var EnemyGroup = new Class({
"initialize": function(cols, rows, distance, stage) {
this.create(cols, rows, distance);
this.totalEnemys = cols*rows;
this.goto = 'right';
this.stageWidth = 674;
this.enemyWidth = 34;
this.setPosition(cols, rows, distance);
this.speed = 1000 / stage;
/*var that... |
import React from 'react';
import { mount } from 'enzyme';
import { injectIntl } from '../../lib/index.es.js';
const intlConfig = {
locale: 'en',
formats: {
date: {
leave: {
year: 'numeric',
month: '2-digit',
day: '2-digit',
},
},
},
};
describe('format date', () => {... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsAdmin = {
name: 'admin',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm0 3.9a3 3 0 11-3 3 3 3 0 013-3zm0 7.9c2 0 6 1.09 6 3.08a7.2 7.2 0 01-12 0c0-1.99 4-3.... |
/**
* 服务+现场点单-席位查看
*/
import React, { Component, PureComponent } from "react";
import {
StyleSheet,
Dimensions,
View,
Text,
Image,
ScrollView,
TouchableOpacity,
} from "react-native";
import { connect } from "rn-dva"
import moment from 'moment'
import CommonStyles from '../../../common/Sty... |
document.getElementById("carDetailBox").style.width = (document.body.clientWidth - 10) + 'px';
mui.init({
swipeBack:false
});
mui.ready(function(){
$('.rightSpan').width($('#carDetailBox ul').width()-50);
var carData = JSON.parse(localStorage.getItem('car_detail_data'));
// var carData = {VehicleNum:'A123Q5',GPSTim... |
import {
errNull,
errNum,
errMail,
isMail,
isNum,
isWeb
} from "../errorValMess";
const validate = values => {
const errors = {};
if (!values.namaYayasan) {
errors.namaYayasan = errNull;
}
if (!values.alamatYayasan) {
errors.alamatYayasan = errNull;
}
if (!values.emailYayasan) {
er... |
import React from 'react';
import './Card.css';
import CardBanner from './CardBanner';
import CardContent from './CardContent';
// import ClickEvent from './ClickEvent';
function clickEvent(){
window.location.href = 'https://www.reactjs.org';
}
const Container = props => {
return <main className='main' onClick={cli... |
import expect from '../expect'
import { List } from 'immutable'
test('<ImmutableIndexed> to have items [exhaustively] satisfying <any>, passing', () =>
expect(
() =>
expect(
List([1, 2, 3]),
'to have items satisfying',
expect.it('to be a number')
),
'not to error'
))
te... |
'use strict';
const algolia = require('algoliasearch');
const clc = require('cli-color');
const utils = require('./utils');
module.exports = exports = function algoliaIntegration(schema,opts) {
let options = {
indexName: null,
appId: null,
apiKey: null,
selector: null,
def... |
var in30Minutes = 1/48;
// cookies part, with "js-cookie" (https://github.com/js-cookie/js-cookie)
var RGPD_warning_has_been_done = Cookies.get('RGPD_warning'); // RGPD_warning unset means this is the first visit
var RGPD_choice_has_been_done = Cookies.get('RGPD_no_cookie');
if (! window.document.jsdom_reader) {
if (... |
$(document).ready(function(){
$('#ticket-search').bind('keyup', function(e){
if(e.keyCode == 13){ // user hit enter key
window.location = $('#ticket-list tbody tr:visible a:first').attr('href');
}
var needles = $(this).val().toLowerCase().split(/\s+/g)
// for each ticket
... |
const fs = require('fs');
const chalk = require('chalk');
const yargs = require('yargs');
const notes = require('./notes.js');
// add command for a note - takes a title, and body
yargs.command({
command: 'add',
describe: 'Add a new note',
builder: {
title: {
describe: 'Note title',
... |
$(function () {
creatPro('s1', 'Surprise Party', '景点:巴厘岛', 'Surprise Party', ".sea-imgList");
creatPro('s2', '海盐味的夏天', '景点:巴厘岛', '海盐味的夏天', ".sea-imgList");
creatPro('s3', 'R.and MRS', '景点:巴厘岛', 'MR.and MRS', ".sea-imgList");
creatPro('s4', 'My girl', '景点:巴厘岛', 'My girl', ".sea-imgL... |
import React from 'react'
import _ from 'lodash'
const renderPoints = ({ champions, scores }) => {
return champions.map((champion) => {
const points = _.filter(scores, i => i === champion).length
return (
<div className="scores-row" key={champion}>
<div className="scores-col">
{champ... |
({
navigateToPage: function (component, event, page) {
let navigate = component.get("v.navigateFlow");
navigate(page);
},
navigateToBank: function (component, event) {
let navigation = component.find('navigation');
let pageReference = {
"type": "standard__webPage... |
"use strict";
// A class to assist with storing/firing multiple function calls (with zero or more parameters) within the scope of a particular object.
function Events(){
this.onEventFuncs = new Array();
this.onEventArgs = new Array();
this.onEventObjs = new Array();
}
// For example: This event subscription would... |
const tabbtns=document.querySelectorAll(".btn-tab");
const articles= document.querySelectorAll(".article-info");
const info=document.querySelector(".infocont");
info.addEventListener("click", function(e){
const id=e.target.dataset.id;
if(id){
tabbtns.forEach((item) => {
item.classList.remove("active");
e.t... |
app
.config(['owmProvider', function(owmProvider) {
owmProvider
.setApiKey('c96cb65f1ab1c8fbb8a4e8de57ec10b0')
.useMetric()
.setLanguage('fr');
}])
.config(function ($httpProvider) {
$httpProvider.interceptors.push('httpInterceptor');
}); |
function focused() {
const fields = Array.from(document.getElementsByTagName('input'));
for (let field of fields){
field.addEventListener('focus', onFocus);
field.addEventListener('blur', onBlur);
}
function onFocus(ev) {
ev.target.parentNode.classList.add('focused');
}
... |
'use strict';
$(function() {
// ドロワー
$('.drawer').drawer();
// スムーススクロール
$('a[href^="#"]').on('click', function() {
// #js-headerがついた要素の高さを取得
let header = $('#js-header').innerHeight();
// 移動速度を指定(ミリ秒)
let speed = 300;
// hrefで指定されたidを取得
let id = $(this)... |
const CosmosClient = require('@azure/cosmos').CosmosClient;
const uuidv4 = require('uuid/v4');
const cosmosConfig =
{
connectionString: process.env.COSMOS_CONNECTIONSTRING,
database : process.env.COSMOS_DATABASE
}
const CaseStatuses =
{
Waitting: "Waitting",
Active: "Active",
ClosedByAgent: "Cl... |
import React, { Component } from 'react';
class InputBar extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<form onSubmit={this.props.handler}>
<input name="task" type="text" />
<input type="submit" value="ADD" />
</form>
<... |
// pages/homepage/homepage.js
Page({
/**
* 页面的初始数据
*/
data: {
indicatorDots: true,
autoplay: true,
interval: 3000,
duration: 1000,
indicatoColor: 'white',
indicatorActiveColor: '#db4b29',
banners: [],
categories: [
{
name: '抢购新茶',
src: '../../images/homep... |
import React from "react";
import PropTypes from "prop-types";
import Popover from "@paprika/popover";
import useI18n from "@paprika/l10n/lib/useI18n";
import IsDarkContext from "../../context";
import { MAXIMUM_NUM_OF_CHARACTER } from "../../constants";
import * as sc from "./Link.styles";
const truncate = str =>
... |
const csv = require('csv')
const fs = require('fs')
const path = require('path')
//
fs.readFile(path.join(__dirname, './customer-data.csv'), {encoding: 'utf-8'}, function(error, data) {
if (error) return console.error(error)
var converted = '['
csv.parse(data, {}, function(error, output) {
if (error) return consol... |
const jwt = require("jsonwebtoken");
async function authHeader(req, res, next) {
const auth = req.headers && req.headers.authorization;
if (!auth) {
req.isAuth = false;
return next();
}
const token = auth.split(" ")[1];
if (!token || token.length === 0) {
req.isAuth = false;
return next();... |
module.exports = {
rules: {
//'media-query-parentheses-space-inside': 'never'
}
};
|
//前端isLogin
import axios from 'axios';
export function isLoginChecker(){
axios.post("/api/isLogin",
{}
).then(res=>{
if(res.data && res.data.message === true){
console.log("登入者",res.data.data);
return true;
}else{
console.log("未登入");
return false;
}
})
} |
import Service from '@ember/service';
import fetch from 'fetch';
import { get, set, computed } from "@ember/object";
import { assign } from '@ember/polyfills';
import { inject as service } from '@ember/service';
import { reject } from 'rsvp';
export default Service.extend({
configService: service("config"),
use... |
import React, { createContext, useState } from 'react';
import { AddProducts, FetchProducts, UpdateProduct } from '../api/products';
export const ProductContext = createContext();
const ProductContextProvider = (props) => {
const [products, setProducts] = useState([])
const [productsLoading, setProductsLoadin... |
/**
* @Author: wangxu <ceekey>
* @Date: 2017-05-01 14:58:40
* @Email: xu.wang@ishansong.com
* @Project: terra
* @Filename: api.js
* @Last modified by: ceekey
* @Last modified time: 2017-05-05 13:47:19
*/
'use strict';
let dao = require("../dao/daos");
let api = {};
let R = require('ramda');
class Api {
... |
export const FETCH_ECOTURISMO = 'FETCH_ECOTURISMO';
export const FETCH_ECOTURISMOS = 'FETCH_ECOTURISMOS';
export const REQUEST_LOADING_ECOTURISMO = 'REQUEST_LOADING_ECOTURISMO';
export const REQUEST_REJECTED_ECOTURISMO = 'REQUEST_REJECTED_ECOTURISMO';
|
const buildGround = (w,h,scene) => {
var skyboxMaterial = new BABYLON.SkyMaterial("skyMaterial", scene);
skyboxMaterial.backFaceCulling = false;
var skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, scene);
skybox.material = skyboxMaterial;
var setSkyConfig = function (property, from, to) {
var keys... |
const largestPalindrome = () => {
let max = 0
for(let i=100; i<1000; i++){
for(let j=100; j<1000; j++){
let product = i*j
if(product > max && product.toString() === product.toString().split("").reverse().join("")){
max = product
}
}
}
return max
}
console.log(largestPalindrome... |
import React from "react";
import { useRef , useState } from "react";
import "../App.css";
import useWebAnimations from "@wellyshen/use-web-animations";
export const RedQueen = (prop) => {
console.log(prop.playback);
const {playback} = prop;
console.log(playback);
const {ref , playState , getAnimation} = us... |
import { combineReducers } from 'redux'
import search from './search/search'
export const reducers = combineReducers({ search })
|
import React from 'react';
import CircularProgress from '@material-ui/core/CircularProgress';
import {withStyles} from "@material-ui/styles";
import styles from "svm_assets/jss/views/demo.js";
class Plot extends React.Component {
render () {
const {classes} = this.props;
return (
<artic... |
var contentDiv = document.getElementById("content");
var x, y, angle = 0;
for (var i = 0; i < 5; i++) {
x = Math.round(Math.cos(angle) * 100);
y = Math.round(Math.sin(angle) * 100);
angle += 5;
var currentDiv = document.createElement("div");
currentDiv.className = 'moving';
currentDiv.style.po... |
mainApp.directive('persondirective', ['$q', 'invokeServerService', function ($q, invokeServerService) {
return {
restrict: 'E',
replace: "true",
scope: {
ngModel: '=ngModel',
frmName: '@name',
options: '='
},
templateUrl: '../app/pages/sha... |
import 'babel-polyfill';
import '~/styles.less';
import { setup } from '~/frontpage';
history.pushState({}, 'Scroll animations', '/');
setup();
|
class Spinner {
constructor() {
this.spinnerWrapper;
}
showSpinner() {
this.spinnerWrapper = document.createElement("div");
this.spinnerWrapper.className = "layout-center";
this.spinner = document.createElement("div");
this.spinner.className = "lds-dual-ring";
this.spinnerWrapper.appendCh... |
const colors = require("tailwindcss/colors");
module.exports = {
purge: [
"./src/pages/**/*.{js,ts,jsx,tsx}",
"./src/components/**/*.{js,ts,jsx,tsx}",
],
darkMode: false, // or 'media' or 'class'
theme: {
screens: {
sm: "420px",
md: "768px",
lg: "976px",
xl: "1250px",
},
... |
import Vue from 'vue'
import Vuex from 'vuex'
import hello from './modules/hello/helloModule'
import hello2 from './modules/hello/hello2Module'
import step4 from './modules/step4Module'
import step5 from './modules/step5Module'
import step7 from './modules/step7Module'
Vue.use(Vuex)
export default new Vuex.Store({
... |
import React from "react";
import ThemeProvider from "@material-ui/styles/ThemeProvider";
import theme from "./app/themes";
import Home from "./app/containers/home-container";
/**
* Root component of the App
*/
export default class App extends React.Component {
render() {
return (
<ThemeProvider theme={t... |
let playersNames=['Player-1','Player-2'];
let playersSymbols=['X','O'];
let allowedMoves=[1,2,3,4,5,6,7,8,9];
let gamePlay;
let currentPlayerNumber=0;
const loadGame=function(){
gamePlay=new GamePlay(playersNames,playersSymbols,allowedMoves);
startGame();
};
const startGame=function(){
document.getElementById('... |
import firebase from 'firebase';
import 'firebase/firestore';
export default async function getUserMail(mail) {
const db = firebase.firestore();
let email = mail;
if(!mail)
email = "default@gmail.com";
var result = null;
await db.collection('users').where("email", "==", email)
.get()
... |
function validate(key, value) {
let errorMessage = "";
const emailRegex = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
const latinRegex = /^[a-zA-z0-9!@#№$%^&*()_+=.,:;~{}/|-]+$/g;
switch (key) {
case "email":
if (!value) errorMessage = "E-mail is required";
else if (!emailRegex.test(value)) er... |
App.NewItemView = Backbone.View.extend({
events: {
'submit #new-item-form': 'save',
'click #save': 'save',
'click #cancel': 'close',
'click .icon-close': 'removeImage'
},
template: App.TemplateCache.get('#new-item-template'),
initialize: function() {
_.bindAll(this, 'save');
Backbone.... |
import React, { Component } from "react";
import {Modal, Form, Input, TreeSelect, Tree} from 'antd';
import { connect } from 'react-redux';
import { fetchAppPermissionAction, addAppPermissionAction } from '../../../store/action';
import { arrToTree } from '../../../utils/tools';
const TreeNode = Tree.TreeNode;
@conne... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "8a79673303e319d1c1b5a7b04c6771fc",
"url": "/index.html"
},
{
"revision": "b764a997e1f3c1254b02",
"url": "/static/css/main.81f1aaa3.chunk.css"
},
{
"revision": "4b027ebc2d55da024d26",
"url": "/static/js/2.... |
import React from 'react'
import ReactDOM from 'react-dom'
import storage from './helpers/storage'
import { Provider } from 'react-redux'
import { HashRouter } from 'react-router-dom'
import App from './app'
import configureStore from './reducks/configureStore'
const bootstrap = async () => {
const data = await sto... |
function judegHasKity (dom, num) {
var len = dom.find('.sale-kity-box').length;
console.log(len);
if (!len || len < num) {
dom.parent().hide();
dom.parent().siblings('.sc-not-goods-wrapper').fadeIn();
}
}
function delKity () {
$('.sale-kity-del').on('click', function () {
var thisPa = $(this).parent().parent... |
'use strict';
const MAX_ASCII_CHAR_CODE = 127;
const internals = {};
internals.ipv4 = new RegExp(/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/);
internals.ipv6 = new RegExp(/(([0-9a-fA-F]{1,4}:){7,7}... |
var app = require("express")();
var http = require("http").Server(app);
var io = require("socket.io")(http);
var fs = require("fs");
var color = require("colors");
console.log("app.js - " + "[Spacey] Loaded initial requirements".green);
var bitmap = require("./modules/bitmap.js");
var database = require("./modul... |
function doLogin(){
//alert('g');
$('#redbg_view').removeClass('pt-page-moveFromTop');
$('#updiv_view').removeClass('pt-page-moveToTopFade hide');
//锁消失的场景
$('#Getred').addClass('pt-page-rotateSlideOut');
//rotateYDIV();
$('#updiv_view').addClass('pt-page-moveToTopFade');
$('#redbg_view').addClass... |
const express = require('express');
const mysql = require('mysql');
const router = express.Router();
const db = mysql.createConnection({
host : 'localhost',
user : 'root',
password : '',
database : 'sensordb',
multipleStatements: true
});
function convertDate(d) {
const date = new Date... |
/**
* Created by dgarrett on 12/24/13.
*/
RamModule.factory('faqsDao', function($http, dataCache, utilityService, logging) {
var faqsDao = {};
var thisModule = 'faqsDao'
var i = -1;
faqsDao.data = [
{id: ++i, title: 'What browsers does th site support?', text:
'This site has bee... |
/*
* setSelVal('#sel', json.ajly); //下拉赋值
* setRadioVal('#radio', true); //单选赋值
* setCheckVal('#check', true); //多选赋值
* selDisable('#saly',true); //下拉禁用
* checkDisable("#check",true); //多选禁用
* radioDisable("#radio",true); //单选禁用
* inputDisable("#text",true); //输入框禁用
* 注:以上方法 第一个参数是jQuery对象或选择器,并非一定是id。
... |
$(document).ready(function() {
var clickCount = 0;
var charClicked = "";
var attackChar = "";
var defendChar = "";
var attackHealth = 0;
var defendHealth = 0;
var deadDefenders = [];
var gameStatus = "";
var defenderIsActive = false;
var resetButton = $("<button>");
rese... |
import React from 'react';
import './OrderProducts.css';
import test from '../../../Resources/Picture/Products/NikonLens.jpg';
const OrderProducts = (props) => {
return (
<div className='orderproduct__card'>
<div className='product__imageContainer'>
<img className='product__image' src={props.image} ... |
import React from 'react'
import axios from 'axios'
import seta from '../img/botao.png'
import styled from 'styled-components'
import lixeira from '../img/lixeira.png'
const ButtonImg = styled.img`
width: 20px;
object-fit: cover;
display: block;
`
const Conteiner = styled.div `
display: block;
... |
module.exports = targets => {
targets.of('@magento/pwa-buildpack').specialFeatures.tap((flags) => {
flags[targets.name] = {
esModules: true,
cssModules: true,
graphqlQueries: true,
rootComponents: true,
i18n: true
};
});
};
|
export function showModalElement(classModalParentElememntCSS, timerModal){
const modalWrapper = document.querySelector(classModalParentElememntCSS);
if(modalWrapper.classList.contains('show')) return;
modalWrapper.classList.toggle('show');
document.body.style.overflow='hidden';
if(timerModal){
... |
import Auth from "./auth";
const bodyParser = require('body-parser');
var express = require('express')
const app = express();
app.use(bodyParser.json()); // support json encoded bodies
app.use(bodyParser.urlencoded({extended: false})); // support encoded bodies
export const router = express.Router()
router.post('/... |
import config from '../app/config'
import Contact from '../store/contact.jsx'
import db from '../store/database.jsx'
import Skype from './static.jsx'
import striptags from 'striptags'
import {AllHtmlEntities} from 'html-entities'
import {clear} from '../util/index.jsx'
import {millisecondsId, isSkypeUsername} from '../... |
"use strict";
function generateClassRecordSummary(scores) {
const Exam1 = [];
const Exam2 = [];
const Exam3 = [];
const Exam4 = [];
const Exams = [];
const StudentGrades = [];
for (let student in scores) {
let examScores = scores[student]['scores']['exams'];
let exerciseScores = scores[student][... |
import React, { Component } from 'react';
import './register.css';
class Register extends Component {
constructor(props) {
super(props);
this.state = {
email: null,
username: null,
password: null
}
this.handleChange = props.handleChange.bind(this... |
import { initializeApp } from 'firebase/app';
import { getAuth, onAuthStateChanged } from 'firebase/auth';
const firebaseConfig = {
apiKey: "AIzaSyDQbcWmccXbr775SiEaIKOCVjB7r31bRPM",
authDomain: "powa-wise-app.firebaseapp.com",
projectId: "powa-wise-app",
storageBucket: "powa-wise-app.appspot.com",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.