text stringlengths 7 3.69M |
|---|
const fs = require('fs')
arguments = process.argv.splice(2)
// transform is just a helper function to process the word,
// To make the code more readable, I keep it outside.
const transform = require('./helper').transform
function extract_words(path_to_file) {
let me = this
me['_data'] = fs.readFileSync(path... |
import React from 'react';
import Header from '../sections/header/Header';
import Wrapper from '../sections/wrapper/Wrapper';
import About from '../sections/about/About';
import Skills from '../sections/skills/Skills';
// import Experience from '../sections/experience/Experience';
// import Education from '../sections/... |
function aestheticise_text(text_in) {
return text_in.split(" ").map(word => word.split("").join(" ")).join(" ")
}
function aestheticise() {
message = $("#aes-input")[0].value || "This is some aesthetic text"
message = aestheticise_text(message)
$("#aes-output")[0].innerHTML = message
}
$("#aes-submit... |
// pages/habit/group/export.js
var wegrouplib = require('../../common/lib/wegrouplib')
var util = require('../../../utils/util')
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
picker_start_day: '',
picker_end_day: '',
start_day: '',
end_day: '',
error: {
msg: "",
show: t... |
import React from 'react';
import HeaderTabs from './../components/HeaderTabs';
import HeaderTitle from './../components/HeaderTitle';
export default function HeaderContainer(props) {
return (
<div>
<HeaderTitle />
<HeaderTabs changeView={props.changeView} />
</div>
)
} |
for (var i = 0; i < 12; i++) {
var s = "Item " + (i + 1);
debugger;
console.log(s);
} |
var $define = {};
$define.u = {};
$define.u.Mobile = (navigator.userAgent.match(/Android|iPhone|SymbianOS|Windows Phone|iPad|iPod|MQQBrowser/i) && navigator.userAgent.indexOf("Windows NT") == -1) ? true : false;
$define.api = {};
console.log(navigator.userAgent);
var tag = document.createElement('scri... |
import React from "react";
import MoviesList from "../../Movies/MoviesList";
import Filters from "../../Filters/Filters";
class MoviesPage extends React.Component {
constructor() {
super();
this.initialState = {
filters: {
sort_by: "popularity.desc",
primary_release_year: null,
... |
const dbpool = require("../config/dbconfig"); //dbpool
// const userModel = require("../dao/userdao");
const filecontroller = {
};
module.exports = filecontroller; |
/**
* Created by Administrator on 2016/8/17.
*/
// 隔1s检查一次合成进度
function check_progress(ret, base_url) {
var btn_synthesis = $('#synthesis-btn');
var span_warning = $('#warning');
var span_audio = $('#audio');
if (ret.retCode != '000000') {
span_warning.text(ret.retMsg);
span_warning... |
import * as types from './constants';
const initialState = {
message: '',
status: false,
loading: false,
showPlanner: false
};
const TalkToAhwanamReducer = (state = initialState, action) => {
switch (action.type) {
case types.POST_FORMDATA:
return {
...state,
... |
import React, { Component } from 'react';
import PartyInvitation from './PartyInvitation';
export default class App extends Component {
render() {
return (
<div>
<PartyInvitation />
</div>
);
}
}
|
app.controller('TestAppController', function (MyService, $scope) {
//tabs start
$scope.tabs = [{
title: 'Pie Chart',
url: 'pie.tpl.html'
}, {
title: 'table',
url: 'table.tpl.html'
}];
$scope.currentTab = 'pie.tpl.html';
$scope.onClickTab = function (tab) {
$scope.currentTab = tab.url;
}
$scope.is... |
const SHSCoinCrowdsale = artifacts.require("./SHSCoinCrowdSale.sol")
moudule.exports = function(deployer, network, accounts) {
//const startTime = web3.eth.getBlock(web3.eth.blockNumber).timestamp + 5
//const endTime = startTime + (86400 * 20)
const rate = new web3.BigNumber(1000)
const wallet = accounts[0]
deployer.... |
import React from 'react';
import ResetPasswordForm from '../containers/ResetPassword';
const ResetPassword = ({ ...props }) => (
<ResetPasswordForm {...props} />
);
export default ResetPassword;
|
(function() {
// 这些变量和函数的说明,请参考 rdk/app/example/web/scripts/main.js 的注释
var imports = [
'rd.controls.Module', 'rd.services.PopupService', 'base/module-controller'
];
var extraModules = [ ];
var controllerDefination = ['$scope', 'PopupService', main];
function main(scope, PopupServ... |
$(document).ready(function(){
$("#barre").click(function(){
$("#sandwich").toggle();
});
});
|
const APIError = require('../lib/errors/api.error');
const errorDictionaries = require('../lib/errors/dictionaries');
module.exports = (App) => {
App.error = {
dictionaries: errorDictionaries,
APIError
};
};
|
var express = require('express');
var router = express.Router();
var models = require('../../models');
var jwt = require('jsonwebtoken');
var bcrypt = require('bcryptjs');
// **********************************
//登录接口
router.post('/login', function (req, res, next) {
var username = req.body.username
var pass... |
import PropTypes from "prop-types";
export const dayMap = {
0: "Sunday",
1: "Monday",
2: "Tuesday",
3: "Wednesday",
4: "Thursday",
5: "Friday",
6: "Saturday"
};
export const monthMap = {
0: "January",
1: "February",
2: "March",
3: "April",
4: "May",
5: "June",
6: "July",
7: "August",
8... |
import React from "react";
import { withRouter, Link } from "react-router-dom";
import { connect } from "react-redux";
import { ReactComponent as DashIcon } from "../assets/svg/dashboard.svg";
import { ReactComponent as PersonIcon } from "../assets/svg/people.svg";
import { ReactComponent as ReviewIcon } from "../asset... |
require.config({
paths: {
jquery: 'vendor/jquery-2.0.3.min',
underscore: 'vendor/underscore-1.5.2.min',
backbone: 'vendor/backbone-1.0.0.min',
prismic: 'vendor/prismic.io-1.0.11.min',
text: 'vendor/text-0.27.0.min',
modernizr: 'vendor/modernizr-2.6.2.min',
catslider: 'vendor/catslider',
... |
window.registerExtension("dependencyversion/report", function(options) {
var isDisplayed = true;
if (!document.querySelector("style#dependency-version-report")) {
var style = document.createElement("style");
style.id = "dependency-version-report";
style.appendChild(document.createTextNo... |
async function login(page, callback) {
let res;
const p = new Promise((r) => res = r);
await page.waitForSelector('div[class*="qrCode-"] > img');
page.browser().on('targetchanged', (e) => {
let t = e.url();
if (t === 'https://discord.com/channels/@me') res();
});
const b64 = a... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
let name = "Vitaliy",
age = 25;
let user = {
name,
age
};
console.log(JSON.stringify(user)); |
jQuery(document).ready(function($) {
//FEED_URL = 'http://stackoverflow.com/feeds/tag?tagnames=wordpress&sort=newest';
//feed url
$.ajax({
url: document.location.protocol + '//blogs.ntu.edu.sg/lib-databases/?feed=json',
//document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&n... |
'use strict';
const match = require('../../MultiBracketValidation/multi-bracket-validation');
const trueArr =['{}','{}(){}','()[[Extra Characters]]','(){}[[]]','{}{Code}[Fellows](())'];
const falseArr =['[({}]','(](','{(})'];
describe('it should check for even amount of scoping characters', ()=>{
it('Should che... |
import { StyleSheet } from 'react-native'
import { Color, Layout } from '../../../constants'
const styles = StyleSheet.create({
container: {
flex: 1
},
section: {
width: '100%',
marginTop: Layout.EDGE_PADDING
},
imageWrapper: {
justifyContent: 'center',
alignItems: 'center',
// backgr... |
import { createStore, applyMiddleware, combineReducers } from 'redux';
import createSagaMiddleware from 'redux-saga';
import rootReducer from 'redux/reducers';
import rootSaga from 'redux/sagas'
// create the saga middleware
const sagaMiddleware = createSagaMiddleware();
const store = createStore(
combineReducer... |
import React, {Component} from 'react';
import './App.css';
import Toolbar from "./component/toolbar";
import logo from './logo.svg';
import TodoList from "./component/todolist/todolist";
class App extends Component {
constructor(props) {
super(props);
this.state = {
todoList: [
... |
import axios from 'axios'
export default class JobPostingService {
getJobPostings(){
return axios.get("http://localhost:8080/api/jobposting/getall")}
getActiveJobPostings(){
return axios.get("http://localhost:8080/api/jobposting/getAllIsActive")}
getJobPostingsWithDetails(){
r... |
const freelanceList = [
{
name: 'Software & Tech',
topicID: 'freelance_software',
icon: 'code',
color: 'peach',
children: [
{
name: 'Web Development',
topicID: 'freelance_software_webdevelopment',
color: 'peach',
},
{
name: 'Mobile Apps',
t... |
import React from "react";
import PropTypes from "prop-types";
import Card from "../atoms/card";
function Article(props) {
const { articles } = props;
return (
<React.Fragment>
{articles &&
articles.map((x, index) => {
return <Card key={index} element={x}></Card>;
})}
</Reac... |
var lib = {};
lib.tmpl = function(){
var cache = {};
function _getTmplStr(rawStr, mixinTmpl) {
if(mixinTmpl) {
for(var p in mixinTmpl) {
var r = new RegExp('<%#' + p + '%>', 'g');
rawStr = rawStr.replace(r, mixinTmpl[p]);
}
}
return rawStr;
};
return function tmpl(str, data, opt) {
... |
import React from 'react' ;
const ViewPost = () => {
return <div> ViewPost </div>;
}
export default ViewPost ; |
import styled, { css } from "styled-components";
import tokens from "@paprika/tokens";
import stylers from "@paprika/stylers";
import * as types from "../../types";
const blueSelected = tokens.color.blueLighten50;
const activeStyles = css`
${stylers.focusRing()}
`;
const disabledStyles = css`
background: transpa... |
import Headerbounce from "./Headerbounce";
import React, { useState, useEffect } from "react";
import axios from "axios";
import "../../src/App.css";
import Badge from "react-bootstrap/Badge";
import "bootstrap/dist/css/bootstrap.min.css";
import { motion } from "framer-motion";
import Button from "react-bootstrap/Butt... |
import React, { Component } from 'react';
import { Row, Col, Collapse } from 'reactstrap';
import s from './footerMobile.scss';
class FooterMobile extends Component {
constructor(props) {
super(props);
this.state = { collapse: [] };
}
toggle = (index) => {
const { collapse } = this.state;
collap... |
import * as actionTypes from './types';
export const setInBatchMode = inBatch => ({
type: actionTypes.SET_INBATCHMODE,
payload: inBatch,
})
export const addBatchedAction = action => ({
type: actionTypes.ADD_BATCHED_ACTION,
payload: action,
})
export const clearBatchedActions = () => ({
type: acti... |
$(document).ready(function(){
// all elements
$('*').css('background-color', 'lightgrey');
// selector tag
$('h1').css('color', 'red');
$('p').css('color', 'blue');
// selector class
$('.judul').css('background-color', 'blue');
$('.paragraf').css('color', 'salmon');
// selector id
$('#judul').css('border'... |
import React, { useContext, useState } from "react";
import axios from "axios";
import Grid from "@material-ui/core/Grid";
import Paper from "@material-ui/core/Paper";
import Button from "@material-ui/core/Button";
import TextField from "@material-ui/core/TextField";
import Alert from "@material-ui/lab/Alert";
import {... |
import {FETCH_DATA_SUCCESS} from '../actionTypes'
export default function dataReducer(state = [], action) {
const {type} = action;
switch (type) {
case FETCH_DATA_SUCCESS: {
const {result} = action;
return result;
}
default: {
return state;
}
... |
import React from 'react'
import ReactDOM from 'react-dom'
import PropTypes from 'prop-types'
import App from 'app/App'
import * as serviceWorker from 'serviceWorker'
import { persistor, store } from 'app/Store'
import { Provider } from 'react-redux'
import { Switch, BrowserRouter, withRouter } from 'react-router-dom'
... |
/////////////////////////////////////////////////////////////////
// Sýnidæmi í Tölvugrafík
// Vörpunarfylki búið til í JS og sent yfir til
// hnútalitara, sem margfaldar (þ.e. varpar)
//
// Hjálmtýr Hafsteinsson, febrúar 2019
/////////////////////////////////////////////////////////////////
var ca... |
requirejs.config({
base:"js",
paths:{
'jquery':'lib/jquery.min'
}
});
require(['jquery','app/gotop','app/fullwater','app/lazy','app/lunbo']),function($,gotop,fullwater,lazy,lunbo){
}; |
import React from 'react';
import L from 'leaflet';
import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import 'leaflet-draw';
import './leaflet.css';
import './leaflet-draw.css';
const TILES_PROVIDER = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
const MAP_LICENCE = 'htt... |
import React from "react";
import ReactDOM from 'react-dom'
import { render, fireEvent, cleanup } from "@testing-library/react";
import Form from "../Form";
afterEach(cleanup)
it("renders without crashing", () => {
const div = document.createElement('div')
ReactDOM.render(<Form />, div)
})
it("checks the pla... |
import React from 'react';
import PropTypes from 'prop-types';
import { View } from 'react-native';
import { orange } from 'kitsu/constants/colors';
import { StyledText } from 'kitsu/components/StyledText';
import { styles } from './styles';
export const Pill = ({ color, label }) => (
<View style={[styles.pill, { ba... |
import data from "./data";
const listSize = 100;
Page({
data : {
list0: []
, list1: []
, list2: []
}
, onLoad(){
this.listStarts = {};
this.setCurrent("list1");
}
, setCurrent(currentListId){
let changedData = {};
let currentListIndex = p... |
var template = require("./outer.handlebars");
import {
minhaFuncaoQueDefineTitle
} from './lib.js'
export function MeuApp() {
var div = document.createElement('div');
div.innerHTML = template({
segundoNivel: "Segundo nível!",
title: minhaFuncaoQueDefineTitle()
});
document.body.appe... |
/*
#pragma strict
var playerWeapon: PlayerWeaponControl;
var meleeScript : PlayerMelee;
var animator : Animator;
var camScript : CamScript;
var alive : boolean;
var inControl : boolean;
var camTrans : Transform;
var grounded : boolean;
var groundContact : boolean;
var reqContactTime : float;
var contactTime : flo... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const InvitationToken_1 = require("./InvitationToken");
class InvitationCreate {
constructor(model) {
if (!model)
return;
this.firstName = model.firstName;
this.lastName = model.lastName;
this.fu... |
#target Illustrator
if (app.documents.length > 0) {
mySelection = activeDocument.selection;
if (mySelection.length > 0) {
var doc = app.activeDocument; //current document
var sel = doc.selection; //current slection
var sl = sel.length; ... |
appicenter.controller('AuctionCtrl', ['$scope', '$location', '$timeout', '$route', 'firebaseService', 'loginService', function($scope, $location, $timeout, $route, firebaseService, loginService) {
// make sure user is logged in
$scope.auth = loginService;
$scope.auth.$getCurrentUser().then(function(user) {
co... |
// if (typeof module === "undefined") module = {};
const ERC20ABI = [
{
constant: true,
inputs: [],
name: "name",
outputs: [
{
name: "",
type: "string",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs... |
'use strict';
const _ = require('lodash');
const participation = require('./_channelParticipation');
module.exports = (channel, thresh, app, options) => new Promise((resolve, reject) => {
if (!app._ircClient.isInChannel(channel) || !app._ircClient.isOpInChannel(channel)) {
reject(new Error(`I am not in, or I am ... |
import React, { Component } from "react";
import WeatherPage from "../component/WeatherPage";
import { connect } from "react-redux";
import { cityName, countryName, search } from "../redux/action/action";
class Weather extends Component {
handleCity = e => {
const city = e.target.value;
this.props.actionForS... |
import WhatWeDo from './WhatWeDo'
import MeetAmico from './MeetAmico'
import AmicoConnect from './AmicoConnect'
import DownloadApp from './DownloadApp'
export {
WhatWeDo,
MeetAmico,
AmicoConnect,
DownloadApp
}
|
import jwtFunctions from '../auth/jwt.js';
const authenticateJWT = async (req, res, next) => {
try {
const authHeader = req.headers.authorization;
if (authHeader) {
const token = authHeader.split(' ')[1];
const user = jwtFunctions.decodeUser(token);
req.user = ... |
import React from 'react';
import {
createBottomTabNavigator,
createStackNavigator,
createSwitchNavigator
} from 'react-navigation'
import AddContactScreen from "./screens/AddContactScreen"
import ContactListScreen from "./screens/ContactListScreen"
import ContactDetailsScreen from "./screens/ContactDetail... |
class StringUtils{
static equalIgnoreCase(a, b){
return typeof a === 'string' && typeof b === 'string'
? a.localeCompare(b, undefined, { sensitivity: 'accent' }) === 0
: a === b;
}
}
module.exports=StringUtils;
|
module.exports = {
itemFields: data => {
const itemFields = {
user: data.user,
item: data.item,
text: data.text,
price: data.price,
title: data.title,
itemImage: data.itemImage
};
return itemFields;
}
};
|
/**
* DomoGeeek v0.1
* https://github.com/ltoinel/domogeeek
*
* Copyright 2014 DomoGeeek
* Released under the Apache License 2.0 (Apache-2.0)
*
* @desc: SMTP Connector
* @author: ltoinel@free.fr
*/
var email = require("emailjs/email");
/**
* Send a text email using an SMTP server.
*
* @param phone The ... |
var assert = require('assert');
var testDoc = 'file:///'+ __dirname +'/../../helpers/html/test.html';
describe('grunt-webdriverjs test', function () {
it('checks if title contains the search query', function(done) {
browser
.url(testDoc)
.getTitle(function(err,title) {
... |
import React from 'react';
import PropTypes from 'prop-types';
import {Redirect} from 'react-router-dom';
import classes from './index.module.css';
// import imgTopViewLeft from './assets/img-topview-left.png';
//import imgTopViewRight from './assets/img-topview-right.png';
import {UserCardSquareAuth} from './componen... |
var mysql = require('mysql');
var propObj=require('../config_con.js').ruleEngineDbProps;
//start mysql connection
var connection = mysql.createConnection(propObj);
connection.connect(function (err) {
if (err) {
console.log('Error in Mysql connection With rule_engine database :-', err);
} else {
... |
import React from "react";
import "./questionBox.css";
import { db } from "../../services/firebase";
import { NavLink } from "react-router-dom";
class QuestionBox extends React.Component {
constructor(props) {
super(props);
this.state = {
bool: 0,
id: Date.now().toString(),
flag: 0,
a... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Dialog, {
DialogActions,
DialogContent,
DialogTitle
} from 'material-ui/Dialog';
import Button from 'material-ui/Button';
import { getSegments, closeSelectRefsDialog, addRef } from '../act... |
import React from "react";
import { withTranslation } from "react-i18next";
import { withRouter } from "react-router-dom";
import history from "../history";
import { supportedLanguages } from "../i18n";
function LanguageSwitcherComp(props) {
const { i18n } = props;
const changeLanguage = nextLang => {
i18n.... |
const sqlite3 = require('sqlite3');
const db = new sqlite3.Database('./data/olympic_history.db');
const all = function (query) {
return () => {
return new Promise((resolve, reject) => {
db.all(query, [], (err, rows) => {
if (err) {
err.message = (`Query:\n'${query}'\n caused: ${err.messa... |
import React from "react";
import Container from "../components/Container";
import Row from "../components/Row";
import Col from "../components/Col";
import Project from "../components/Project";
function Projects() {
return (
<Container style={{ marginTop: 30 }}>
<Row>
<h1>My Po... |
const Movie = require("../models/movie");
const BadRequestError = require("../errors/BadRequestError");
const NotFoundError = require("../errors/NotFoundError");
const ForbiddenError = require("../errors/ForbiddenError");
module.exports.getMovies = (req, res, next) => {
//console.log(req.user);
const owner = req.... |
import React from 'react';
import { mount } from 'enzyme';
import { injectIntl } from '../../lib/index.es.js';
const intlConfig = {
locale: 'en',
messages: {
greeting: 'Hello {name}!',
},
};
describe('format HTML message', () => {
it('formats HTML message properly', () => {
const Strong = ({ children ... |
'use Strict'
function curlHandler(note) {
let noteKey = ''
let noteValue = ''
for (var key in note) {
noteKey = key
noteValue = note[key]
}
let noteData = noteValue == '' && noteKey != 'note_content' ? { note_content: noteKey } : note
return noteData
}
module.exports = {
curlHandler
}
|
/// <reference path="lib/jquery-1.7.1.js" />
/// <reference path="_eGravity.js" />
World = {
settings: {
width: 0,
height: 0,
gravity: 0,
hasColision: true
},
title: '',
context: null,
Elements: [],
load: function (context) {
if (context) World.contex... |
(function(){var g=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},f=function(a){var b=[],c;for(c in a)b.push(c+"="+encodeURIComponent(a[c]));return b.join("&")},e=function(a,b){this.base=a||{};var c={id:"f2e"},d;for(d in c)"undefined"==typeof this.base[d]&&(this.base[d]=c[d]);this... |
exports.sourceNodes = async ({ actions, createNodeId, createContentDigest }) => {
const icons = [
{ type: 'fab', name: 'linkedin', url: 'https://www.linkedin.com/in/emil-petersson-5a042b114/' },
{ type: 'fab', name: 'facebook', url: 'https://www.facebook.com/emilpee' },
{ type: 'fab', name: 'github', url:... |
import React from 'react'
import {Link } from "react-router-dom"
// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
function CardItem(props) {
const {item,addToCart} = props
const addItem = async () => {
console.log(await addToCart(item._id))
}
return (
<div><... |
'use strict'
//전역으로 사용하는것, 함수마다 사용하는것 자제. |
import request from '@/utils/request'
/**
* 版本
* @constant
* @type {string}
* @default
* */
/**
* 获取服务器地址
* * @param {*} params 请求地址
*/
export function getAddress(params) {
return request({
url: `/sys/configs`,
method: 'get',
params
})
}
/**
* 根据名称获取服务器地址
* * @param {*} params 请求地址
*/
exp... |
import logo from './logo.svg';
import './App.css';
import { useEffect, useState } from 'react';
function App() {
// var person= {
// name:"Dr. Mahfuz",
// job:"Singer"
// }
// var person2= {
// name:"Eva Rahman",
// job:"Kokil Konthi"
// }
// var style ={
// color:'red',
// background... |
import $ from '../core';
$.prototype.addClass = function(...classNames) { //Добавляет 1 и более классов, переданных в ...classNames через запятую
for (let i = 0; i < this.length; i++) {
if (!this[i].classList) {
continue;
}
this[i].classList.add(...classNames);
}
retur... |
$(function() {
window.$Qmatic.components.card.transferUserPoolCard = new window.$Qmatic.components.card.TransferCardComponent('#transferUserPoolCard')
})
|
var pageSize = 25;
var subscribe = document.getElementById('subscribe').value;
Ext.define('gigade.EdmContentNew', {
extend: 'Ext.data.Model',
fields: [
{ name: "content_id", type: "int" },
{ name: "group_id", type: "int" },
{ name: "subject", type: "string" },
{ name: "template_id", type: "int"... |
/* SERVICES */
var userService = require('./service/userService');
var messageService = require('./service/messageService');
var systemService = require('./service/systemService');
var searchService = require('./service/searchService');
var monitorService = require('./service/monitorService');
module.exports = functio... |
MyApp.controller('HelloController', hello);
function hello($scope)
{
$scope.name = "Genevieve";
} |
/*
* ================================================
* Kavimo.com
* Designer : WonderCo Team
* Programing : WonderCo Team
* URL : http://WonderCo.ir
* ================================================
** Blog Module - JS
* ================================================
*/
$(function(){
Kavimo.modules.bl... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema
//ObjectId = Schema.ObjectId;
const teacherSchema = new Schema({
id: Number,
name: String,
lastname: String,
username: {
type: String,
// ห้ามซ้ำ
unique: true
},
password: String
}, { versionKey: fa... |
import { useState } from "react";
export default function MessageForm({ message, handleClose }) {
const [visible, setVisible] = useState(true);
handleClose = () => {
setVisible(!visible);
};
return (
<>
{visible ? (
<>
<div className="message show">
<p>{message}</p>
... |
export const API_URL = 'http://localhost:8080/api';
export const TOKEN_AUTH_USERNAME = 'autoCenterClient';
export const TOKEN_AUTH_PASSWORD = '8ae1c884f76b6371acb51ec7faec4de8c9a4f2b568af2f992a6ca33cd094f1a6';
export const CARS_PAGE_SIZE = 4;
export const FUEL_ECONOMY_PAGE_SIZE = 10;
export const REPAIRS_PAGE_SIZE = ... |
class BackgroundManager{
constructor(){
this.content = document.querySelector('.mainContent');
}
setBackground(url){
this.content.style.backgroundImage = `url(${url})`;
this.content.style.backgroundSize = 'cover';
}
clearBackground(){
this.content.style.backgroundIm... |
import React, { useState } from 'react'
import "./MobileMode.css"
import logo from '../../Assets/Mobile – Graphic.png'
import eyelogo from '../../Assets/see_password_icon.png'
function MobileMode() {
const [passwordShown, setPasswordShown] = useState(false);
const togglePasswordVisiblity = () => {
setPa... |
"use strict";
var modules = ['common','module1','module2'];
var FileConfig = function(){
};
module.exports=new FileConfig();
FileConfig.prototype.modules=function(){
return modules;
} |
define(['rd.modules.i18n'],
function(i18n) {
//默认语言环境,在获取语言服务失败时使用
var defaultLocale = 'en_US';
return i18n.init({
"en_US": {
},
"zh_CN": {
}
}, defaultLocale);
});
|
export default class Article{
constructor(data){
this.id = data.id
this.title = data.title;
this.sectionName = data.sectionName;
this.dateOfPublication = data.dateOfPublication;
this.fullArticleLink = data.fullArticleLink;
}
createTemplate(){
... |
import Vue from "vue"
import axios from "axios"
import qs from "qs"
import { errorAlert } from "./alert"
import store from "../store/index"
import router from "../router"
let baseUrl = "/api"
Vue.prototype.$img = "http://localhost:3000"
// 响应拦截
axios.interceptors.response.use(res => {
console.log(res.config.url... |
const express = require('express');
const router = express.Router();
const db = require('../config/db_functions');
const bodyParser = require('body-parser')
const bcrypt = require('bcryptjs');
router.use(bodyParser.urlencoded({ extended: false }))
router.use(bodyParser.json())
const { ensureAuthenticated } = require... |
$(function() {
var key = getCookie('key');
if (!key) {
window.location.href = WapSiteUrl + '/tmpl/member_system/login.html';
return;
}
$.ajax({
type: 'post',
url: ApiUrl + "/index.php?act=member_property&op=memberEquity",
data: { key: key },
dataType: 'j... |
$(document).ready(function() {
//遍历购物车内的素有商品
$.getJSON('shop.json', function(result) {
var storeCont;
var goodsCont;
var storeArray = new Array();
var i = 0;
$.each(result, function(i, store) {
var storeText = store.store;
//获取购物车内所有商品的店铺,如果店铺名相同不再追加栏目
if(storeArray.indexOf(storeText) == ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.