text stringlengths 7 3.69M |
|---|
import {connect} from 'react-redux';
import OrderPage from '../../../components/OrderPage';
import {Action} from '../../../action-reducer/action';
import {getPathValue} from '../../../action-reducer/helper';
import helper, {fetchJson, postOption, showError, showSuccessMsg, getJsonResult} from '../../../common/common';
... |
import React,{Component} from 'react'
import LazyLoad from 'react-lazyload';
// lg: >750px;
// sm: <750px
const datas_sm = [
{
src:'./images/main/mobile/logo_a.png',
},
{
src:'./images/main/mobile/logo_b.png',
},
{
src:'./images/main/mobile/logo_c.png',
},
{
s... |
const MyPoly = class Poly {
getPolyName() {
ChromeSample.log('Hi. I was created with a Class expression. My name is ' +
Poly.name);
}
};
let inst = new MyPoly();
inst.getPolyName(); |
import { Button as AntdButton } from 'antd';
import cs from 'classnames';
import styles from './style.module.scss';
const Button = ({ className, ...props }) => (
<AntdButton
/** merge the classname */
className={cs(styles.button, className)}
/** pass rest of the props to the component, in other word extends t... |
import { createStore, applyMiddleware, combineReducers } from 'redux';
import thunk from 'redux-thunk';
import axios from 'axios';
const LOAD = 'LOAD';
const CREATE = 'CREATE';
const DELETE = 'DELETE';
const UPDATE = 'UPDATE';
//reducer
const usersReducer = (state = [], action)=> {
if(action.type === LOAD){
... |
adminModule.service('notificationRequest', NotificationRequest);
NotificationRequest.$inject = [
'$http'
];
function NotificationRequest($http) {
var ctrl = this;
ctrl.getNotifications = getNotifications;
ctrl.getSections = getSections;
ctrl.sendNotification = sendNotification;
/**
* Re... |
import React, { Component } from 'react';
import axios from 'axios';
import './Table.css'
import TableMapper from './TableMapper/TableMapper'
export default class Table extends Component {
constructor() {
super();
this.state = {
standings: []
}
}
handleGetStandings() ... |
import "../styles/globals.css";
import { ChakraProvider } from "@chakra-ui/react";
import Head from "next/head";
import { useRouter } from "next/router";
import React from "react";
import Footer from "../components/Footer";
import NavBar from "../components/NavBar";
import theme from "../theme";
const TITLE = "Title... |
var level = 1;
let tentativas = 5;
var rand = random();
function advinhar() {
let input = document.getElementById('input');
let t = document.getElementById('text-t');
let n = parseInt(input.value);
if (input.value.length == 0) {
alert('Por favor insira um número!');
} else {
if (tentativas > 1 || (t... |
var webglGraphicsSeq=1;
function BBHtml5Game( canvas ){
BBGame.call( this );
BBHtml5Game._game=this;
this._canvas=canvas;
this._loading=0;
this._timerSeq=0;
this._gl=null;
if( CFG_OPENGL_GLES20_ENABLED=="1" ){
//can't get these to fire!
canvas.addEventListener( "webglcontextlost",function( event ){
... |
const me = {
name: 'change',
'phone number': '1577-1577',
product: {
phone: 'iphone',
notebook: 'mac',
}
}
// console.log(me['name']) // 되긴 하지만 .접근을 주로 사용
// console.log(me.product.notebook)
// let books = ['javascript', 'python']
// let comics = {
// DC: ['Aquaman', 'Superman'],
/... |
//@ts-check
const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = env => {
// use the --env.production switch to switch between development & production builds
const isProduction = env.production === true;
if (!isProduction) {
console.warn('runni... |
'use strict';
/*
* Update the in-memory user record AND the database with the new (blank) memories.
*/
module.exports = async function __executeActionWipeMemory (action, recUser) {
if (!recUser) { throw new Error(`Cannot execute action "wipe memory" unless a user is provided.`); }
const database = this.__dep(`da... |
import { extendObservable, computed, action } from 'mobx';
function simpleFetch(url) {
return new Promise((resolve, reject) => {
window.fetch(url)
.then(res => {
if (res.ok) {
res.json().then(resolve).catch(reject)
} else {
... |
({
doInit : function(component, event, helper) {
console.log('Paused task ID'+component.get("v.taskflow"));
var currentTaskflow = component.get("v.currentTaskFlow");
console.log("current task flow "+currentTaskflow);
var chatperName = "";
if (!$A.util.isEmpty(currentTaskflow))
{
he... |
const Hello = (ticketData) => {
console.log('ticketData', ticketData)
return `
<!DOCTYPE html>
<html style="margin: 0; padding: 0;">
<head>
<title>Hello</title>
</head>
<body style="margin: 0; padding: 0;">
<p> Click here to view T... |
import * as recordActions from "./recordActions";
import * as types from "./actionTypes";
import { records } from "../../../tools/mockData";
import thunk from "redux-thunk";
import fetchMock from "fetch-mock";
import configureMockStore from "redux-mock-store";
// Test an async action
const middleware = [thunk];
const ... |
import {init} from "../pack/invite";
init(); |
import React from "react";
import PropTypes from "prop-types";
import { useLocation } from "react-router-dom";
import { NavLink } from "react-router-dom";
import DataTableInstance from "../uitils/DataTableUtils";
const DataTable = ({ table }) => {
const location = useLocation();
return (
<div className="scroll... |
export * from "./layout";
export * from "./slider";
export * from "./paypal";
|
const { Pool } = require("pg");
const databaseConfiguration = require("./secret/databaseConfiguration");
const pool = new Pool(databaseConfiguration);
module.exports = pool;
pool.query("SELECT foo FROM generation", (err, res) => {
if (err) return console.log(err);
console.log(res.rows);
});
|
// see types of prompts:
// https://github.com/SBoudrias/Inquirer.js#prompt-types
//
// and for examples for prompts:
// https://github.com/SBoudrias/Inquirer.js/tree/master/examples
module.exports = [
{
type: 'input',
name: 'name',
message: 'What is the name of your vue component? (PascalC... |
var DS_PO, DS_DonVi, DS_PO_Con, DS_BangKe_Cap1, DS_VatTu_PO, DS_VatTu;
var Path, Path_Sua;
$(document).ready(function () {
//document.oncontextmenu = function () { return false; }
$("#main-menu-toggle").click();
//#region bộ lọc
$("#Tr_Loc_TinhTrang").hide();
$("#Tr_Loc_Loai_PO").h... |
import React from 'react';
import ContentRightTop from '../components/ContentRightTop';
import ContentRightBottom from '../components/ContentRightBottom';
class ContentRight extends React.Component {
render () {
return (
<div className="med right-side">
<ContentRightTop />
<Co... |
define('app/models/manager', [
'app/models/model',
'magix'
], function (Model, Magix) {
var M = Magix.Manager.create(Model)
// 新增网站
M.registerModels([
// 获取导购推广类目
{
name: 'get_self_cat',
url: '/common/site/generalize/guideGetCategory.json',
method: 'GET'
}
])
// 设置推广位
M.r... |
const express = require('express');
const { rejectUnauthenticated } = require('../modules/authentication-middleware');
const pool = require('../modules/pool');
const router = express.Router();
router.get('/', rejectUnauthenticated, (req, res) => {
console.log('req.user:', req.user);
if(req.user.clearance_level >= ... |
angular.module('manager')
.controller('ContactsController', [
'$scope', '$filter', '$http', '$modal', 'settingsService', 'Str',
function ($scope, $filter, $http, $modal, $db, str) {
var api = $db.getApi("Contacts");
$scope.current = {
user: 0,
... |
// eslint-disable-next-line strict
'use strict';
const images = require('images');
images('./WechatIMG6.jpeg').save('w.jpeg', { quality: 50 });
|
import RoleRoute from './Role';
import UserRoute from './User';
export { RoleRoute, UserRoute };
|
var express = require('express'),
router = express.Router(),
wall = require('../../controllers/wall/wall'),
pool = require('../../controllers/db_connection');
gf = require('../../controllers/commong_controllers/global_functions');
var passport = require('passport');
router.get('/',gf.authenticationMi... |
define(function(require, exports, module) {
var global = require('../../lib/global/global');
var request = require('../../lib/http/request');
var bodyParse = require('../../lib/http/bodyParse');
var template = require('../../lib/template/template');
var monsary = require('../../lib/plugin/dom/monsary');
... |
module.exports = (req, res, next) => {
if (req.method == 'POST' || req.method === 'PUT') {
let data = '';
req.on('data', chunk => {
data += chunk;
});
req.on('end', () => {
try {
req.body = JSON.parse(data);
} catch (error) {
... |
// Створіть клас Планета.
// Конструктор класу повинен приймати назву та діаметр планети, а також викликати метод класу для
// підрахунку об'єму планети (припустимо, що планета це сфера).
// Також клас повинен мати метод, що виводить в консоль назву планети та її об'єм.
// Приклад: Планета *** має об'єм *** .
// Створи... |
/* BENEFICIARY */
export const LEGAL_INDIVIDUAL= 'Personne morale';
export const PHYSICAL_INDIVIDUAL= 'Personne Physique';
export const NATURAL= 'Personel';
export const PHYSICAL= 'physique';
export const LEGAL= 'morale';
//ACCOUNTS CHARTS
export const EARNING = 'earning_funds'
export const SPENDING = 'spending_funds'... |
var ops = 0;
db = connect("localhost:27017/dashboard")
prompt = function () {
let time = new Date();
return `${time.getHours()}:${time.getMinutes()}:${time.getSeconds()} ${db} ${++ops}$ `
} |
import { makeStyles } from '@material-ui/core/styles'
const tableToolBarStyled = makeStyles(theme => ({
root: {
background: '#fff',
borderBottom: '1px solid #e0e0e0',
minHeight: '8rem',
fontSize: '1.6rem',
paddingLeft: theme.spacing(2),
paddingRight: theme.spacing(2),
},
highlight:
t... |
const postRepo = require("../repositories/post-repo");
class PostService {
add(userId,post) {
return postRepo.save(userId, post);
}
getAll() {
return postRepo.findAll();
}
getById(id) {
return postRepo.findOne(id);
}
getByCargo(cargo) {
return postRepo.findByCargo(cargo);
}
getQt... |
require('dotenv').config();
const express = require('express'); // Express web server framework
const request = require('request'); // "Request" library
const cors = require('cors');
const bodyParser = require('body-parser');
const querystring = require('querystring');
const cookieParser = require('cookie-parser');
co... |
// =============================== Global Library Functions/Methods/Vars
// keep track of requests
var xhrs = {};
// flag indicating whether the reqs have been
// aborted on the beforunload/unload events
var unloaded = false;
/**
* @description [Aborts the provided http request object.]
* @param {Object} _ [The http... |
"use strict";
/** @module EquivalentJS/Manager/Module */
/**
* @interface
* @classdesc Module class interface representation
* @typedef {Object} EquivalentJS.Manager.Module.class
* @constructs
* @tutorial MODULE_MANAGER
* @see if the module class is initialized by DOM application
* the reference is appended t... |
'use strict';
const Koa = require('koa');
const app = new Koa();
const hbs = require('koa-hbs');
const serve = require('koa-static');
const logger = require('koa-logger');
const session = require('koa-session');
const send = require('koa-send');
const bodyparser = require('koa-bodyparser');
const soap = require('soap... |
import React, { Component } from 'react';
import Palette from './palette';
import Workspace from './workspace';
import './css/plan.css';
let testRug = {
type: 'rug',
x: 80,
y: 47,
width: 30,
height: 50,
fill: '#EEE'
}
let testLamp = {
type: 'lamp',
cx: 31,
cy: 53,
r: 30,
fill: '#AAA'
}
let test... |
import { Link, Img } from "gatsby"
import PropTypes from "prop-types"
import React from "react"
import { Grid, Box, Flex } from 'theme-ui'
import Logo from "../images/logo.png"
import Search_logo from "../images/search_logo.png"
function Header ({ menuLinks,siteTitle }) {
return(
<header
style={{
backgrou... |
import React from 'react';
import PropTypes from 'prop-types';
import {withRouter} from 'react-router-dom';
import classes from './index.module.css';
import {MDBAvatar, MDBRow} from 'mdbreact';
import ReplyContent from './content';
import ReplyFooter from './footer';
import {urlPrefix, generateHeaders, defaultAva, get}... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const outdoorFeaturesSchema = new Schema({
listingID: Schema.Types.ObjectId,
fencedYard: Boolean,
sprinklerSystem: Boolean,
firePit: Boolean,
pool: Boolean,
parking : String,
garage: String
});
module.exports = mongoose.... |
import React from "react"
import { connect } from 'react-redux'
import { voteAnecdote } from "../reducers/anecdoteReducer"
import { notificationVoteChange } from "../reducers/notificationReducer"
const AnecdoteList = (props) => {
const anecdotes = props.anecdotes
//console.log(anecdotes)
anecdotes.sort((a,... |
var express = require('express'),
xrpc = require('./static/scripts/connect-xmlrpc'),
app = express();
//app.configure(function () {
// app.use(xrpc.xmlRpc);
//});
app.post('/RPC', xrpc.route({
'calc.add': function (a, b, callback) {
callback(null, (a|0)+(b|0));
}
}));
app.listen(3000);
|
// $Id: ajax_vote_up_down.js,v 1.6.2.5 2009/01/29 19:44:05 lut4rp Exp $
/**
* Pre-processing for the vote database object creation.
*/
Drupal.behaviors.voteUpDownAutoAttach = function () {
var vdb = [];
$('span.vote-up-inact, span.vote-down-inact, span.vote-up-act, span.vote-down-act').each(function () {
// ... |
const MongoClient = require('mongodb').MongoClient;
const uri = `mongodb+srv://david:${process.env.DB_PASS}@cluster0-2jplm.gcp.mongodb.net/test?retryWrites=true`;
const client = new MongoClient(uri, { useNewUrlParser: true });
client.connect(err => {
if (err) {
console.log(err);
client.close();
... |
import articles from './articles'
import patients from './patients'
export default {
articles,
patients
}
|
var url = "https://www.google.com";
if(url.startsWith("https://") || url.startsWith("http://") && url.endsWith(".com"))
{
console.log("valid url")
}
else
{
console.log("invalid Url")
} |
import ModeButton from './ModeButton/ModeButton'
import './header.module.css'
import { FiPaperclip } from 'react-icons/fi';
import {DiGithubBadge} from 'react-icons/di'
export function Header({mode, setMode}) {
return (
<header>
<h2>CV Maker <FiPaperclip size = "25px"/></h2>
<M... |
(function () {
window.addEventListener("keydown", function (e) {
switch (e.keyCode) {
// Left
case 37:
LOGIC.snakeRunLeft();
break;
// Up
case 38:
LOGIC.snakeRunUp();
break;
// Right
... |
// Countries datas
const map= {
"Blog": {
"Link": "blog.html",
"Images": [
"img/machineLearning.jpeg"
]
},
"Travel": {
"Link": "travel.html",
"Images": [
"media/202003/88200724_214775729927376_7998703320516527320_n_17907107089422525.jpg"
]
},
"Trails": {
"Link": "t... |
// Jasmine Unit Testing Suite
// --------------------------
define(['sample'], function(App) {
describe("Basic Test Suite", function() {
it("contains a spec (test) with an expectation", function() {
expect(App.test()).toBe(true);
});
});
});
|
// Jquery Plugin
// Created - Gunjan Kothari
// Date - 24/04/2014
// Improved - Carlos Cortés
// Date - 30/12/2015
// Plugin to Draw a line between to elements
var _nodes = new Array();
(function($) {
$.fn.connect = function(param) {
var _canvas;
var _ctx;
var _me = this;
var _parent = param || document;
... |
var port = 8123,
http = require('http'),
url = require('url'),
fs = require('fs'),
io = require('socket.io').listen(port),
sys = require('sys'),
numClients = 0;
io.set('log level', 1);
io.sockets.on('connection', function(client){
client.on('messageupdate', function(message){
client.broadcast.emi... |
var defaultPlayersAmount = 2;
var amountOfPlayers = defaultPlayersAmount;
var allFields = new Array();
var tips = null;
$(function() {
tips = $('#tipsPlayerSettings');
/**
* dialog for the player settings
*/
$('#dialogPlayerSettings').dialog({
autoOpen : false,
height : 510,
width : 950,
modal : true... |
const express = require('express');
const app = express();
import { players, player, createPlayer } from './players-db.js';
const bodyParser = require('body-parser');
app.use(bodyParser.json()); // support json encoded bodies
app.get('/players', function (req, res) {
const p = players();
p.then(players => re... |
const request = require("request");
const SnipCart = function(auth) {
this.key = auth;
this.callApi = function(call, params = {}, method = "GET") {
return new Promise((fulfill, reject) => {
method = method.toUpperCase();
call = encodeURI(call);
if (method == "GET") {
let urlParams ... |
import Colors from '@Colors/colors'
import commonStyle from './style'
import { Dimensions } from 'react-native'
import { baselineDeltaForFonts } from './DefaultText'
import { border, sectionHeight } from '../util/StyleUtils'
import { isScreenSmall } from '../util/ScreenSizes'
const style = {
container: {
justifyCo... |
class Door {
constructor(room1, room2) {
this.room1 = room1;
this.room2 = room2;
}
isOpen() {
return this.isOpen;
}
open() {
if (!this.isOpen) {
this.isOpen = !isOpen;
}
}
initialize(room1, room2) {
this.room1 = room1;
this.room2 = room2;
}
}
module.exports = Door;... |
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import HomePage from './components/HomePage'
import SetState from './components/SetState'
import ReduxSection from './components/ReduxSection'
import ServerPage from './components/ServerPage'
const Test = ({ test }) => (
<div>
<h2... |
var searchData=
[
['nanocanvas',['NanoCanvas',['../class_nano_canvas.html',1,'']]],
['nanocanvas1',['NanoCanvas1',['../class_nano_canvas1.html',1,'']]],
['nanocanvas16',['NanoCanvas16',['../class_nano_canvas16.html',1,'']]],
['nanocanvas1_5f16',['NanoCanvas1_16',['../class_nano_canvas1__16.html',1,'']]],
['na... |
const superagent = require('superagent');
const _ = require('lodash');
const xmlParse = require("xml-parse");
const config = {
username: null,
password: null,
msisdn: null,
message: null,
timeout: 5000
}
function create(obj) {
const url = 'http://mysms.trueafrican.com/v1/api/esme/send';
... |
/**
* External dependencies
*/
import classNames from 'classnames';
/**
* Internal dependencies
*/
import GridGallery from './GridGallery.jsx';
class Grid extends React.Component {
constructor(props) {
super(props);
}
render() {
const {
blockGroupId,
className,
items, // from items
... |
import scrollNoThrottle from '~/scroll-event-no-throttle';
import scrollWithThrottle from '~/scroll-event-with-throttle';
import requestAnimationFrame from '~/request-animation-frame';
import reactScrollEvent from '~/react-scroll-event-no-throttle';
import reactScrollEventThrottle from '~/react-scroll-event-with-thrott... |
'use strict';
const webdocCli = require('..');
describe('webdoc-cli', () => {
it('needs tests');
});
|
const yargs = require('yargs');
const axios = require('axios');
const argv = yargs
.option({
a: {
demand: true,
alias: 'address',
describe: 'Address to fetch the weather for',
string: true,
default: 'orbit apartment zirakpur'
},
d:... |
(function(scope){
'use strict';
function F(arity, fun, wrapper) {
wrapper.a = arity;
wrapper.f = fun;
return wrapper;
}
function F2(fun) {
return F(2, fun, function(a) { return function(b) { return fun(a,b); }; })
}
function F3(fun) {
return F(3, fun, function(a) {
return function(b) { return function(c... |
import React from 'react';
import 'antd/dist/antd.css';
import "./StyleMenu.css";
import { Route, Link, Redirect } from 'react-router-dom';
import { Layout, Menu } from 'antd';
import { logOut } from "../Api/auth"
import useAuth from "../Hooks/useAuth";
export default function LayoutSistema(props) {
const { Header... |
export default [
[
{
label: "Query",
name: "query",
type: "text",
gridClass: "col s12 m5"
},
{
label: "Stars",
name: "stars",
type: "text",
gridClass: "col s12 m5 offset-m2"
}
],
[
{
label: "License",
name: "license",
type: "sel... |
var _mSiteName = 'Google Local';
var _mZoomIn = 'Zoom In';
var _mZoomOut = 'Zoom Out';
var _mZoomSet = 'Click to set zoom level';
var _mZoomDrag = 'Drag to zoom';
var _mPanWest = 'Go left';
var _mPanEast = 'Go right';
var _mPanNorth = 'Go up';
var _mPanSouth = 'ÏòÏÂ';
var _mLastResult = 'Return to the last res... |
import axios from 'axios';
import { BASE_URL } from '../config';
const baseURL = 'https://sindelantal-backend.herokuapp.com/';
const api = axios.create({
baseURL,
headers: {
'Cache-Control': 'no-cache'
},
timeout: 20000
});
const createUser = data => api.post('user/create', data);
const loginUser = data ... |
import React, { Component, PropTypes } from 'react'
import classname from 'classname'
import '../scss/Toggle.scss'
export default class Toggle extends Component {
static propTypes = {
children: PropTypes.node,
checked: PropTypes.bool,
onChange: PropTypes.func,
value: PropTypes.oneOfType([PropTypes.s... |
import axios from 'axios'
const request = axios.create({
baseURL: "https://conduit.productionready.io"
})
// 请求拦截器
// 相应拦截器
export default request
|
const { API_ROUTE } = process.env;
const { STATIC_ROUTE } = process.env;
module.exports = {
API_ROUTE,
STATIC_ROUTE,
};
|
import React, { useEffect } from 'react'
import { StyledHighScore } from './styles/StyledHighScore'
const NO_OF_HIGH_SCORES = 10;
const HIGH_SCORES = 'highScores';
const highScoreString = localStorage.getItem(HIGH_SCORES);
const highScores = JSON.parse(highScoreString) ?? [];
export function checkHi... |
var idToke = 0;
var contador = 0;
var id = 0;
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
// User is signed in.
console.log("si esta registrado")
console.log(user.displayName)
idToke = user.uid
console.log(idToke)
} else {
// No user is signed in.
c... |
import React from "react";
import { connect } from "react-redux";
import { openModal, SUCCESS, CHALLENGE } from "ducks/Modals";
import Button from "components/Button";
import "./style.css";
import successIcon from "images/successG.png";
import challengeIcon from "images/challengeG.png";
import arrow from "images/ArrowB... |
const express = require('express');
const loginRouter = express.Router();
const jwt = require('jsonwebtoken');
const Userdata = require('../model/Userdata');
adminemail='admin@gmail.com'
adminpassword='12345678'
loginRouter.post('/',(req,res)=>{
res.header("Access-Control-Allow-Orgin","*")
res.header('Access-... |
class Wall{
index(req,res){
get_posts(function(post_data){
var js = [
"js/admin/wall/admin_wall.js"
];
res.render('wall/wall',{
title:'Bulletin',user:req.session.passport.user,posts:post_data,template_js:js
});
});
}... |
export default 'global:effect'
|
import React from 'react';
import Header from './header/Header';
import {Route,Link,Switch} from 'react-router-dom';
require('../lib/showdown/showdown.js');
import Login from './login_regist/Login_register';
import Home from './home/Home';
import ArticleForm from './article/ArticleForm';
export default class Blog exte... |
/*
* @lc app=leetcode.cn id=554 lang=javascript
*
* [554] 砖墙
*/
// @lc code=start
/**
* @param {number[][]} wall
* @return {number}
*/
var leastBricks = function(wall) {
const cnt = new Map();
for (const widths of wall) {
const n = widths.length - 1;
let sum = 0;
for (let i = 0; ... |
import React from "react";
import {List, ListItem, ListItemIcon, Checkbox, ListItemText} from "@material-ui/core";
const StudentList = ({filteredStudents, onTogglePresence}) => {
return <>
{filteredStudents
? <List style={{ width: "90%" }}>
{filteredStudents.map(student => (
... |
WhatTheTabStatic.Log({
sender: "popup.bundle.js",
message: "Set popup javascript here."
}); |
$(document).ready(function(){
function getUrlParam(name){
//构造一个含有目标参数的正则表达式对象
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
//匹配目标参数
var r = window.location.search.substr(1).match(reg);
//返回参数值
if (r!=null) return unescape(r[2]);
return null;
}
/... |
/***************************************************************************
*
* Copyright (c) 2018 Baidu.com, Inc. All Rights Reserved
* $Id$
*
**************************************************************************/
/**
* @file Index.js
* @extend bun.$_appname
* react应用ssr demo
*/
class Action_Show_Exam... |
import HTML from '../img/HTML.png'
import CSS from '../img/CSS.png'
import Bootstrap from '../img/bootstrap.svg'
import Tailwind from '../img/Tailwind.png'
import JS from '../img/JS.png'
import react from '../img/React.png'
import redux from '../img/redux.svg'
import next from '../img/Next.png'
import firebase ... |
// Your app should not require any pre-requisites. It should
// run on any machine with latest LTS version of Node.
// Alternatively you can create a Docker image.
"use strict";
const express = require("express");
const app = express();
const jsonParser = require("body-parser").json;
const fs = require("fs");
const ... |
import { useState } from '@hookstate/core'
import store from '../store'
const NotCompleted = () => {
const { tasks } = useState(store)
const notCompletedTasks = tasks.get().filter(task => !task.completed)
const completeTask = task => {
const taskIndex = tasks.get().indexOf(task)
tasks.nested(taskIndex).... |
var blossom = {
main_size:0,
invert:function(aug_path,G){
for(let i = 0; i<aug_path.length/2; i++){
G[aug_path[2*i]].partner = aug_path[2*i+1];
G[aug_path[2*i+1]].partner = aug_path[2*i];
}
},
add_match_to_tree:function(G,v,w,wp){
G[w].mother = v;
G[wp].mother = w;
G[w].root = G[v]... |
/*
* Javascript genérico para carregar os modais: editar e adicionar.
*/
// Adicionar
$('.loadModalInsert').live('click', function(action, grid){
loadModalCotnent($(this));
$('#dialog').dialog({
title: $(this).attr('title'),
width: $(this).attr('width'),
height: $(this).attr('height'),
resizable: false,
... |
//============================hash前端路由
/*
* 夕空 flashme.cn 2020-4-19
//初始化
window.Router = new Router();
window.Router.init();
//方法
Router.route("/url", function, function);
Router.route(url地址, 触发函数, 退出函数);
1.填写"hash"将会监听每次地址变更的触发
2.添加地址层级关系
例:Router.routes['/home'].subset=['/sub1','/sub2']
/home的子地址有/su... |
/*******************************************************************************
*
* Copyright 2018 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* ... |
const db = require("../module/db")
const common = require("../module/common")
const md5 = require("md5")
module.exports.adminlogin = function (req, res) {
var password = md5(req.body.password + "@ele.com")
db.findOne("adminList", {
adminName: req.body.adminName,
password
}, function (err, a... |
import { models } from '../../models/'
let User = models.User
export const search = (req, res) => {
User.findAll().then(data => {
return res.status(200).json(data)
})
}
export const join = (req, res) => {
const data = req.body
let name = data.name
let ps = data.ps
User.create({
userName: name,
... |
/*Класс Animal*/
var Animal = function(name, isHungry){
/*Публичные свойства класа Animal*/
this.name = name || '';
this.isHungry = isHungry || false;
}
/*Методы прототипа*/
Animal.prototype.sound = function() {
alert("Я животное!");
}
/*Класс Cat*/
var Cat = function(name, isHungry){
Animal.apply(this, argument... |
import Select from './select.js';
const selectElement = document.querySelectorAll('[data-custom]');
selectElement.forEach((item) => {
const select = new Select(item);
select;
});
// test
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.