text stringlengths 7 3.69M |
|---|
[
{
"creatDate": "2018-09-07",
"id": "11035",
"image": "/d/file/fuli/pr/2018-09-07/d8db996d4b0c4077db0e2ae961728376.jpg",
"longTime": "00:03:40",
"title": "網紅少女私人玩物魅惑風情之就是要撩你",
"video": "https://play.cdmbo.com/20180906/fXZdSpIL/index.m3u8"
}
] |
var router = $.net.urlRouter();
module.exports = router;
var toolkit = require('../toolkit.js')();
router
.handle('', require('./_.js')(toolkit))
.handle('process', require('./process.js')(toolkit))
;
|
const assert = require('assert');
const ganache = require('ganache-cli');
const Web3 = require('web3');
const web3 = new Web3(ganache.provider());
const compiledHotOrNotFactory = require('../ethereum/build/HotOrNotFactory.json');
const compiledHotOrNot = require('../ethereum/build/HotOrNot.json');
const imageURL = 'ht... |
import React from 'react';
import * as model from '../model/Model.js';
import NewMeasurement from "./NewMeasurement";
import Measurement from "./Measurement";
import './Frame.css'
class Frame extends React.Component {
constructor(props){
super(props);
model.callbacks.push(this);
this.state ... |
$(document).ready(function() {
createSlideBlog();
createSlidePortfolio();
});
$('.rolagem').click(function(){
$('html,body').animate({scrollTop:$('#'+$(this).attr("data-href")).offset().top - 50}, 1200);
});
$("#btnFormContato").click(function() {
$("#formContato").submit();
console.log('ok');
});
fun... |
import mongoose from 'mongoose';
const Schema = mongoose.Schema;
const developerSchema = new Schema({
name: String,
link: String,
});
module.exports = mongoose.model('Developer', developerSchema);
// import mongoose from 'mongoose';
// export const Developer = mongoose.model('Developer', {
// name: {
// typ... |
// Library allows logging data to the local filesystem
// Constructor creates file if it does not exist
//
//
// detector object is the configuration model, an example is
//
// config.detector = {};
// config.detector.name = "Lloyd Wright";
// config.detector.description = "First three paddle detector.";
//... |
const etherlime = require('etherlime');
const CryptoColor = require('../build/CryptoColor.json');
describe('Crypto color contract', () => {
let accountZero;
let accountThree;
let deployer;
let deployerContractWrapper;
let cryptoColorContract;
beforeEach(async () => {
deployer = new etherlime.EtherlimeGanacheD... |
var searchData=
[
['deterministicexception',['DeterministicException',['../structfsml_1_1DeterministicException.html',1,'fsml']]]
];
|
/**File created beautifully by Praful Prasad */
chrome.runtime.onMessage.addListener(function(request,sender,callback){
console.log("received requestttt",request);
chrome.downloads.download({url: request.url,filename:request.name});
})
|
import React, { useEffect, useState, useContext } from "react";
import {
Accordion,
AccordionItem,
AccordionItemHeading,
AccordionItemButton,
AccordionItemPanel
} from "react-accessible-accordion";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import ContextInventory from "../ContextInvent... |
import React, { Component } from 'react';
import { Popover, PopoverBody } from 'reactstrap';
import PropTypes from 'prop-types';
import EditListForm from './EditListForm';
import './styles/ListHeader.css';
class ListHeader extends Component {
state = { showPopover: false, editListClicked: false };
toggleClick = ... |
'use strict';
const path = require('path');
const fs = require('fs');
const tmp = require('tmp');
const _ = require('lodash');
const Util = require('../util');
class Builder {
constructor(deployment) {
this.deployment = deployment;
}
get workdir() {
return path.resolve(path.join(__dirname, '..', '..',... |
import React from 'react';
import './styles/PageHeader.css';
const PageHeader = (props) => {
return (
<div className='PageHeader'>
<h2>Occupation Overview</h2>
<h5>{props.occupationTitle} in {props.msa}</h5>
</div>
)
};
export default PageHeader; |
import React, { Component } from "react";
import Todos from "./Components/todoList/todos.jsx";
import AddToDo from "./Components/addTodo/addToDo.jsx";
import Heading from "./Components/heading/heading.jsx";
import "./App.scss";
class App extends Component {
constructor(props) {
super(props);
this.state = {
... |
var rotation = 0;
var timeout;
(function() {
var divs = document.getElementsByClassName('rotation');
var mouseover = function()
{
var el = this;
rotate(el);
}
for (var i = 0; i < divs.length; i++) {
divs[i].addEventListener('click', mouseover, true);
}
})();
function rotate(element)
{
if(rotation==360)... |
controllers
.controller('loginController', function ($state, $cordovaBarcodeScanner, LoopBackAuth, Account, AccountManager, PushNotificationService, User) {
console.log('loginController started');
var vm = this;
vm.data = {};
if(AccountManager.isAuthenticated()){
return ... |
export const CALENDAR = [
{
id: 0,
title: 'Calendar Title',
description: 'Calendar Details',
featured: true
}
] |
import React from 'react'
const Section = (props) => {
const section = props.section
return (
<div className="section">
<p className="section__text">{section}</p>
<button
className="button"
onClick={() => {
props.handleBeginSection(section)
}}>
Begin
</button>
</div>
)
}
expor... |
import React, { Component } from "react";
import { connect } from "react-redux";
import { Route, Redirect } from "react-router-dom";
import './Moviedetails.css';
class Moviedetails extends Component {
constructor(){
super()
this.state={
redirect: false
}
}
toggle = () =... |
import React from 'react';
import * as firebase from "firebase/app";
import "firebase/auth";
import firebaseConfig from "./firebaseConfig";
import { useState } from "react";
import { createContext } from 'react';
import { useContext } from 'react';
import { useEffect } from 'react';
firebase.initializeApp(firebase... |
// Breadcrumb component
class Breadcrumb extends React.Component {
render() {
return (
<div className="row">
<nav className="breadcrumb night-full-width">
{this.props.crumbs.map(function(crumb) {
if (crumb.url) {
return (
<a key={'bca' + crumb.name... |
console.log('Задание 5. Площадь круга.');
var r = 5,
p = 3.14;
var SKruga = p * (r * r) + ' ' + 'кв.см.';
console.log('Ответ: ' + SKruga);
console.log('');
|
const _ = require("lodash");
const fs = require("fs");
const path = require("path");
const stringCaseUtil = require("./string_utils");
/**
* 映射dir下的文件内容归档成一个js对象
* @param dir 当前路径
* @param alias 文件别名 值码对
* @returns {}
*/
const mappingFiles2Obj = dir => {
const tree = {};
// 获得当前文件夹下的所有的文件夹和文件
const [dirs, f... |
import axios from "axios";
const serverApi = "http://localhost:5002/api";
export const getRoomExists = async (roomId) => {
const response = await axios.get(`${serverApi}/room-exists/${roomId}`);
return response.data;
}
|
import express from 'express';
import cors from 'cors';
import bodyParser from 'body-parser';
import { defaultState } from './defaultState';
let port = 7777;
let app = express();
const authorizationTokens = [];
app.use(
cors(),
bodyParser.urlencoded({ extended: true }),
bodyParser.json()
);
app.get('/us... |
/*
test.js - test script
The MIT License (MIT)
Copyright (c) 2015-2016 Dale Schumacher
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 righ... |
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { Link } from 'react-router-dom'
import { singleProduct, addReview, removeReview } from '../../actions/product'
import Loader from '../../components/Loader'
import Message from '../../components/Message'
co... |
// "use strict" tells the browser to enforce some rules about what can be in our JavaScript.
"use strict";
let my_name = "Bonnie";
let your_name = "Kyle";
if (my_name === "Ben") {
renderOutput("That's Ben!");
} else if (my_name === "Bonnie") {
renderOutput("Yep, that's me!");
}
else {
renderOutput("I must be som... |
/* eslint no-console:0 */
const path = require('path');
const chalk = require('chalk');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
const ScriptExtHtmlWebpackPlugin = re... |
importApi("ui");
importApi("nav");
importClass("com.efurture.glue.ui.XmlViewLoadListener")
importClass("android.widget.BaseAdapter");
importClass("com.efurture.gule.hybrid.adapter.StickyRecycleAdapter");
importClass("com.efurture.gule.hybrid.adapter.RecycleAdapter");
importClass("android.widget.PopupWindow");
importCla... |
export {
ThemeProvider,
Block,
Section,
Header,
Footer,
Button,
Input,
Label,
SelectNative,
MultiselectNative,
Textarea,
Toggle,
Checkbox,
Radio,
FlexRow,
FlexColumn,
Area,
Areas,
Column,
Columns,
Grid,
Halves,
Thirds,
Link,
LinkEmail,
LinkPhone,
ListItem,
LI,
L... |
define(
[
'zepto'
],
function ($) {
var ajax = $.ajax;
$.extend($, {
isBlank: function (val) {
return (val == null || val == "" || val == 'undefined');
},
getQueryString: function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).m... |
class body{
constructor(_x,_y){
this.x=_x;
this.y=_y;
}
draw(){
rect(this.x*blockSize,this.y*blockSize,blockSize-1,blockSize-1);
}
};
|
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
module.exports = {
original: 'out of the scope',
}
|
console.log("Is 42 an Integer: " + Number.isInteger(42));
console.log(`Is 3.43 an Integer: ${Number.isInteger(3.43)}`);
|
import React from 'react';
const Footer = () => {
return (
<footer>
<p>Telkom Digital Incubator © 2019, PT.Telkom Indonesia</p>
</footer>
);
};
export default Footer;
|
const router = require("express").Router()
const storage = require("../libs/storage")
const fileupload = require("express-fileupload")
router.use(fileupload())
router.get("/upload", (req, res)=>{
res.sendFile(__dirname + "/plantillaSubida.html")
})
router.post("/upload", (req, res)=> {
if(!req.files || Obje... |
import './AboutMe.css';
function AboutMe () {
return (
<div className='AboutMe'>
<body className='aboutMe-body'>
<main className='aboutMe-main'>
<h1> About Me </h1>
</main>
<p> Hello, my name is Veronica. I am a 2nd year CS major. I am a big fan of sweets, tea, hikes, birds, embroidery, movies, game... |
// main.js
// Modules to control application life and create native browser window
const { app, BrowserWindow, ipcMain, dialog, shell, Menu } = require('electron')
const path = require('path')
let mainWindow
const template = [
{
label: 'DB',
submenu: [
{
label: 'Change Database'
}
]
... |
import Chart from 'chart.js';
import { isEqual, round } from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import injectStyles from '@/utils/injectStyles';
import { COLORS } from '@/utils/styleConstants';
import styles from './styles';
class BarChart extends Component {
co... |
const QrcodeTerminal = require('qrcode-terminal');
const { ScanStatus } = require('wechaty-puppet')
/**
* @method onScan 当机器人需要扫码登陆的时候会触发这个事件。 建议你安装 qrcode-terminal(运行 npm install qrcode-terminal) 这个包,这样你可以在命令行中直接看到二维码。
* @param {*} qrcode
* @param {*} status
*/
const onScan = async (qrcode, status) => {
try... |
import React, { useState, useEffect } from 'react';
import Form from './components/PhonebookForm';
import ContactList from './components/ContactList';
import Filter from './components/Filter';
import PropTypes from 'prop-types';
import { wrapper, title, subtitle } from './App.module.scss';
const App = ({ initialValue ... |
var defaultState = {
latitude:'',
longitude:''
}
const userLocationReducer = (state = defaultState,action)=>{
switch(action.type){
case 'SET_CURRENT_LOCATION':
return {
latitude:action.latitude,
longitude:action.longitude
};
default:
return s... |
/*
Given a string, find the length of the longest substring in it with no more than K distinct characters.
Input: String="araaci", K=2
Output: 4
Explanation: The longest substring with no more than '2' distinct characters is "araa".
Input: String="araaci", K=1
Output: 2
Explanation: The l... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import InputGroup from "./InputGroup";
export default class Input extends Component {
componentDidUpdate() {
this.adjustTextareaHeight(this.component);
}
componentDidMount() {
this.adjustTextareaHeight(this.component);
if... |
const express = require('express');
const app = express();
const http = require('http').createServer(app);
const cors = require('cors');
const io = require('socket.io')(http,{
cors:{
origin:'http://localhost:3000',
methods:['GET','POST'],
}
})
app.use(cors());
require('./sockets/index')(io);
... |
'use strict';
describe('Service: BatchData', function () {
// load the service's module
beforeEach(module('batchUtilApp'));
// instantiate service
var BatchData;
beforeEach(inject(function (_BatchData_) {
BatchData = _BatchData_;
}));
/*it('should do something', function () {
expect(!!BatchDat... |
import Markdown from 'pagedown-with-extra-bootstrap/pagedown.js';
import hljs from 'highlightjs/highlight.pack.js'
export default function initiate_editor(){
$('textarea.wmd-input').each(function(i, input) {
var attr, converter, editor;
attr = $(input).attr('id').split('wmd-input')[1];
converter = new Ma... |
export default function reducer(state, action) {
switch (action.type) {
case 'PhoneInputAction':
return {
...state,
phone_no: action.payload
};
case 'passwordInputAction':
return {
...state,
password: action.payload
};
case 'GET_DATA':
return {
...state,
userType: action.pa... |
/**
* @Author - Mochamad Yudi Sobari
* @contact - [email protected]
* @version - 0.0.1
* @type - Development
*/
const express = require("express");
const router = express.Router();
const { check, validationResult } = require("express-validator");
/**
* @Access - Private
* @Method - POST
* @define - Crea... |
exports.createPages = async function ({ actions, graphql }) {
const { data } = await graphql(`
query {
allMdx {
edges {
node {
frontmatter {
published
slug
}
}
}
}
}
`);
data.allMdx.edges.forEach((edge) =>... |
const knexService = require('feathers-knex')
const { fastJoin, discard, disallow } = require('feathers-hooks-common')
module.exports = function () {
const app = this;
const db = app.get('db')
const web3 = app.get('web3')
const paginate = app.get('paginate')
const options = {
id: 'eth_address',
na... |
const express = require('express');
const Api = require('./my_utils/api');
const dbModel = require('./my_utils/dbModel');
const app = express();
const port = 3000;
var bodyParser = require('body-parser')
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
app.use(bodyParser.json());
app.get('... |
import { createSelector } from 'reselect';
export const getApplication = state => state.application;
export const getSurveys = createSelector(
getApplication,
application => application.surveys
);
export const getSelectedSurvey = createSelector(
getApplication,
application => application.selectedSurvey
);
|
import React from 'react';
import { Link } from 'react-router-dom';
import Like from '../containers/Like'
import '../css/userCard.css'
export default class UserCard extends React.Component {
render() {
const { avatar, username, popularity } = this.props.user.member;
const urlProfile = '/members/'+u... |
/**
* The module ‘hujirequestparser’ which exposes one method:
* parse(string) return HttpRequest object.
*/
var httpobj = require('./httpobj');
/*
* Read the rest of the line in a string, starting from a given index.
* Note that it does no checks - assumes validity of the string,
* assumes string.length > sta... |
$(document).ready(() => {
console.log(localStorage.getItem('testObject'));
document.getElementById("result").innerHTML =localStorage.getItem('testObject');
document.getElementById("result").style.color="white";
$.get('/api/transactions/propPending',function(res){
console.log("pro... |
str = "2+5*2+4";
function express(str) {
let stack = [];
let temp = 0;
let val;
for (let i = 0; i < str.length; i++) {
if (!isNaN(str[i])) {
stack.push(str[i]);
}
if (str[i] == "*") {
let pop = stack.pop(str[i]);
//console.log(pop)
let current = stack.pop();
//conso... |
console.log('loaded');
document.addEventListener("DOMContentLoaded", function(event) {
console.log('DOMContentLoaded');
document.querySelector('#b')
.addEventListener('click', e => {
console.log('posting');
fetch('api/run',{
method: 'post',
headers: {
... |
const path = require("path");
const webpack = require("webpack");
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); //清除
const vendor = [
"vue-router/dist/vue-router.esm.js",
"vuex/dist/vuex.esm.js",
"axios",
"nprogress",
"element-ui",
"vue-schart"
];
var groupVendor = {};
let nu... |
// Copyright 2020 Google LLC
//
// Licensed 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 of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
var express = require('express');
var router = express.Router();
// var connection = require("../../enregistrement/bd/connection")
/* GET home page. */
router.get('/', function (req, res, next) {
res.render('index', { title: 'Express', host: req.hostname });
});
router.get('/parrainage', function (req, res, next) ... |
import React, { Component } from 'react';
import { AuthService, GameService } from '../../service';
import Game from './singleGame';
class Games extends Component {
constructor(props) {
super(props);
console.log(this.props.display)
if (props.display === 'dev') {
this.loadGames = this.loadDevGames;
... |
import Async from 'async'
import Info from './info'
import Stats from './stats'
import Moment from 'moment'
import Badges from './badges'
import Quests from './quests'
import Effects from './effects'
import Visits from './roomvisits'
import Clothing from './clothing'
import Searches from './searches'
import... |
import React from "react";
import MovieHeader from "../headerMovie";
import Grid from "@material-ui/core/Grid";
import { makeStyles } from "@material-ui/core/styles";
import GridList from "@material-ui/core/GridList";
import GridListTile from "@material-ui/core/GridListTile";
import { getMovieImages } from "../../api/t... |
import React from 'react'
class Base extends React.Component {
render(){
return <cite>Soy un componente base...</cite>
}
}
export default Base
|
import React, {useState, useEffect} from 'react';
import ExpandLessIcon from '@material-ui/icons/ExpandLess';
import { useWindowScroll } from 'react-use';
const ScrollToTop = () => {
const {y : pageYOffset} = useWindowScroll();
const [visible, setVisible] = useState(false);
useEffect(() => {
... |
// Eventクラス
// --------------
function EveEve() {
this.cbs = [];
}
_.extend(EveEve.prototype, {
on: function(ev, cb) {
var self = this;
var evs = ev.split(' ');
for (var i = 0; i < evs.length; i++) {
var name = evs[i];
if (!self.cbs[name]) self.cbs[name] = [];
self.cbs[name].push(cb... |
//IN ES6 THERE 2 WAYS TO DECLARE A VARIABLE - let AND const
//ES5
var name5 = 'Kunal'
name5 = 'hello' //can be changed
console.log(name5)
//ES6
let name6 = 'Tony'
const age = 23 // CAN'T BE CHANGED ,. CAN BE DECLARED ONLY ONCE
name6 = 'bye' //IT CAN BE CHANGED ALSO
//-----age = 20 // IT **CANNOT**... |
$('input[name=service]').click(function(){
//Get the label element that comes immediately after this radio button
var label = $(this).next();
//From the label element extract the inner HTML
var service = label.html();
//Place info in the display
if (service==morning)
{
... |
// soal 1
// const person = {
// name: "person A",
// age: 100,
// favDrinks: [
// "coffee",
// "jamu temulawak",
// "tea"
// ],
// greeting: function() {
// console.log("hello world")
// }
// }
// /// EDIT HERE
// function
// /// STOP
// console.log(person.name);
// c... |
import conButton from './src/conButton';
conButton.install = function(Vue) {
Vue.component(conButton.name, conButton);
};
export default conButton; |
class State {
constructor() {
if (this.constructor === State) {
throw new TypeError('Abstract class cannot be instantiated directly.');
}
}
on_enter() {
throw new TypeError('Class missing method from extended abstract class.');
}
on_exit() {
thr... |
export default {
namespaced: true,
state: {
userId: null,
name: '',
orgId:'',
headImage:'',
titles:'',
},
mutations: {
updateId (state, id) {
state.userId = id
},
updateName (state, name) {
state.name = name
},
updateOrgId(state,orgId){
state.orgId = or... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import './index.css';
import App from './components/App';
import registerServiceWorker from './registerServiceWorker';
import setUpStore from './set-up-store';
import { load_contacts } from './actions/contact-actions';
... |
"use strict";
//
// back.js
//
// Created by Alezia Kurdis, May 2nd, 2021.
// Copyright 2021 Vircadia and contributors.
//
// 3d portals to go back.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
(function(){
... |
app.controller('aregister',['$scope','$localStorage','$http',function($scope,$localStorage,$http){
$scope.names=[{value:"admin"}];
//$scope.position=[{value:"Teaching"},{value:"Non-teaching"}];
$scope.college=[{value:"K.S.Rangasamy College of Technology"}];
$scope.status=[{value:"active"},{value:"inactive"}];
$sco... |
/**
* Created by MACHENIKE on 2017/2/19.
*/
import * as types from '../actionTypes.js'
import api from '../../api/api'
const allActions = {
getProduct(){
return dispatch =>{
api.getProducts().then(function(res){
console.log(res)
dispatch({
... |
import { setTimeout } from "node:timers/promises";
import got from "got";
export const SOURCE = {
RUCAPTCHA: "RUCAPTCHA",
ANTIGATE: "ANTIGATE",
CAPTCHA24: "CAPTCHA24",
};
const _SOURCE = {
[SOURCE.RUCAPTCHA]: {
baseUrl: "http://rucaptcha.com",
soft_id: 768,
},
[SOURCE.ANTIGATE]: {
baseUrl: "ht... |
import wx from 'weixin-js-sdk';
export function setWechatConfig(options) {
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: options.appId, // 必填,公众号的唯一标识
timestamp: options.timestamp, // 必填,生成签名的时间戳
nonceStr: options.non... |
'use strict';
const fs = require('fs');
const path = require('path')
const webpack = require('webpack')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require(... |
const int = require('./int');
module.exports = input => {
let instructions = input.split(',').map(Number);
for (let noun = 0; noun <= 99; noun++) {
for (let verb = 0; verb <= 99; verb++) {
instructions[1] = noun;
instructions[2] = verb;
if (int(instructions)[0] == 19690720) {
return... |
// Code Goes Here
import React from "react";
import Order from "./components/order";
|
import Map from './Map'
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { getEvents } from '../actions/events'
import { connect } from 'react-redux';
class MapWrapper extends Component {
state = {
isMarkerShown: false,
}
componentDidMount() {
this.delayedShow... |
import React, { Component } from 'react';
import { createStore, applyMiddleware, combineReducers } from 'redux';
import { Provider, connect } from 'react-redux';
import thunk from 'redux-thunk';
import { Scene, Router } from 'react-native-router-flux';
import * as reducers from '../reducers';
import Main from './main'... |
const peterEmails = "[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]";
function sendEmailTo(recepient) {
console.log('email sent to ' + recepient);
}
let emailArray = peterEmails.split("|");
for (i=0; i<emailArray.length; i++) {
sendEmailT... |
$('.m-chat__main .edit-msg').on('click', function(e) {
e.preventDefault();
$(this).parent().children('.edit-wrapper').toggleClass('closed');
});
$('.m-chat__current').hide();
$('.edit-wrapper .delete').on('click', function() {
$(this).parent().parent().toggleClass('closed');
$(this).parent().parent().... |
require('dotenv').config();
const express = require('express');
const cors = require('cors');
const { dbConnection } = require('../database/config');
const fileUpload = require('express-fileupload');
class Server{
constructor(){
this.app = express();
this.port = process.env.PORT;
this.paths ... |
const level = require('level');
class LevelProvider {
constructor({ path }) {
this.client = level(path, { valueEncoding: 'json' });
}
store(key, value) {
return this.client.put(key, value);
}
get(key) {
return this.client.get(key);
}
delete(key) {
return this.client.del(key);
}
}
mo... |
const mongoose = require('mongoose');
const connectionString = process.env.MONGODB_URI || "mongodb://localhost:27017/task-bite"
const configOptions = {
useNewUrlParser: true,
useCreateIndex: true,
useUnifiedTopology: true,
useFindAndModify: false,
};
mongoose.connect(connectionString, configOptions)
.then(... |
const express = require('express')
const app = express()
const port = 3000
const mongoose = require('mongoose')
const path = require('path')
const UserSchema = new mongoose.Schema({
nameCard: {type:String, required:true},
breedCard: {type:String, required:true},
levelCard: {type:Number, required:true},
... |
import OtpInputs from './OtpInputs';
export { OtpInputs }; |
$(document).ready(function () {
$(document).on('click', 'a[href^="#"]', function(e) {
e.preventDefault();
$('html, body').animate({
scrollTop: $($.attr(this, 'href')).offset().top - 100
}, 500);
});
$('h2.-with-toggle').click(function () {
$(this).toggleClass('-collapsed');
$(this).... |
import React from 'react'
import styled from 'styled-components'
const TitleContainer = styled.div`
height: 100vh;
width: 100vw;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: ${({ theme }) => theme.colors.dark};
`
const Title = styled.h1`
font-s... |
const test = require('tape');
const isNull = require('./isNull.js');
test('Testing isNull', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof isNull === 'function', 'isNull is a Function');
t.equal(isNull(null), true, "passed argu... |
var Geometry = require("../geometry");
var Vector = Geometry.Vector;
var Attributes = require("../attribute");
var Component = require("../component");
var General = require("../general");
var EventHandler = require("../handlers/eventhandler");
var init = function(life) {
life.attribute_table.set_base_value(Attrib... |
/**
* Created by Waruwu on 04/04/2017.
*/
$(function() {
$('.form-addproduct form').form({
name : {
identifier : 'name',
rules: [
{
type: 'empty',
prompt: 'Nama tidak boleh kosong'
}
]
},... |
//正文第一部分图片滑动特效
$(function(){
var zong1= $('#bao1 .pic').size();
var dx1=0;
var dy1=zong1-4;
$("#lhua1").click(function(){
if (dx1 < 1)
{
alert("已经是左边最后一页");
return;
}
dx1--;
dy1++;
$("#bao1").animate({left:'+=300px'}, 1000);
});
$("#rhua1").click(function(){
if (dy1< 1){
alert("已经是右边最后一页... |
var firebase = require('firebase');
require('firebase/auth');
require('firebase/firestore');
var db = require('../routes/firebase'); //get reference to firebase config file
var database = firebase.firestore(db.app); //declare database using app initialization in firebase.js
const stripe = require('stripe')('sk_test_l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.