text stringlengths 7 3.69M |
|---|
"use strict";
exports.restoreLocation = restoreLocation;
var _type = require("../../../../core/utils/type");
var _common = require("../../../../core/utils/common");
var _scroll_direction = require("./scroll_direction");
function restoreLocation(location, direction) {
if ((0, _type.isPlainObject)(location)) {
... |
"use strict";
/// <reference path="../../scene/componentEditors/ComponentEditorPlugin.d.ts" />
/// <reference path="../../scene/componentEditors/ImportIntoScenePlugin.d.ts" />
Object.defineProperty(exports, "__esModule", { value: true });
const ModelRendererEditor_1 = require("./ModelRendererEditor");
const importModel... |
/**
* LINKURIOUS CONFIDENTIAL
* Copyright Linkurious SAS 2012 - 2018
*
* - Created on 2016-02-18.
*/
'use strict';
const EventEmitter = require('events');
class GremlinStream extends EventEmitter {
/**
* @param {any} gremlinDriver
* @param {string} pageQuery
* @param {string} type 'node' ... |
/*******************************************************************************
* Licensed Materials - Property of IBM
* (c) Copyright IBM Corporation 2019. All Rights Reserved.
*
* Note to U.S. Government Users Restricted Rights:
* Use, duplication or disclosure restricted by GSA ADP Schedule
* Contract with IB... |
/*
* Copyright (c) 2012,2013 DeNA Co., Ltd. et al.
*
* 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
* rights to use, copy, modify,... |
import styled from "styled-components";
export let TourDetailContainer = styled.main`
min-height: 100vh;
`;
|
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';
// See https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-imple... |
import React, { useState, useEffect } from 'react';
import { Link, useHistory } from 'react-router-dom';
import Form from './Form';
import authorization from '../authorization';
import Message from './Message';
const SignupPage = () => {
const [errorMessage, setErrorMessage] = useState('');
const [infoMessage,... |
var randomTeam = ["Panthers", "Falcons", "Bears", "Packers", "Saints", "Chiefs", "Seahawks", "Cowboys", "Patriots", "Browns" ]
var randomWord = randomTeam[Math.floor(Math.random() * randomTeam.length)];
var s;
var g;
var count = 0;
var answerArr = [];
var userArr = [];
var remainingLetters = randomWord.length;
var ou... |
let contador = 1
// Versão WHILE
while(contador <= 10) {
console.log(`O numero do contador é ${contador}`)
contador++
}
// Versão FOR
for( let i = 1; i<=10; i++){
console.log(`O numero do contador é ${i}`)
}
// O i vai pegar a posição no array, fazer notas[i], quer dizer que você está pegando a nota a... |
const test = require('tape');
const bottomVisible = require('./bottomVisible.js');
test('Testing bottomVisible', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof bottomVisible === 'function', 'bottomVisible is a Function');
t.pas... |
import _ from 'lodash'
Graffiti.prototype = new window.google.maps.OverlayView()
function Graffiti (parent) {
this.content_ = null
this.text_ = null
this.parent_ = parent
this.setMap(parent.streetView)
}
Graffiti.prototype.onAdd = function () {
var form = document.createElement('div')
var content = docume... |
const express = require('express');
const router = express.Router();
var agregarCuentaController = require('../controller/agregarCuenta.js');
var datosCuenta = require('../controller/datosCuenta.js');
var csv = require('../controller/csv.js');
var multipart = require('connect-multiparty');
var multipart... |
( function () {
var component = {
name: 'calendar', // texthighlight
version: [1,0,0],
ccm: 'https://ccmjs.github.io/ccm/versions/ccm-24.0.1.js',
config: {
html: {
calendar: {
class: 'calendar',
id: 'calendar-co... |
import React, { PropTypes } from 'react';
const AboutUI = ({bios}) => (
<div>
{bios.map((bio) => <p><img src={bio.avatar} height="200px" width="200px"/>{bio.bio}</p>)}
</div>
);
AboutUI.propTypes = {
bios : PropTypes.array.isRequired
};
export default AboutUI;
|
import { find, map, range } from "lodash";
import handleError from "./handleError";
import { processResponse } from "../helpers";
export default async function bet({ betAmount, user }) {
try {
const appInfo = JSON.parse(localStorage.getItem("appInfo"));
const game = find(appInfo.games, { metaName... |
const { router } = require('../../../config/expressconfig')
const User = require('../../models/user')
let getAllUsers = router.get("/get-all-users-for-editing", async (req, res) => {
// console.log(status)
const result = await User.find()
if (result && result.length != 0) {
return res.jso... |
const GameSound = `
<audio class="correct-sound" src="audio/correct.mp3" type="audio/mpeg"></audio>
<audio class="incorrect-sound" src="audio/error.mp3" type="audio/mpeg"></audio>
<audio class="success-sound" src="audio/success.mp3" type="audio/mpeg"></audio>
<audio class="failure-sound" src="audio/failure.mp3" type="a... |
// Creates a new audio element object that contains all audio properties
export function createAudioElement(audioElement, numSamples) {
let ctx = new(window.AudioContext || window.webkitAudioContext);
let audioHolder = {
element: audioElement,
ctx: ctx,
source: ctx.createMediaEleme... |
const express = require('express');
const router = express.Router();
const verifyToken = require("../middleware/authorization");
const authRouter = require('./auth');
const userRouter = require('./user.controller');
const likeRouter = require('./like.controller');
const commentRouter = require('./comment.controller');... |
// @flow
import * as React from 'react';
import { View } from 'react-native';
import { Translation, Alert } from '@kiwicom/mobile-localization';
import {
TextInput,
StyleSheet,
TextIcon,
type StylePropType,
TouchableWithoutFeedback,
} from '@kiwicom/mobile-shared';
import { defaultTokens } from '@kiwicom/mob... |
/* *****************************************************************************
* Name: Una Rúnarsdóttir
*
* Description: Define the format of Show Cover
*
* Written: 9/12/2020
* Last updated: 3/1/2021
*
*
**************************************************************************** */
module.e... |
module.exports = {
run: function(args) {
`
fdgfdg
dfgdfs
dfgdfsgdfsg
dsfgde
`
}
}
|
module.exports = {
// Options
options: {
limit: 3
},
// development tasks
devFirst: [
'typescript:dev',
'coffee:dev',
'clean'
],
devSecond: [
'sass:dev',
'uglify',
'jade'
],
//watcher tasks
tsw: [
'typescript:watch... |
/**
* Created by forli on 2017/4/6.
*/
|
<?xml version="1.0" encoding="UTF-8"?>
<Values version="2.0">
<value name="name">toJson</value>
<value name="encodeutf8">true</value>
<value name="body">Ly8gcGlwZWxpbmUNCklEYXRhQ3Vyc29yIHBpcGVsaW5lQ3Vyc29yID0gcGlwZWxpbmUuZ2V0Q3Vy
c29yKCk7DQpPYmplY3QJb2JqZWN0ID0gSURhdGFVdGlsLmdldCggcGlwZWxpbmVDdXJzb3IsICJv
Ympl... |
export const CD_TYPE = 'cds';
export const RECORED_TYPE = 'vinyl_records'; |
function periodicLimit (n, nlow, nhigh) {
pl = false;
while (n >= nhigh) {
n -= (nhigh - nlow);
pl = true;
}
while (n < nlow) {
n += (nhigh - nlow);
pl = true;
}
return [pl, n];
}
|
celebinoApp.controller('gardenController', function (GardenService, UserService, $scope, $state, $mdToast) {
$scope.gardens = [];
$scope.insertGarden = function () {
console.log(UserService.getCurrentUser());
$scope.garden.user = UserService.getCurrentUser();
GardenService.insertGarden(... |
var mobileUser = AV.Object.extend("_User");
//function newMobileUser(){
// var MobileU = new mobileUser();
// MobileU.save({username: "13855555555", phone: "13855555555", password: encryptPwd("123456"), groupCode: "1", userType: 1}, {
// success: function(savePro) {
// alert("OK");
// },
// error: funct... |
import * as f from './flags'
import { browserify as b, gulp as g } from './plugins'
const entry = 'tgui.js'
import { transform as babel } from 'babel-core'
import { readFileSync as read } from 'fs'
b.componentify.compilers['text/javascript'] = function (source, file) {
const config = { sourceMaps: true }
Object.a... |
(function() {
'use strict';
angular.module('users')
.factory('User', ['common', 'DS',
function(common, DS) {
var User = DS.defineResource({
name: 'user',
endpoint: 'users'
});
return User;
... |
pm_domain_url = null;
sender_guid = "";
popup_onload = false;
object_cnt = null;
// 2015.04.03 hwjang start websock_areaID[index]와 AreaID 관련성 확인
//AreaID = null;
socketIndex_AreaID = null;
// 2015.04.03 hwjang end websock_areaID[index]와 AreaID 관련성 확인
Guid2 = null;
function Bems_postmessage(domain, popup_name... |
import Model from "~/models/Model"
export default class Product extends Model {
resource() {
return "v1/products"
}
}
|
var arr1 = ["a","b","c","d","e","f"];
var arr2 = [1,2,3,4];
var alt_join = function(arr1,arr2){
var len = max(arr1.length,arr2.length);
var array = [];
for(i=0;i<len;i++){
if(arr1[i] != undefined) array.push(arr1[i]);
if(arr2[i] != undefined) array.push(arr2[i]);
}
return array;
}
var max = function(num1,num... |
// packages
import React from 'react'
// components
import Text from './Text'
export default function Heading() {
return (
<div className='heading' style={{textAlign: 'center'}}>
<Text tag='h1' text='Darlington Congregational Chruch' />
</div>
)
} |
/*Function for AJAX requests*/
function AJAX(method, link, data, callback){
var req = new XMLHttpRequest();
req.open(method, link, true);
if (method === 'POST')
req.setRequestHeader('Content-Type', 'application/json');
req.addEventListener('load', function(){
if (req.status >= 200 && req... |
var app = new Vue(
{
el: '#app',
data: {
images:[
{
source:"https://mole24.it/wp-content/uploads/2019/11/space_adventure_torino.jpg",
alt:"",
},
{
source:"https://images3.alphacoders.com/905/905078.jpg",
... |
angular
.module('app')
.controller('blogCtrl', ['$scope', '$http', function ($scope, $http) {
'use strict';
$scope.progressIndicator = true;
$scope.error = false;
$http({method: 'GET', url: 'https://aweilf1bak.execute-api.us-east-1.amazonaws.com/medium/'})
.then(function (response) {
const... |
import { AsyncStorage } from 'react-native';
import { call, put } from 'redux-saga/effects';
import { appActions } from 'state/app';
import { isNil } from 'lodash';
function* loadHackatonVote() {
const hackathonVote = yield call(AsyncStorage.getItem, 'isVotedForHackathon');
if (isNil(hackathonVote)) return false;... |
import { createSelector } from 'reselect'
export const UserOfCommentSelector = (state, comment) => {
if (comment && comment.user && state && state.profiles)
return state.profiles[comment.user]
}
export const SellerOfProductSelector = (state, product) => {
if (product && product.seller && state && state.profil... |
import { Col, Row, Container } from "react-bootstrap"
import DailySummariesList from "./DailySummariesList"
import SummaryDetailPane from "./SummaryDetailPane"
const Summaries = () => {
return (
<Container>
<Row>
<Col xs={6} sm={5} md={4} lg={3}>
<DailySummariesList />
</Col>
... |
'use strict'
/** @typedef { import('./types').Deployment } Deployment */
/** @typedef { import('./types').CreateDeploymentOptions } CreateDeploymentOptions */
/** @typedef { import('./types').CreateDeploymentResult } CreateDeploymentResult */
/** @typedef { import('./types').GetDeploymentOptions } GetDeploymentOptions... |
const admin = require("firebase-admin");
const serviceAccount = require("./serviceAccountKey.json");
const config = {
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://-------.firebaseio.com"
}
!admin.apps.length ? admin.initializeApp(config) : admin.app();
const db = admin.database();
co... |
const routes = Object.freeze({
home: '/',
root: '/',
posts: '/posts/',
})
export default routes
export const postWithId = (id = ':id') => `${routes.posts}${id}`
|
import React, { Component } from 'react';
import InsereUsuario from './Insere';
class Usuario extends Component {
render() {
return (
<section>
<InsereUsuario />
</section>
);
}
}
export default Usuario;
|
//全局变量
var inputFocus;//该变量记录当前焦点的input
var bKeyDown=false;//记录键盘被按下的状态,当有键盘按下时其值为true
function setRowClass(obj,className){
obj.className=className;
var oldClass,toClass;
if(className=="tableData") {oldClass="inputTableDataHit";toClass="inputTableData";}
if(className=="tableDataHit") {oldClass="inputTableData";to... |
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return this.store.createRecord('category');
},
afterModel: function(model){
/* model.set('status','I');
console.log('after model: ');
console.log(model.get('status'));*/
},
/* setupController: function (controller, model) {
th... |
import Vue from 'vue';
import VeeValidate from 'vee-validate';
/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application
* or customize the JavaScript scaffolding to fit your unique needs.
*/
Vue.use(VeeValidate);
Vue.compone... |
import React, { Component } from 'react'
import { createPortal } from 'react-dom'
import PropTypes from 'prop-types'
import Editor from './Editor'
class EditorPortal extends Component {
constructor(props) {
super(props)
if (props.el) {
props.el.innerHTML = ''
}
}
render() {
con... |
import createConfigurations from './config'
const configurations = createConfigurations()
function featureDetector(configurations) {
for (let i in configurations) {
const configuration = configurations[i]
let { features, fallback, breaking = true } = configuration
const unsupportedFeatures = features.fi... |
require('../../config/babel.register')
const path = require('path')
const express = require('express')
const bodyParser = require('body-parser')
const cookieParser = require('cookie-parser')
const app = express()
const port = 3001
setGlobalScope('window')
const routes = require('./server.routes')
app.set('views', p... |
import React, { Component } from 'react';
import { ActivityIndicator, Alert, View, Text, StyleSheet, TextInput, KeyboardAvoidingView, TouchableWithoutFeedback, Keyboard, DeviceEventEmitter, Dimensions, StatusBar, TouchableOpacity, Platform } from 'react-native';
import styles from '../styles/Style_LoginScreen';
import ... |
import React, {useState, useEffect} from 'react';
import { Container, Row, Col, Form} from 'react-bootstrap'
import DataSource from '../data/mattressses'
import ProductCard from '../Components/ProductCard';
const Main = (props) =>{
const [filterObj, setFilterObj] = useState({thickness:0, priceSort:"", priceHigh:"... |
/*jslint white:true, this:true*/
"use strict";
var customModel = angular.module('Model', ["ngRoute",'aStatusBar'])
//var wizard = angular.module('wizard', ["ngRoute"])
.controller('CustomModels', ['$scope', function ($scope) {
// Declare a variable to store the current ProjectID
var c_projectID;
// .c... |
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.definePrope... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { StyleSheet } from 'quantum'
import { buy } from '../actions/cart'
import { Modal, Header, Body, Footer } from 'bypass/ui/modal'
import { ColumnLayout, RowLayout, Layout } from 'bypass/ui/layout'
import { Checkbox } from 'bypass/ui/c... |
/*
* Copyright (C) 2021 Radix IoT LLC. All rights reserved.
*/
import angular from 'angular';
import EventTarget from '../classes/EventTarget';
/**
* @ngdoc service
* @name ngMangoServices.maEventManager
*
* @description
* REPLACE
*
* # Usage
*
* <pre prettyprint-mode="javascript">
REPLACE
* <... |
function addme(e1,e2,e3,e4,c1){
var res = document.createElement("div")
res.setAttribute("class","row")
res.innerHTML = `<div class="col-3"><p>${e1}</p></div>
<div class="col-3"><p>${e2}</p></div>
<div class="col-3"><p>${e3}</p></div>
<div class="col-3 ${c1}"><p>${e4}</p></div>`;
return res... |
const logger = require('../../logger');
const productService = require('../../services/product');
async function add(req, res, next) {
logger.log("GET ADD PRODUCT");
var result = {};
try {
result.payload = await productService.add(req.body);
result.status = true;
result.message = 'o... |
(function () {
if (typeof Snake === "undefined") {
window.Snake = {};
}
var View = window.Snake.View = function (board, $el) {
this.board = board;
this.bindListeners();
var that = this;
setInterval(function () {
that.step();
}, 500);
};
View.prototype.step = function () {
t... |
import {
FETCH_USER_PENDING,
FETCH_USER_FUFILLED,
FETCH_USER_REJECTED,
CLEAR_LOGIN_ERROR,
VERIFY_JWT_TOKEN_SUCCESS,
VERIFY_JWT_TOKEN_FAIL
} from "../types";
const defaultState = {
user : {},
loading: false,
disabled: false,
isLoading : true, //hide app content until jwt is verif... |
var joinValidate = {
// 결과 메세지 출력시 사용하는 Text
resultCode : {
empty_val : {
code : 1,
desc : '필수입력 정보입니다.'
},
// ID
empty_id : {
code : 2,
desc : '공백 없이 3~15자의 영문/숫자 또는 ,_를 조합하여 입력'
},
invalid_id : {
code : 3,
desc : '3~15자의 영문/숫자 또는 ,_를 조합하여 입력'
},
length_id : {
code : 4,
desc... |
const s = "baabaa";
const solution = (s) => {
const stack = [];
for (let i = 0; i < s.length; i++) {
if (stack.length === 0 || stack[stack.length - 1] !== s[i]) {
stack.push(s[i]);
} else {
stack.pop();
}
}
if (stack.length === 0) {
return 1;
}
return 0;
};
console.log(soluti... |
const blessed = require('blessed');
const HUD = {
screen: null,
objects: {
arbTable: null
},
headers: {
arb: ['Trade', 'Profit', 'AB Age', 'BC Age', 'CA Age', 'Age']
},
initScreen() {
if (HUD.screen) return;
HUD.screen = blessed.screen({
smartCSR: t... |
/**
* Authors: Diego Ceresuela, Luis Jesús Pellicer, Raúl Piracés.
* Date: 16-05-2016
* Name file: data.controller.js
* Description: This file contains functions that attends endpoints of the resource "data".
*/
(function () {
'use strict';
var mongoose = require('mongoose');
var http = require('http'... |
import { message } from 'antd';
import { find } from '../services/userList';
export default {
namespace: 'userList',
state: {
isLoading: false,
listData: {
list: [],
pagination: {
currentPage: 1,
pageSize: 10,
},
},
... |
import React, { Component } from 'react';
const style = {
topic : {
paddingTop : 10
},
info : {
paddingBottom : 20,
paddingLeft : 10,
paddingRight : 10
}
}
class Desc extends Component {
render(){
return (
<div className='description'>
<h1 style={style.topic}> React Search ... |
define([
"ember",
"text!templates/settings.html.hbs",
"gui/fileselect"
], function( Ember, Template, guiFileselect ) {
return Ember.View.extend({
template: Ember.Handlebars.compile( Template ),
tagName: "main",
classNames: [ "content", "content-settings" ],
didInsertElement: function() {
guiFileselect(... |
let audios;
let keys;
const className = 'active';
const allowedKeys = ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'];
window.addEventListener('load', () => {
audios = document.querySelectorAll('.audio');
keys = document.querySelectorAll('.key');
keys.forEach((key, index) => {
key.addEventListener('click', () => {... |
const Pessoa = require('./Pessoa')
class Arquiteto extends Pessoa
{
constructor(nome,sexo,anoExperiencia)
{
super(nome,sexo)
this.anoExperiencia = anoExperiencia;
}
getAnoExperiencia() { return this.anoExperiencia}
setAnoExperiencia(anoExperiencia) { this.anoExperiencia = anoExperie... |
import mongoose from 'mongoose';
import softDelete from 'mongoose-softdelete'
import mongoosePaginate from 'mongoose-paginate-v2';
import uniqueValidator from 'mongoose-unique-validator';
const Schema = mongoose.Schema
const RoleSchema = new Schema({
name: { type: String, unique : true, required : true, index: tru... |
var React = require("react");
var YouTube = require('react-youtube');
var Video = React.createClass({
render: function () {
var opts = {
height: '390',
width: '640',
playerVars: { // https://developers.google.com/youtube/player_parameters
autoplay: 1
}
};
return (
... |
import { ref } from 'config/constants'
function saveToDucks (duck) {
// const duckId = ref.database().ref('ducks').push().key()
// const duckPromise = ref.database.ref(`ducks/${duckId}`).set({...duck, duckId})
// return {
// duckId,
// duckPromise,
// }
// var newPostKey = firebase.database().ref()... |
console.log('Hola');
Momento = new Date();
dia= document.getElementById('diaS').innerHTML= momento.getMinutes();
|
import React from 'react';
import PropTypes from 'prop-types';
import AddImageComp from './AddImageComp';
import '../styles/flashcard.css';
import Client from './Client';
import done from '../img/buttons/done_FFFFFF.png';
import english from '../img/buttons/english_FFFFFF.png';
import spanish from '../img/buttons/spani... |
import React, { useState } from 'react';
import './App.css';
import Person from './Person.js';
const Appl = props => {
const [personState,setPersonState] = useState({
person:[
{"name":"sai","age":34},
{"name":"sudha","age":33},
{"name":"sidhu","age":14}
]
})
const swi... |
const Styles = () => (
<style jsx="true">{`
.boost-publisher-container {
height: 100%;
width: 100vw;
background: rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
position: fixed;
bottom: 0;
}
.boost-publisher-grow {
flex-grow: 1;
}
.boost-publisher-wrapper {
display: fle... |
import React, { Component } from 'react'
import { func } from 'prop-types'
import { View } from '../Native'
import { Icon, Layout } from 'antd'
import { TabBar } from 'antd-mobile'
import { translate } from 'react-i18next'
import { Shop } from '../../pages/shop'
import { IconButton } from '../IconButton'
import { Setti... |
import { INIT_STATE } from '../store';
import { countReducer } from './documents';
export default function rootReducer(state = INIT_STATE, action) {
return {
docCount: countReducer(state.docCount, action),
};
}
|
import React, {Component} from 'react';
import {
StyleSheet,
Animated,
View,
Text,
SafeAreaView,
PanResponder,
} from 'react-native';
import Svg, {Path, Circle, Rect, Image} from 'react-native-svg';
import ModelView from 'react-native-gl-model-view';
const AnimatedModelView = Animated.createAnimatedCompon... |
import React, { Component } from 'react';
//import logo from './logo.svg';
import Workshops from './components/Workshopsm'
import './App.css';
import Axios from 'axios';
import { withStyles } from '@material-ui/core/styles';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
/... |
(function ( $ ) {
/*
*
*
*/
$.fn.validCpfCnpj = function(options){
//Opções
var settings = $.extend({
cpfOrCnpj: 'all', // cpf , cnpj
removeMask :false
}, options );
var obj = $(this);
obj.focusout(function() {
... |
export const Purpose = [
'Education Expenses',
'EMI Payment',
'Business Loan Or Interest Payment',
'Medical Expenses',
'Professional Services',
'Rent Payment',
'Repai And Maintenance',
'Salary',
'Utility Payments',
'Other',
];
export const Relation = [
'Spouse',
'Mother',
'Father',
'Brother... |
import Taro, { Component } from '@tarojs/taro'
import dayjs from 'dayjs'
import { connect } from '@tarojs/redux'
import { View, Button, Text, Input, Picker } from '@tarojs/components'
import { AtList, AtListItem, AtIcon, AtButton } from 'taro-ui'
import { OrderCell } from '../../../components/OrderCell'
import './index... |
var _api = require("../../../utils/api.js");
var _api2 = _interopRequireDefault(_api);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Component({
/**
* 组件的属性列表
*/
properties: {
sdCollege: {
type: Array,
val... |
import './shared.js';
import Vue from 'vue';
import Meals from './vue/Meals.vue';
const MealsComponent = Vue.extend(Meals);
import 'select2';
import 'select2/dist/css/select2.css';
console.log($(document));
$(document).ready(function () {
$("#inputGroupName").select2({
data: groupNames,
minimumResultsForSearch:... |
var app = angular.module('myApp', []).
controller('eventController', function ($scope) {
var technologies = [
{name : 'C#', like: 0, offsets: 0, dislike: 0},
{name : 'ASP', like: 0, offsets: 0, dislike: 0},
{name : 'JS', like: 0, offsets: 0, dislike: 0},
{name : 'Java', like: 0, offsets:... |
import React from 'react';
import { Table, Icon } from 'antd';
const columns = [{
title: '序号',
dataIndex: 'id',
key: 'id',
}, {
title: '购买日期',
dataIndex: 'buyTime',
key: 'buyTime',
}, {
title: '有效期至',
dataIndex: 'validEndTime',
key: 'validEndTime',
}, {
title: '剩余次数',
dataIndex: 'lastCount',
... |
/**
* Auteur: christopher
* Date: 23/11/2016
*/
$(function () {
// Mise à disposition des villes du formulaire
$('select[name="city_fk"]').select2({
ajax: {
url: '/services/GetCityService.php',
dataType: 'json',
data: function (params) {
var query ... |
const { Model } = require('objection')
var environment = process.env.NODE_ENV || 'development'
var config = require('./../knexfile')[environment]
const Knex = require('knex')(config)
Model.knex(Knex);
class BaseModel extends Model {
static get modelPaths() {
return [__dirname];
}
$parseDatabaseJs... |
import { combineReducers } from 'redux';
import userReducer from './userReducer';
import demoReducer from './demoReducer';
import postPageReducer from './pages/postReducer';
import postModelReducer from './models/postReducer';
export default combineReducers({
user: userReducer,
postPage: postPageReducer,
p... |
import React, { useState, useEffect } from 'react';
import './loader.css';
const HorizontalLoader = ({ loading }) => {
const color = '#FFCC00';
const initial = 0;
const target = 100;
const duration = 2000;
// horizontal loader custom hook
const useProgress = (initial, target, duration) => {
const [pro... |
import Vue from 'vue';
import App from '@/App';
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import VueRouter from 'vue-router';
import { mount } from '@vue/test-utils';
Vue.use(ElementUI);
Vue.use(Vuex);
Vue.use(VueRouter);
describe('App.vue', () => {
let store;
const router = new VueRouter();
... |
// dup
// two sum
// transpose
var array = [1,2,3];
var dup = function(array) {
var new_array = [];
for (var i=0; i<array.length; i++) {
new_array[i] = array[i];
}
return new_array;
};
var uniq = function(array) {
var new_array = [];
for(var i = 0; i < array.length; i++) {
var found = false;
... |
// 添加合同
import PageConst from './PageConst';
export default {
defaults(props) {
//初始的state
return {
reminderTime_0: '',
reminderTime_1: '',
reminderTime_2: '',
reminderTime_3: '',
reminderTime_4: '',
reminderTime_5: '',
... |
import test from "tape"
import { last } from "./last"
test("last", t => {
t.equals(last([1, 2, 3]), 3, "Get last element from n array")
t.equals(last([1]), 1, "Get last element of an 1 array")
t.equals(last("xyz"), "z", "From string should return last char")
t.equals(last([]), undefined, "Get last element ... |
// TODO: Include packages needed for this application
const inquirer = require('inquirer');
const fs = require('fs');
const generateMarkdown = require('./utils/generateMarkdown');
// const generateMarkdown = require('./utils/generateMarkdown');
//console.log("Hey")
// TODO: Create an array of questions for user input
c... |
/**
* Created by StarkX on 08-Apr-18.
*/
const model = require('./model');
module.exports = {
getAccessToken : model.Token.getAccessToken,
getAuthorizationCode : model.AuthCode.getCode,
getClient : model.AuthClient.getClient,
getRefreshToken : model.Token.getRefreshToken,
getUser : model.User.get... |
var { defaultVal, getType } = require("./TypeUtils");
test("defaultVal", () => {
expect(() => defaultVal(1)).toThrow("Type must be a string.");
expect(defaultVal("boolean")).toBe(false);
let defFun = defaultVal("function");
expect(defFun).toBeInstanceOf(Function);
expect(defFun).not.toThrow();
expect(defaultVal(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.