text stringlengths 7 3.69M |
|---|
import React from "react";
import {
Container,
Error,
Base,
Title,
Text,
TextSmall,
Link,
Input,
Submit,
} from "./styles/sign-in-form";
export default function SigninForm({ children, ...restProps }) {
return <Container {...restProps}>{children}</Container>;
}
SigninForm.Error = function SigninFor... |
import angular from 'angular';
import 'bootstrap/dist/css/bootstrap.css';
import angularMeteor from 'angular-meteor';
import template from './assetItem.html';
import { Items } from '../../api/assets/items.js';
class AssetItemCtrl {
constructor($scope) {
$scope.viewModel(this);
this.sub... |
var sql = require('./BaseModel');
// const Config = require('../globals/Config');
var timeController = require('../controllers/TimeController');
// const _config = new Config();
var Task = function (task) {
this.task = task.task;
this.status = task.status;
this.created_at = new Date();
};
Task.getProduc... |
export default {
development: {
cloudfront: {
host: "https://d1tbx5pakkr5qn.cloudfront.net"
},
host: "http://" + location.hostname + ":3000/",
errorHandler: function(scope) {
return function(result) {
if (!result.data.res) {
window.alert(result.data.msg);
if (re... |
//js는 this에 바인딩되는 객체가 한가지가 아니라 해당 함수 호출 방식에 따라 this에 바인딩되는 객체가 다르다.
//함수가 선언할 때 상위스코프를 결정하는 정적 스코프와 헷갈리지 말자.
/*
1. 함수 호출
2. 메소드 호출
3. 생성자 함수 호출
4. apply/call/bind 호출
*/
{
var foo = function(){
console.dir(this);
};
foo(); // 1. 함수 호출
//2. 메소드 호출
var obj = {foo: foo};
obj.foo();
//... |
import React from 'react';
const Home = ()=>{
return(
<div className="home">
<div className="card home-card">
<h5>Sandra</h5>
<div className="card-image">
<img src="https://images.unsplash.com/photo-1472806426350-603610d85659?ixlib=rb-1.2.1&ix... |
export function add(pha, v) {
pha.add_callback(v);
}
|
#pragma strict
var playerReference : GameObject;
function Start () {
}
function Update () {
var newPosition : Vector3 = new Vector3(playerReference.transform.position.x, playerReference.transform.position.y, playerReference.transform.position.z - 20);
transform.position = newPosition;
}
|
app.views.MyCoupons = Backbone.View.extend({
initialize: function(store,data) {
this.store = store;
this.couponList = [];
// this.categoryList = new app.models.CategoryCollection();
// this.categoryList.fetch({reset: true,error:alert("Could not connect to the coupon server")});
this.rend... |
module.exports = {
mongoURI: "mongodb://tirth:tirth123@ds119572.mlab.com:19572/devconnector",
secretOrKey: "secret"
};
|
const girls = document.querySelector(`.buttons__girls`);
const boys = document.querySelector(`.buttons__boys`);
const total = document.querySelector(`.total`);
const past = document.querySelector(`.past`);
let girlsCount = localStorage.getItem(`girlsCount`) || 0;
let boysCount = localStorage.getItem(`boysCount`) || 0;... |
const env = require('dotenv').config();
const SpotifyAPI = require('spotify-web-api-node')
const chalk = require('chalk');
const log = console.log;
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
var spotify = new SpotifyAPI({
cl... |
// translations for English
export default {
messages: {
alert: 'This is an alert dialog. Click the button below to close.',
html: `This dialog has <b style="color: darkorange; border-bottom: 1px solid #2ba5ff">HTML</b> enabled. Click the button below to close.`,
basic: 'This is a basic con... |
app.factory('compareAdminServ',function(pointAdminGetServ,pointAdminServ,chartServ,constServ,uiServ){
var points = [];
var graphType = [];
return {
set: function(){points = pointAdminGetServ.getAll(function(){uiServ.loader0hide();});},
get: function(){return points;},
checkType: function(nnew,old){
... |
/*
* Copyright (C) 2009-2013 SAP AG or an SAP affiliate company. All rights reserved
*/
jQuery.sap.declare("sap.ca.ui.utils.TablePersonalizer");
jQuery.sap.require("sap.ushell.services.Personalization");
jQuery.sap.require("sap.m.TablePersoController");
sap.ca.ui.utils.TablePersonalizer = function(oMobileTable, oS... |
function fact(a){
if(a == 0 || a ==1)
return 1;
return fact(a-1)*a;
}
onmessage = function(a){
postMessage(fact(a.data));
} |
import _ from 'lodash';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { View, Text, Switch, Image } from 'react-native';
import { Actions } from 'react-native-router-flux';
import PetForm from './PetForm';
import { petFeedBreakfast, petFeedDinner, petUpdate } from '../actions';... |
const minPerimeter = require('./index');
test('finds minimum perimeter of rectangle with area a', () => {
expect(minPerimeter(30)).toEqual(22)
});
test('finds minimum perimeter of rectangle with area a', () => {
expect(minPerimeter(101)).toEqual(204)
});
test('finds minimum perimeter of rectangle with area a', (... |
import React from 'react';
import Chip from '../Chip/Chip';
import "../Chip/chip.css"
const Tag = (props) =>{
const {name, status} = props;
let content = "";
if(status === "pass"){
content = "Passed"
} else if(status === "fail"){
content = "Failed"
} else {
content = "Untes... |
import React from "react";
import styles from "./ContestBlock.module.scss";
import { Link } from "react-router-dom";
import { mdiLightbulbOutline } from "@mdi/js";
import Icon from "@mdi/react";
const ContestBlock = (props) => {
return (
<div className={styles.contestContainer}>
<span>
Ready to get... |
angular.module('ngApp.zonePostCode').factory('ZonePostCodeService', function ($http, config, SessionService) {
var GetOperationZone = function () {
return $http.get(config.SERVICE_URL + '/OperationZone/OperationZone');
};
var GetCountryUKPostCode = function (OperationZoneId, LogisticType, Courier... |
function setupBezierFunction(points) {
//Sets up the bernstein polynomials, returns a function that is only dependent on t.
//A memoized factorial function is used to calculate the binomial coefficients for optimisation purposes.
function memoizedFactorial() {
let cache = [1];
function inn... |
const x = "Hello";
const y = [...x, '', 'H'];
console.log(y); |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const bcrypt = require('bcrypt');
const SALT_WORK_FACTOR = 10;
const AdminSchema = new Schema({
email:{type:String,unique:true},
password:{type:String,select:false},
});
module.exports = mongoose.model('Admin', AdminSchema) |
import React, { Component } from "react";
import { YMaps, Map, Placemark } from "react-yandex-maps";
import building from "../data/buildings";
import { Wrap, MapContent, Search, List, MapWrap, Card } from "./map.style";
class MyMap extends Component {
constructor(props) {
super(props);
this.state = {
... |
const bcrypt = require('bcryptjs');
const uuid = require('uuid/v4');
module.exports = {
up: (queryInterface, Sequelize) => {
const puns = [
{
id: '1',
text: 'Jawab 1 pertanyaan truth dari penantang mu',
name: '-',
img_url: 'https:/... |
window.onload = initAll;
var uploadButton;
function initAll(){
getElement();
setAction();
}
function getElement(){
uploadButton = document.getElementById('sub');
}
function setAction(){
uploadButton.onclick = collectFormData;
}
var formData = null;
var frm = null
var msg = null;
function collectFormData(event){... |
/**
* Force tests to run in the "test" environment.
* @type {string}
*/
process.env.NODE_ENV = 'test';
// Make sure the global "app" is available to tests.
app = this.app || require('../app');
|
var _ = require('underscore');
var fn = require('../fn');
var datas = require('../datas');
var exports = {};
exports.init = function(userID) {}
exports.api = {
GetBatteryState: function(req, res, userID) {
var $data = datas[userID].$data;
res.send(fn.result($data.GetBatteryState, req.id));
},
... |
var chai = require('chai');
var assert = chai.assert;
var sumFibs = require('../src/sumFibs');
it('sumFibs', function() {
assert(typeof sumFibs(1) === 'number', 'sumFibs(1) should return a number.');
assert.deepEqual(sumFibs(1000), 1785, 'sumFibs(1000) should return 1785.');
assert.deepEqual(sumFibs(4000... |
const inquirer = require('inquirer');
const utils = require('./../utils');
const configuration = require('./../configuration');
const question = {
type: 'input',
name: 'name',
message: 'What is your idea?'
};
const IdeasManager = function IdeasManager(data) {
const ideas = data || {};
return {
... |
const postsURL = "https://blog.styve.digital/wp-json/wp/v2/posts?_embed&?&categories=2";
const postsContainer = document.querySelector(".blog-posts-grid");
const loadMoreBtn = document.querySelector(".load-more-btn");
const searchBtn = document.querySelector(".blog-search-btn");
const clearSearchBtn = document.querySel... |
export const appService = {
setWifiInfo,
selectSensor,
uploadKey,
setWindAddress,
getWindAddress,
caliberate,
sendCommand,
sendStow,
getCommissioningData,
getCurrentTrackerInfo,
triggerDiscovery,
setPanID,
threshold,
setHeartBeat,
setTimeZone,
getHeartBeat... |
angular.module("mobileControllers")
.controller('HelpDetailController', function ($scope, $state, $stateParams) {
$scope.block = $stateParams.block === null ? 0 : $stateParams.block;
$scope.id = $stateParams.id || 1;
console.log($stateParams)
})
.directive('showHelpDetail', function ($ionicViewSwitche... |
var user_info;
var message = "Framework for Internal Navigation and Discovery, Hypercube Platforms";
var id = null;
var learnCounter = 0;
var learnLimit = 100;
var progress = 0.0;
var groupfind;
var locationfind;
var userfind;
function getXMLHttp(){
var xmlhttp;
if (window.XMLHttpRequest) {// code for IE7+,... |
'use strict';
angular.
module('clientDetail').
component('clientDetail', {
templateUrl: '../static/templates/client/client-detail.template.html',
controller: ['$routeParams', 'Client', 'Id',
function ClientDetailController($routeParams, Client, Id) {
this.client = Client.get({clientId: ... |
/**
* Copyright IBM Corp. 2020, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import apiResponse from '../../../../services/src/services/KalturaPlayer/__tests__/data/response.json';
module.exports = {
getThumbnailUrl... |
import { takeEvery, fork, all, put, call } from "redux-saga/effects";
import { FETCH_USERS } from "../actions";
import { fetchUsersSuccess } from "./actions";
import { toastr } from "react-redux-toastr";
import axios from "axios";
//Watch action's types and run it's worker function
function* watchFetchUsers() {
yiel... |
const { LinkedList } = require('./LinkedList');
let list = new LinkedList();
list.append(15);
list.append(10);
|
function update() {
new Ajax.Request(document.location.href, {method: 'get', parameters: {xml: 'true', rand: Math.random() * 1000}, onSuccess: updateResult});
}
function updateResult(transport) {
var xml = transport.responseXML;
var updated = false;
$$('.update').each(function(el) {
try {
var updatable = xml... |
import { Switch, Route } from 'react-router-dom'
import NavBar from './components/nav/nav-bar'
import HomePage from './components/home/home-page'
import About from './components/about/about'
import Help from './components/help/help'
import SignUp from './components/user/sign-up/sign-up'
import Login from './components/... |
'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
var s = require("underscore.string");
module.exports = yeoman.generators.Base.extend({
initializing: function () {
this.pkg = require('../package.json');
},
prompting: function () {
var do... |
import shell from 'shelljs';
import sinon from 'sinon';
import {assert} from 'chai';
import any from '@travi/any';
import exec from '../../thirdparty-wrappers/exec-as-promised';
suite('promisified shell.exec()', () => {
let sandbox;
const command = any.string();
const stdout = any.string();
const stderr = any.... |
(function (){
use = "strict";
var converter = new Showdown.converter();
var CommentBox = React.createClass({
loadInitialData: function() {
$.ajax({
url: this.props.url,
dataType: "json",
success: function(data) {
this.s... |
import {pageSize, pageSizeType, paginationConfig, searchConfig} from '../../globalConfig';
import name from '../../dictionary/name';
const filters = [
{key: 'formType', title: '表单类型', type: 'text'},
{key: 'formName', title: '表单名称', type: 'text'},
{key: 'dictionaryCode', title: '表单状态', type: 'select',from:'dictio... |
import { useState } from 'react'
import { string, number, any } from 'prop-types'
export const useInput = ({ type, min, max, val = undefined }) => {
const [value, setValue] = useState(val)
const [stateInput, setStateInput] = useState({
message: '',
error: false
})
const onChangeInput = e => {
set... |
export default {
init($) {
const HUMBLE_HEIGHT = (screen.height / 3);
$("body").on("click", ".gototop", function () {
$("html,body").animate({ scrollTop: 0 });
});
setTimeout(() => {
$(".invisible-onload").addClass("loaded")
}, 1400);
window.onbeforeunload = null;
$(window)... |
let playerScore =0; /* variable para llevar el conteo de los marcadores */
let computerScore=0;
let computerSelection= ""; /*variable para capturar la opción del sistema */
function computerPlay() {/*función para crear elegir una opción de forma aleatoria */
const randomChoice = Math.floor((Math.random() * 3... |
import { createContext } from 'react';
import cn from 'classnames';
import style from './style.module.css';
import { Preloader } from '../components/Preloader';
import { Widget } from '../components/Widget';
import { Main } from '../components/Main';
import { useApp } from './useApp';
export const StateContext = cre... |
module.exports = {
CREATE_USER_SUCCESS:"유저 생성 성공",
CREATE_POST_SUCCESS:"게시글 생성 성공",
GET_POST_SUCCESS:"게시글 가져오기 성공",
DELETE_POST_SUCCESS:"게시글 삭제 성공",
AUTH_FAIL:"이 회원이 쓴 글이 아닙니다",
UPDATE_POST_SUCCESS:"게시글 업데이트 성공",
POST_NOT_EXIST:"존재하지 않는 포스트 입니다",
CREATE_POST_LIKES_SUCCESS:"게시글 좋아요 생성 성... |
import '../styles/index.scss';
console.log('Javascript Exercise 3');
|
// Global variables for the game
var renderer;
var scene, camera, ui;
var raycaster, mouse, timer, intersected, latest;
var emission = {r: .6, g: .55, b: .7};
var light1, light2, ambient, ground;
var socket;
var player;
var opponents = {};
var currentName;
var dices = new Array(5).fill(undefined);
var coordinates =... |
/*Ejercicio 100
Crear un documento con el nombre ej100.js
Declarar una función que muestre en consola los números pares del 0 al 100*/
function numerosPares (argument) {
for(let numero = 0; numero <= 1000; numero++){
if ((numero % 2) === 0) {
console.log('El numero es par: ', numero);
}
}
} |
function removeRow(id) {
// var sportId = link.getAttribute("span");
$.ajax({
type: "DELETE",
url: "/api/employee/" + id,
contentType: "application/json",
dataType: 'json',
success: function (result) {
console.log(result);
},
error: function (e... |
import VueI18n from 'vue-i18n';
import zh from './locale/zh/zh';
export const i18n = new VueI18n({
locale: 'zh',
fallbackLocale: 'zh',
messages: {
zh
}
}); |
javascript:function(){var e="http://wapo.joeydev.com/trust-project/",t="http://wapo.joeydev.com/trust-project/",s=document.location.hostname;(s.indexOf("projects.dev")>=0||s.indexOf("localhost")>=0)&&(e="",t="")
var n=document.createElement("link")
n.setAttribute("rel","stylesheet"),n.setAttribute("href",e+"css/foundat... |
var express = require("express");
var bodyParser = require('body-parser');
var braintree = require("braintree");
var app = new express();
var path = require("path");
var bodyParser = require('body-parser');
app.use(express.static(path.join(__dirname)));
app.use(bodyParser.json());
//support parsing of application/x-ww... |
/**=========================================================
* Module: Products
*
=========================================================*/
(function () {
'use strict';
angular
.module('app.products')
.controller('ProductsController', ProductsController);
ProductsController.$inject = ['ProductServ... |
import React, {useState} from 'react';
import {View, Text, TextInput} from 'react-native';
import {DEVICE_OS, iOS} from '../../actions/constants';
import styles from './styles';
const Input = props => {
const {inputStyle, labelStyle, wrapper, inputWrapper, labelWrapper} = styles;
const {
label,
value,
... |
define('main', ['application', 'blockUI','rd.controls.BasicSelector','rd.controls.Selector',
'rd.controls.FoldSelector','rd.containers.Accordion','rd.controls.Input','rd.controls.Table',
'rd.controls.TabSelect','rd.controls.ComboSelect','rd.controls.TabSelector','rd.controls.Graph',
'rd.containers.Tab','rd.contro... |
/**
* bridge 桥接原生方法
* @author barret
* @data 2018/04/14
* @param callback
* @returns {*}
*/
/**
*
* @returns {*}
*/
const getTrueSys = () => {
const ua = navigator.userAgent;
const lfHybrid = ua.match(/BR/); //webview内核写入
const android = ua.match(/(Android);?[\s/]+([\d.]+)?/);
if (lfHybrid) {... |
import React from "react";
import './css/todoform.css';
class Todoform extends React.Component {
render() {
return (
<div className="form">
<input value={this.props.value} onChange={this.props.onChange} onKeyPress={this.props.onKeypress} />
<div className="button" onClick={this.props.onCreate}>
... |
import { Link } from "react-router-dom";
import AppBar from "@material-ui/core/AppBar";
import Adidas from "../assets/adidas.png";
export default function Nav() {
return (
<AppBar
className="d-flex flex-row flex-wrap justify-content-between"
color={"inherit"}
style={{
backgroundColor: "... |
'use babel'
import configSchema from './config-schema'
import {toggleQuotes} from './toggle-quotes'
export default {
config: configSchema,
activate () {
this.subscription = atom.commands.add('atom-text-editor', 'toggle-quotes:toggle', () => {
let editor = atom.workspace.getActiveTextEditor()
if (... |
import firebase from 'firebase';
import { Actions } from 'react-native-router-flux';
import {
ADD_EVENT,
EVENT_FETCH_SUCCESS
} from './types';
export const selectEvent = (eventId, expanded) => {
return {
type: 'select_event',
payload: expanded ? null : eventId
};
};
export const addEvent = ({ event })... |
let replaceRegExp = {}
module.exports = (ifText, replaceValue) => {
if (typeof ifText != 'string') {
ifText = ''
}
let origin = ifText
// 正規表現の抜き出し
replaceRegExp = {}
let regList = ifText.match(/\/[^/]+\//g)
if (Array.isArray(regList)) {
regList.forEach((reg, i) => {
... |
function slides(i) {
$("header")[0].style.backgroundImage = "url(img/slides/" + i + ".jpg)"
next = (i + 1) % 5 + 1
setTimeout("slides(" + next + ")", 5000);
}
setTimeout("slides(1)", 5000);
|
// The initial state of an asynchronous promise is pending, but we have a guarantee that it will settle. How do we tell the computer what should happen then? Promise objects come with an aptly named .then() method. It allows us to say, “I have a promise, when it settles, then here’s what I want to happen…”
// In the c... |
'use strict';
angular.module('myApp.services', [])
.service('JokeService', function ($http) {
var services = {};
services.getJokes = function () {
return $http.get('api/jokes');
};
return services;
});
; |
// Sorununz olursa Matthe#0001 ulaşınız.
const Discord = require("discord.js")
const client = new Discord.Client()
const ayarlar = require("./ayarlar.json")
const moment = require("moment")//Matthe#1000
const fs = require("fs")
const db = require("quick.db")
const chalk = require("chalk")
require('./util/Loader.js')(c... |
$(document).ready(function () {
init();
});
var approximateLocation = function () {
// Retrieve user information based on IP approximation. Courtesty of GeoIP Database
$.getJSON('https://geoip-db.com/json/geoip.php?jsonp=?')
.done (function(location) {
// Retrieve local weather conditions based on user loca... |
import request from '@/utils/request'
// 注册接口
export const register = (data) => {
return request.post('/user/register', data)
}
// 登录接口
export const login = (data) => {
return request.post('/user/login', data)
}
// 获取用户信息
export const getUserInfo = () => {
return request('/user/currentUser')
}
|
let TableStore = require('tablestore')
let where = {
eq(key,val){
return { // 设置查询类型为TermQuery
queryType: TableStore.QueryType.TERM_QUERY,
query: {
fieldName: key,
term: val
}
}
},
big(key,val){
return { // 设置查询类型为RangeQue... |
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* 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 agre... |
function myFirstApp (name, age) {
alert("Hi my name is " + name + " and this my first app in JS")
function showSkills () {
let skills = ['Java','Python','HTML','CSS'];
for(let i = 0; i<skills.length; i++){
document.write('I know PL ' + skills[i] +'<br>');
}
}
showSkills();
function... |
const express = require('express')
const fs = require('fs');
const app = express()
const port = 3003;
const layout = fs.readFileSync('content/email_templates/layout.html', {encoding: 'utf8'});
function injectData(template, data) {
return template.replace(/{{(.*?)}}/gm, (_,prop) => data[prop] || `{{${prop}}}`);
}
a... |
import React, { Component } from 'react';
import {Treasure, BackButton, AcceptItem, TreasureStats} from './Treasure';
import {MonsterInstance, AttackResult, Winner, Loser, Reload} from './MonsterInstance';
import {FirstInstanceText, StartGame, GAMETEXT} from './FirstInstanceText';
import {SecondInstanceText, GAMETEXTB}... |
/*
Ejercicio 5
Crear un documento con el nombre ej5.js
Declarar las siguientes variables de forma individual y asignarle a cada una un valor para describirte:
nombre
apellido
edad
fecha de nacimiento
direccion
Mostrar en consola el valor de cada una de las variables utilizando console.log()
*/
var nombre = 'Consuelo... |
const isMasterBean = __.newBean('com.enonic.lib.cluster.IsMasterBean');
export default function isMaster() {
return __.toNativeObject(isMasterBean.isMaster());
}
|
define(function(require) {
var $ = require("jquery");
var justep = require("$UI/system/lib/justep");
var AS = require("$UI/yirun/js/baas/ajaxService");
var common = require("$UI/system/components/justep/common/common");
var page = 1;
var _this;
var selectID = 0;
var Model = function() {
this.callParent();
};... |
export const rejectedMessages = [
"Oh god no please don't do this to me",
"That was a mistake, right? It's okay. I'll give you one more chance.",
"What are you, crazy?",
"You're supposed to swipe right. NOT LEFT.",
"OOF",
"😢",
"I didn't spend THIS MUCH TIME building this app just so you could reject me."... |
import React from 'react';
export const CountdownRenderer = ({
days,
hours,
minutes,
seconds,
completed,
}) => {
return (
<div className='renderer'>
<div className='renderer__item'>
<b>{days}</b>
<span>Days</span>
</div>
<div className='renderer__margin'>:</div>
<... |
// $('#myModal').on('hidden', function () {
// // do something…
// });
function check_quantity(orderqty,newqty,id){
if(orderqty<newqty){
alertify.alert("Quantity cannot be greater than ordered quantity");
$('#'+id).val(orderqty);
}
}
function showproductuicmodal(id){
var DesigneCode... |
import React from 'react';
import { mount } from 'enzyme';
import ReactRouterEnzymeContext from 'react-router-enzyme-context';
import Profiles from '../Profiles';
import { ARTICLE } from '../../../constants';
const options = new ReactRouterEnzymeContext();
const history = { push: () => {} };
let slug = { slug: '' };
c... |
(function () {
angular
.module('myApp')
.controller('AdminStatusController', AdminStatusController)
AdminStatusController.$inject = ['$state', '$scope', '$rootScope'];
function AdminStatusController($state, $scope, $rootScope) {
$rootScope.setData('showMenubar', true);
$r... |
/*
* Copyright (C) 2009-2013 SAP AG or an SAP affiliate company. All rights reserved
*/
jQuery.sap.declare("sap.ca.ui.images.images");
sap.ca.ui.images.images = (function(){
var sPrefix = jQuery.sap.getModulePath("sap.ca.ui")+ "/images/";
return {
Flower : sPrefix + "Flower.png",
placeholder : ... |
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const mongoose = require('mongoose');
const Message = require('./models/message');
const socket = require('socket.io');
const path = require('path');
const PORT = process.env.PORT || 8080;
// Assign the value of your... |
'use strict';
exports.WECHAT_CONFIG = {
appID: '', // 你的appID
appSecret: '', // 你的appSecret
token: '' // 你的token
}; |
import React from 'react';
import {View, StyleSheet, Text} from 'react-native';
function HomeScreenNumbers(props) {
return (
<View style={styles.numbers}>
<View style={styles.homeStats}>
<View style={styles.homeStats}>
<Text style={styles.textNum}>
{
props.api.js... |
var zipcodeCityCSV = "zipcode,cityName\n"
+"30002,Avondale Estates\n"
+"30003,Norcross\n"
+"30004,Alpharetta\n"
+"30005,Alpharetta\n"
+"30006,Marietta\n"
+"30007,Marietta\n"
+"30008,Marietta\n"
+"30009,Alpharetta\n"
+"30010,Norcross\n"
+"30011,Auburn\n"
+"30012,Conyers\n"
+"30013,Conyers\n"
+"30014,Covington\n"
+"30015... |
describe('ADB devices helper', () => {
let adbMock;
let DeviceAllocation;
let deviceAllocation;
beforeEach(() => {
adbMock = {
devices: jest.fn().mockResolvedValue(new Error('todo in unit test')),
};
DeviceAllocation = require('./AdbDevicesHelper');
deviceAllocation = new DeviceAllocatio... |
Template.newPropertyForbid.onCreated(function() {
if(!Mart.canActAsMerchant())
forbid()
})
|
var classGW_1_1SYSTEM_1_1GFile =
[
[ "AppendBinaryWrite", "classGW_1_1SYSTEM_1_1GFile.html#a63311236692181f99fd393fe8e1ca9fc", null ],
[ "AppendTextWrite", "classGW_1_1SYSTEM_1_1GFile.html#a72e40b3234a2384738d8db6e958f4782", null ],
[ "CloseFile", "classGW_1_1SYSTEM_1_1GFile.html#ae661d107c461145bb095dcfc76... |
//function Promise(fn){
// const value = null , deferreds = [];
//
// const reslove = ()=>{
// deferreds.forEach(deferred=>deferred(value));
// }
// this.then = onFulfilled => {
// deferreds.push(onFulfilled);
// return this;//链式调用
// };
//
// fn(reslove);
//}
//
//
//new Promise(... |
import React from "react";
import {connect} from "react-redux";
import { fetchDayForecast } from "../actions/day-forecast"
class WeatherDetails extends React.Component {
componentDidUpdate(prevProps) {
if (prevProps.selectedDt != this.props.selectedDt) {
this.props.fetchDayForecast(this.props.selectedDt)... |
import React, { Component } from 'react'
import Container from 'react-bootstrap/Container'
import Row from 'react-bootstrap/Row'
import Col from 'react-bootstrap/Col'
import Button from 'react-bootstrap/Button'
import Nubes from './Nubes'
import Viento from './Viento'
import Temperatura from './Temperatura'
import Loca... |
import React, { Component } from 'react';
import { GymWeight } from '../../assets/img';
import axios from '../../utils/httpClient';
import About from '../About/index';
import {
Restaurant,
Book,
Category,
Round,
Taxi,
Img,
Info,
ItemList,
Ul,
Container,
} from './styles';
class WhereToUse extends ... |
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MODE = "development";
// ソースマップの利用有無(productionのときはソースマップを利用しない)
const enabledSourceMap = MODE === "development";
module.exports = {
mode: MODE,
entry: ['babel-polyfill', './src/js/index.js'],
output: {
p... |
var host_input = require('./inputData/blockChain.json');
require('dotenv').load();
var appUrl = process.env.ETH_APP_URL;
describe('Login', function() {
beforeEach(function() {
browser.ignoreSynchronization = true;
browser.get(appUrl);
});
it('As a user He/She should add ether', func... |
angular.module('ngApp.home').controller('HomeHandoverController', function ($scope, config, $uibModal) {
$scope.handover = 'Handover';
$scope.scanDriverManifest = function () {
$scope.isActive = true;
$scope.isScanBag = false;
$scope.isTakePicture = false;
$scope.isScanning =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.