text stringlengths 7 3.69M |
|---|
import React from 'react';
import SelectDifficulty from './SelectDifficulty.jsx';
const App = () => {
return(
<div>
<SelectDifficulty />
</div>
)
};
export default App; |
(function(){
angular
.module('linguine.documentation', ['ui.router'])
.config(config);
function config($stateProvider){
$stateProvider
.state('linguine.documentation', {
url: '/documentation',
abstract: true,
template: '<div ui-view />'
})
.state('linguine.doc... |
var searchData=
[
['engine_5falgdesc',['Engine_AlgDesc',['../struct_engine___alg_desc.html',1,'']]],
['engine_5falginfo',['Engine_AlgInfo',['../struct_engine___alg_info.html',1,'']]],
['engine_5falginfo2',['Engine_AlgInfo2',['../struct_engine___alg_info2.html',1,'']]],
['engine_5fattrs',['Engine_Attrs',['../str... |
const firebaseConfig = {
apiKey: "AIzaSyApVRh5Uz9BtABcNACC0XYsmY_9uE1KvA0",
authDomain: "emah-john-easy.firebaseapp.com",
databaseURL: "https://emah-john-easy.firebaseio.com",
projectId: "emah-john-easy",
storageBucket: "emah-john-easy.appspot.com",
messagingSenderId: "131347695943",
appId: ... |
/**
* Module dependencies.
*/
var passport = require('passport-strategy')
, util = require('util');
/**
* `BasicStrategy` constructor.
*
* The HTTP Basic authentication strategy authenticates requests based on
* userid and password credentials contained in the `Authorization` header
* field.
*
* Applicatio... |
import React from 'react';
import classes from './Entries.module.css';
import Meal from './Meal/Meal';
const Entries = ({entryData, handleEditClick, handleDeleteClick}) => {
return (
<div className={classes.container}>
{entryData.map((m, i) =>
<Meal
key={i}... |
import React,{Component} from 'react';
import Menu from '@material-ui/core/Menu';
//Components
import RctDropdownItem from './RctDropdownItem';
class RctDropdownMenu extends Component {
state = {
anchorEl: null,
};
handleClick = event => {
this.setState({ anchorEl: event.currentTarget });
};
... |
// Version 1.0.1
// Permitted deviation in Minkowski dot product for input points
const MDP_INPUT_TOLERANCE = 1e-9;
/* Given a string `text` that is a JSON encoding of an Array of points with the
* specified number of coordinates, (themselves Arrays), return the decoding,
* raising informative exceptions if this fa... |
/**
* Created by griga on 11/30/15.
*/
import React from 'react'
import axios from 'axios'
import {SubmissionError} from 'redux-form'
import {connect} from 'react-redux'
import moment from 'moment'
import Loader, {Visibility as LoaderVisibility} from '../../../../components/Loader/Loader'
import WidgetGrid from '... |
<!--
function SetFontStyle(obj, StyleName) //Bold,Italic,Underline,StrikeThrough...
{
var m_objTextRange = obj.document.selection.createRange();
m_objTextRange.execCommand(StyleName);
}
function SetFontName(obj, FontName)
{
var m_objTextRange = obj.document.selection.createRange();
m_objTextRange.execCom... |
export const getMarkas = async () =>{
const response = await fetch('http://34.72.0.144/api/v1.0/cars/markas/',{
method:'GET',
headers:{'Content-Type': 'application/json'}
})
const data = await response.json()
return data.allMarkas
} |
module.exports = function fromWhere(vrn) {
if (vrn.startsWith('CY')) {
return "Bellville";
} else if (vrn.startsWith('CJ')) {
return "Paarl";
} else if (vrn.startsWith('CA')) {
return "Cape Town";
} else {
return "Some other place!";
}
} |
import React from "react";
export const LineChartIcon = ({ className, style, width, onClick }) => {
return (
<svg
className={className || ""}
style={style || {}}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width={width || "24"}
onClick={onClick}
>
<path d=... |
import React from 'react';
import './Check.css';
import { Row, Col } from 'react-bootstrap';
import Sidebar_Advisor from "./Advisor/Sidebar_Advisor";
import {BlockCheck_Advisor} from "./Advisor/BlockCheck_Advisor";
function Check() {
return (
<Row className="content">
<Col> <Sidebar_Advisor /> <... |
var $pageAddForm = $("#pageAddForm");
var $formValidator;
var $font_element;
$(function () {
// 初始化验证器
initValidate();
$("#template").val("page");
$("#pageAddBtn").click(function () {
var name = $(this).attr("name");
// 同步ckeditor内容
var contents = pageEditor.getData();
$("#post... |
import AQIScaleTable from './AQIScaleTable';
import AQNotifications from './AQNotifications';
import ExperimentsDetails from './ExperimentsDetails';
import ExperimentsDateSelector from './ExperimentsDateSelector';
import FireMap from './FireMap';
import ForecastMap from './ForecastMap';
import ForecastPointDetails from... |
// set the dimensions and margins of the graph
var margin = {top: 20, right: 10, bottom: 20, left: 40},
width = 1200 - margin.left - margin.right,
height = 300 - margin.top - margin.bottom;
// set the ranges
var x = d3.scaleBand()
.range([0, width])
.padding(0.1);
var y = d3.scaleLinear()
... |
const redux = require('redux')
const combineReducers = redux.combineReducers
// 商品
const products = (state = {}, action) => {
return state
}
// おかいものカート
const cart = (state = [], action) => {
switch(action.type){
case 'ADD_PRODUCT':
return [...state, action.payload]
default:
return state
}
}... |
export { ReceiveFundsMobileFooter } from './receive-funds-mobile-footer';
|
import { createMessagesReducer, createMessage, createSelector } from 'redux-msg';
export const NAME = 'just-input';
export const MODEL = {
value: ''
};
export const reducer = createMessagesReducer(NAME)(MODEL);
export const message = createMessage(NAME);
export const select = createSelector(NAME)(MODEL);
export c... |
import React from 'react';
import "./Feed.css"
class Feed extends React.Component {
constructor(props){
super(props)
}
render() {
return (
<div class="parent-div-feed">
<div class="feed-div">
<div class="feed-input">
... |
describe('Programs list view', function() {
beforeEach(() => {
cy.visit('/en/programs/');
cy.injectAxe();
});
it('passes axe a11y checks', () => {
cy.contains('Programs')
cy.checkA11y();
});
});
|
import '@testing-library/jest-dom';
import { server } from './mocks/server';
class ResizeObserver {
disconnect() {}
observe() {}
unobserve() {}
}
window.ResizeObserver = ResizeObserver;
process.env.GATSBY_ADDSEARCH_API_KEY = 'shh-do-not-tell-to-anyone';
jest.mock('@ably/ui/src/core/utils/syntax-highlighter', ... |
import React, { useEffect, useState } from 'react';
import Sidebar from '../../Sidebar/Sidebar';
import OrderItem from './OrderItem/OrderItem';
const Orders = () => {
const [orders, setOrders] = useState([]);
useEffect(() => {
fetch('https://insurance-agency-server.herokuapp.com/orders')
.t... |
$(function(){
//轮播图
picShow(picInfo);
});
var picInfo=[{
"img":"images/bg1.jpg",
"title":"CHINA IMPORTED FRUITS MARKET PRICE",
"url":"",
"detail":"Guidance Before Quoting",
"buttonInfo":"Read More"
},{
"img":"images/bg2.jpg",
"title":"Global Fruits Arrival Data ",
"url":"",
"detail":"Gu... |
var express= require("express");
var app = express();
var restRouter = require("./routes/rest.js");
var mongoose = require("mongoose");
var config = require("./config.js");
var server = require('http').Server(app);
var io = require('socket.io')(server);
mongoose.connect(config.path);
app.use(function(req, res, next) ... |
const { createTask } = require("./utils");
// -------------------------------------------------------------------------------------
const { fillPayNewForm, openSettings } = require("./functions/pay.google.com");
const {
addNewAdsAccount,
selectAdsAccountToWorkWith,
createAdsAccountInExpertMode,
setupBi... |
var eeModal = (function (eeUtil) {
var body, modal;
var methods = {
open: open
};
function open(tpl) {
body = document.getElementsByTagName('BODY')[0];
if (modal) {
return modal;
}
modal = new Modal(tpl);
return modal;
}
var Modal = ... |
export * from './modular' |
class Enemy extends Phaser.GameObjects.Sprite{
constructor(scene, x, y, texture, frame, index) {
super(scene, x, y, texture, frame);
scene.add.existing(this);
scene.physics.add.existing(this);
this.setOrigin(0.5, 1);
this.body.allowGravity = false;
this.body.setSize(... |
require('./server')
require('../app/main')
|
import { extend } from 'flarum/extend';
import app from 'flarum/app';
import Post from 'flarum/models/Post';
import Model from 'flarum/Model';
import NotificationGrid from 'flarum/components/NotificationGrid';
import addReactionAction from 'datitisev/reactions/addReactionAction';
import PostReactedNotification from 'd... |
import React from 'react';
import "./WhiteboardMastDetails.css";
const WhiteboardMastDetails = () => {
return (
<div className="row">
<img className="col-4 wbmastimg" src={require("../../img/poster.gif")} alt={"pm"}/>
<h2 className="col-8 wbmasthdr">THE WHITEBOA... |
#!/usr/bin/node
const args = process.argv;
if (isNaN(args[2])) {
console.log(1);
} else {
console.log(factorial(args[2]));
}
function factorial (num) {
if (num === 0) {
return (1);
} else {
return (num * factorial(num - 1));
}
}
|
$(document).ready(function () {
var tabInfoCompte;
//Permet de get les infos du compte en BDD
$.ajax({
type: "POST", // methode de transmission des données au fichier php
url: "php/getInfosCompte.php", // url du fichier php
success: function (msg) {
tabInfoCompte = jQuery... |
var express = require('express')
var app = express()
app.use(express.static('public'))
app.listen(80, function () {
console.log('Now listening on port 80')
}) |
new (function() {
var ext = this;
function getVocative(name, callback){
console.log("vocative from",name);
$.ajax({
url: 'https://nlp.fi.muni.cz/projekty/declension/names/process.py?np='+name+'&output=json',
dataType: 'json',
success: function(data){
... |
import React, { Component } from 'react'
import {Row,Col } from 'react-bootstrap';
import Ownericon from './images/ownericon.png';
export class ownerdetails extends Component {
render() {
return (
<div className="text img-thumbnail thumbnailnext" id="ca9c4a">
<h4>Hima... |
const initialState = {
todoID: 0,
todos:[]
};
export default (state = initialState, action) => {
const { todos, todoID } = state;
const { type, payload } = action;
switch (type) {
case 'ADD_TODO': {
return {...state, todoID:todoID+1, todos:[{ id: (todoID + 1), text: payload }, ...todos]};
}
... |
const jwt = require('jsonwebtoken');
// const jwtDecode = require('jwt-decode');
const UserConstants = require('../services/util.service').UserConstants;
function verifyToken(_token){
// console.log(_token)
let validToken = false;
let decoded="Nothing";
try{
const isValid = jwt.verify(_token,Us... |
const CONTACTS = 'contacts';
const MY_WALLETS = 'my-wallets';
const RECEIVE_FUNDS = 'receive-funds';
const SEND_FUNDS = 'send-funds';
export const ROUTES = {
CONTACTS,
MY_WALLETS,
RECEIVE_FUNDS,
SEND_FUNDS,
};
|
var config = {
apiKey: "AIzaSyCFdh7BeiKB9Gzgsv5XwgJoecodrCqPJAU",
authDomain: "train-e4dfb.firebaseapp.com",
databaseURL: "https://train-e4dfb.firebaseio.com",
projectId: "train-e4dfb",
storageBucket: "",
messagingSenderId: "550458782796"
};
firebase.initializeApp(config);
// Create a variable ... |
const EventEmitter = require("events");
class Emitter extends EventEmitter{
}
let emitter = new Emitter();
/*
emitter.on("test",()=>{
console.log("hello");
})
*/
emitter.on("test",(arg1,arg2)=>{
console.log(arg1,arg2);
})
emitter.emit("test","hello","world");
|
const CategoryModel = require('../models/category');
module.exports.createCategory = async (req, res) => {
if (req.body && req.userId) {
try {
const data = req.body;
data.userId = req.userId;
const doc = await CategoryModel.create(data);
if (doc) res.send({ m... |
var express = require('express');
var router = express.Router();
// router.get('/', function(req, res, next) {
// res.sendFile(__dirname + "/views/item.html");
// });
var test = "Test Object Name";
router.get('/item', function(req, res) {
console.log("item.js route used")
res.render(__dirname + '/views/... |
//config file for mongo
var config = {};
config.mongoURI = {
test: 'mongodb://localhost/travis-test',
development: 'mongodb://localhost/travis'
};
module.exports = config;
|
import React, { useState } from 'react';
import { Container, Button, Form } from 'react-bootstrap';
import axios from 'axios';
const ResetPassword = () => {
const [email, setEmail] = useState(null);
const handleSubmit = (event) => {
event.preventDefault();
const form = event.target;
axios
.get(`... |
'use strict';
angular.module('instangularApp').controller('MainCtrl', function ($scope) {
$scope.awesomeThings = [
'HTML5 Boilerplate',
'AngularJS',
'Karma'
];
$scope.greet = function(){
$scope.message = 'hi, ' + $scope.user.name;
};
$scope.herro = {
something : 'her... |
var mongoose = require('mongoose');
// keeps track of any deleted user profiles
var deletedUserSchema = new mongoose.Schema( {
user: {type: mongoose.Schema.Types.Mixed, required: true}
});
module.exports = mongoose.model('Deleted_User', deletedUserSchema);
|
import React from 'react';
import NewQuoteButton from './NewQuoteButton';
import TweetButton from './TweetButton';
export default function QuotePanel(props) {
const { text, author, newQuoteHandler, isLoading } = props;
return (
<div className="box">
<div className="hero">
<div className="hero-bo... |
/**
* @ngdoc component
* @name lineChart
* @module shared
* @param data: A data object in the format
* @description A component which is responsible for rendering a line chart based on input data
*/
(function (angular) {
'use strict';
function LineChartController($element) {
var ctrl = this;
... |
// var Tools = global.load_library('Tools')
// var project_model = global.load_model('project_model')
require(__dirname+'/Client')
// fs.readFileSync( __dirname+'/Client.js', 'utf8');
module.exports = class Project extends Client
{
test(event, req, res, params)
{
res.sendFile(global.APPPATH+'views/clie... |
import React, { Component } from 'react';
import { AuthService, CartService } from '../../service/index';
import CartGame from './CartGame';
class CartPage extends Component {
constructor(props) {
super(props);
this.state = {
games: [],
};
}
componentDidMount() {
this.loadGames();
}
r... |
module.exports = (sequelize, DataTypes) => {
const Game = sequelize.define('Game', {
WinnerScore: {
type: DataTypes.INTEGER,
allowNull: false,
},
LoserScore: {
type: DataTypes.INTEGER,
allowNull: false
},
IsTournamentGame: {
type: DataTypes.BOOLEAN,
defaultValue... |
const api = "http://localhost:3001"
// Generate a unique token for storing data on the backend server.
let token = localStorage.token
if (!token)
token = localStorage.token = Math.random().toString(36).substr(-8)
const headers = {
'Accept': 'application/json',
'Authorization': token
}
// Get all categories for... |
import { Industry } from "../../../db/models/";
const industryQueries = {
industryRandom: async () => {
const Qty = await Industry.find().countDocuments();
const random = Math.floor(Math.random() * Qty);
return await Industry.findOne().skip(random);
}
};
export default industryQueries;
|
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const baiseConfig = require('./config');
const plugins = [
new HtmlWebpackPlugin({
title: 'webpack babel react revisited',
filename: path.join(baiseConfig.appDist, 'index.html'),
}),
new ExtractTextPlugin({
... |
"use strict";
exports.defaultOptions = defaultOptions;
exports.Scrollable = exports.defaultOptionRules = exports.ScrollablePropsType = exports.viewFunction = void 0;
var _inferno = require("inferno");
var _vdom = require("@devextreme/vdom");
var _base_props = require("../common/base_props");
var _scrollable_props ... |
import React from 'react';
import {Helmet} from "react-helmet";
import Typography from 'typography'
import funstonTheme from 'typography-theme-funston'
import injectFonts from 'typography-inject-fonts'
import Globe from 'react-globe.gl';
import ReactTextCollapse from 'react-text-collapse';
import './App.css';
import ... |
module.exports = {
'extends': 'airbnb',
'parser': 'babel-eslint',
'env': {
'jest': true,
},
'rules': {
'linebreak-style': 'off',
'no-use-before-define': 'off',
'react/jsx-filename-extension': 'off',
'react/prefer-stateless-function': 'off',
'import/prefer-default-export': 'o... |
$(function () {
$(document).on("click", ".add-department", function (e) {
var $this = $(this);
var $container = $this.closest("form").find(".container-add-department");
var index = $container.find(":input").size() + 1;
$container.append('<input type="text" style="margin-top:3px;" nam... |
import React, { Component } from 'react';
import ExpertCard from './ExpertCard'
import axios from 'axios';
import StarRating from 'react-star-rating'
class AllExperts extends Component {
constructor(props) {
super(props);
this.state = {
members: [],
};
}
... |
/**
* Created by czh on 2016/11/16.
*/
import React, {Component} from 'react';
import Button from 'material-ui/Button';
import {Modal, Table} from 'material-ui';
import {TableBody, TableCell, TableHead, TableRow} from 'material-ui/Table';
import classzz from '@/classes'
import {withStyles} from 'material-ui/styles';
... |
(function(){
if (typeof digitnexus == 'undefined') {
digitnexus = {};
}
if (typeof digitnexus.utils == 'undefined') {
digitnexus.utils = {
getStringWidthAsPix : function(str) {
var span = document.getElementById("widthTester");
if(span == nul... |
import Quill from 'devextreme-quill';
import { isObject } from '../../../core/utils/type';
var ExtLink = {};
if (Quill) {
var Link = Quill.import('formats/link');
ExtLink = class ExtLink extends Link {
static create(data) {
var HREF = data && data.href || data;
var node = super.create(HREF);
... |
const emojis = [
{code:"👍", label:"-"},
{code:"👐", label:"-"},
{code:"🙌", label:"-"},
{code:"👏", label:"-"},
{code:"👎", label:"-"},
{code:"👊", label:"-"},
{code:"✊", label:"-"},
{code:"🤛", label:"-"},
{code:"🤜", label:"-"},
{code:"🤞", label:"-"},
{code:"🤟", label:"-"},
{code:"🤘", labe... |
import React from 'react'
const calc = (amount, currency) => (amount * currency).toFixed(2)
const Currency = (props) => {
return (
<div className="input-group mt-3 w-25">
<div className="input-group-prepend">
<span className="input-group-text">{props.currency}</span>
</div>
<input clas... |
/**
* The MIT License (MIT)
* Copyright (c) 2016, Jeff Jenkins @jeffj.
*/
const React = require('react');
const SearchActions = require('../actions/SearchActions');
const SearchItem = require('./SearchItem.react');
const Loader = require('react-loader');
import { Link } from 'react-router';
const SearchStore = req... |
var mongoose = require('mongoose');
module.exports = mongoose.createConnection("mongodb://mongo/chat");
|
import React from 'react';
import './App.css';
import NewTweet from './NewTweet';
import Tweets from './Tweets';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
tweets: [
{
name: 'Jung',
text: 'Hello World.'
},
{
... |
ack.lang({
'Reader Cloud' : 'Reader Cloud',
'make a book your own' : 'make a book your own',
'Connectivity Problem' : 'Connectivity Problem',
'You don\'t appear to be connected to the internet' : 'You don\'t appear to be connected to the internet',
'Please reconnect to the internet and try again' : 'Please reconne... |
//#region BLOCK_TYPES
var btIndex = 0;
var blockPartialClassName = "Block";
window.BLOCK_TYPES = {
Names:
{
Clear: { ID: ++btIndex, ClassName: blockPartialClassName + "Clear" }
, End: { ID: ++btIndex, ClassName: blockPartialClassName + "End" }
, Move: { ID: ++btIndex, ClassNa... |
import FrameLoop from './FrameLoop';
describe('FrameLoop', function() {
it('queues and runs functions in a step', function() {
var loop = new FrameLoop();
var update = jasmine.createSpy('update');
var context = {};
var data = {};
loop.onNextTick(update, context, data);
loop.step();
ex... |
'use strict'
const vbTemplate = require('claudia-bot-builder').viberTemplate
module.exports = function whatIsApod() {
return [
new vbTemplate.Text(`The Astronomy Picture of the Day is one of the most popular websites at NASA. In fact, this website is one of the most popular websites across all federal agencies.... |
!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Word Guesser Starter Code</title>
</head>
<body>
<div id="guess_display"></div>
<form id="guess_form">
<label>Guess a letter:
<input type="text" id="guess_input">
</label>
</form>
<div id="guess_... |
import React, {useEffect, useState} from 'react';
import './App.css';
import io from 'socket.io-client';
import Chat from './comp/Chat'
import Theater from './comp/Theater';
import Seating from './comp/Seating';
//MAIN SERVER: https://chickenriot.herokuapp.com/ TEST:https://superchatt.herokuapp.com/
let socketio = i... |
import Vue from 'vue';
import router from './route';
import './config.js';
import './axios_intercept.js';
import Main from './Main';
new Vue({
router,
render: h => h(Main),
}).$mount('#app')
// new Vue({
// el: '#app',
// router,
// components: { Main },
// template: '<Main></Main>',
// });
|
let fs=require("fs");
var dataAccessLayerbulkexport=require("../dataAccessLayer/bulkexport");
function transferdata(path,index,type){
return new Promise(function(resolve,reject){
fs.readFile(path,'utf8',function(err,data){
data=JSON.parse(data);
console.log("file read");
preparedataforExport(data,index... |
var MailboxRepository = function() {};
const HttpStatus = require('http-status');
MailboxRepository.prototype.getFakeMail = function() {
const fakeMailList = [{
"from": "B",
"to": "A",
"message": "Message A"
},
{
"from": "C",
"to": "A",
... |
const express = require("express");
const app = express();
const bodyParser = require("body-parser");
app.use(express.json());
app.use(express.static("public"));
app.use(bodyParser.json());
app.get('/', function(req, res) {
res.send('index.html');
});
let data = [];
app.get("/messages", function(req, res) {
... |
const readlineSync = require("readline-sync");
let tab1 = [1, 2, 3, 4, 5];
let tab2 = [...tab1];
console.log(tab2);
var num = 0;
var arr = [];
var y=Number(readlineSync.question("please put in a number"));
function inj(){
//let num = 0;
while(num<y){
n = readlineSync.question("How many numbers should ... |
const express = require('express');
const UserController = require('../controllers/UserController');
const router = express.Router();
router.get('/', UserController.getUsers);
router.get('/:userId(\\d+)', UserController.getUserById);
router.post('/new', UserController.createNewUser);
router.post('/auth', UserControl... |
const commandLineArgs = require('command-line-args')
const Capture = require('./lib/capture')
process.on('unhandledRejection', (error) => {
console.error(error)
process.exit(1)
})
const optionDefinitions = [
{
name: 'url',
type: String
},
{
name: 'device',
type: String,
defaultValue: 'pc... |
crel = require('crel')
var page = crel('div',
crel('h1', 'Title'),
crel('p', 'some text'))
document.body.appendChild(page) |
// This is the where all of the database information is
// This is for demonstration purposes, because any changes to this information
// won't be saved accross page loads, but can be used to demonstrate functionality
// within a page
// Person's name, will have to have a least a first and a last name
// That's what t... |
(function(angular) {
'use strict';
// Referencia para o nosso app
var app = angular.module('app');
// Cria um service chamado 'Group'
app.factory('Group', [function(User) {
// Modelo do grupo
function Group(data) {
if (data) this.setData(data);
};
// Métodos do grupo
Group.prototype = {
setD... |
import reducer, {
featuresInitSucceeded,
featuresChanged,
} from './features';
const features = {
enableAccountAdministration: true,
};
const featuresUpdate = {
enableAccountAdministration: {
current: false,
},
};
describe('features', () => {
test('getting initial features', () => {
expect(reduce... |
import React from 'react';
import rainbowLoader from '../../assets/rainbowLoader.gif';
export default function Loader() {
return (
<div className='loading-icon-wrapper'>
<img
className='loading-icon'
src={rainbowLoader}
alt='loading icon, the projects are loading'
/>
</div... |
// フォト
exports.createWindow = function(_type, _articleData){
Ti.API.debug('[func]winPhoto.createWindow:');
Ti.API.debug('_type:' + _type);
var loginUser = model.getLoginUser();
// 初回読み込み時
var initFlag = true;
// blur用
var commentField = null;
// 記事データの取得件数
var articleCount = 10;
var articleLastId = null;
... |
//synchronously example
var fs = require("fs");
var buffer = fs.readFileSync("us-states.txt");
var bufferString = buffer.toString();
var newLineCount = bufferString.split("\n").length;
console.log("There are " + newLineCount + " lines in the file");
console.log("Oh, you've finished reading the file.");
console.log... |
/**
* 题目描述
在数组 arr 末尾添加元素 item。
不要直接修改数组 arr,结果返回新的数组
*/
function append(arr, item) {
var arrcopy = arr.slice(0);
arrcopy.push(item);
return arrcopy;
} |
// for "accounts" route
const logInPath = "/accounts/user/login/"
const logOutPath = "/accounts/user/logout/"
const registerPath = "/accounts/user/register/"
const apiTokenPath = "/accounts/api/token/"
const apiRefreshTokenPath = "/accounts/api/token/refresh/"
// for "api-blog" route
const allPostsPath = "/api-blog/... |
const resolve = {
data: {
auth: {
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlYzZlNWE2NzhjNDBkNmM0YmNjY2RlYiIsIm5hbWUiOiJBZG1pbmlzdHJhZG9yIiwidXNlcm5hbWUiOiJyb290IiwiZW1haWwiOiJhZG1pbkB5b3VyZG9tYWluLmNvbSIsInBob25lIjoiMTE3Nzc3Nzc3NyIsInJvbGUiOnsicGVybWlzc2lvbnMiOlsiU0VDVVJJVFlfVVNFU... |
module.exports={
cookieSecret: "info-site",
db:"info-site",
url:'mongodb://localhost:27017/info-site'
} |
import React, { Component } from 'react';
import { scaleLinear, scaleTime } from 'd3-scale';
import { isoParse } from 'd3-time-format';
import { select, selectAll, mouse as d3Mouse } from 'd3-selection';
import { extent, bisector } from 'd3-array';
import { axisBottom, axisLeft } from 'd3-axis';
import { line } from 'd... |
'use strict';
module.exports = function (config, title, name) {
config = config || {};
if (typeof config == 'string') {
var configStr = config.split('/');
var lastObj = configStr.pop();
var configStrUrl = configStr.join('/');
config = {
fileUrl: 'components' + config... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Songs</title>
</head>
<body>
<div id="detailsArea">
<span class="detail" id="title"></span>
... |
import React from 'react';
import {Link} from 'react-router-dom'
import { Form, Input } from '@rocketseat/unform'
import * as Yup from 'yup'
import logo from '../../assets/logo.svg'
export default function SignIn() {
function handleSubmit(data){
console.log(data)
}
const schema = Yup.object().shape({
... |
import React from 'react';
import ReactDOM from 'react-dom';
import { I18nextProvider } from 'react-i18next';
import { renderToString } from 'react-dom/server';
import { Provider } from 'react-redux';
import { StaticRouter } from 'react-router';
import createBrowserHistory from 'history/createBrowserHistory';
import cr... |
'use strict'
const webpack = require('webpack')
const {
VueLoaderPlugin
} = require('vue-loader')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const utils = require('./utils')
const path = require('path')
module.exports = {
entry: path.resolve(_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.