text stringlengths 7 3.69M |
|---|
// Define the `phonecatApp` module
var inobitecApp = angular.module('inobitecApp', ['ngSanitize','ui.mask']);
inobitecApp.directive('onFinishRender', function ($timeout) {
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last === true) {
$timeou... |
import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { check } from 'meteor/check';
import { Logins, Records } from '../../collections/collections.js';
if (Meteor.isServer) {
Meteor.publish('logins', function loginsPublication(user,pw) { // logins collection which is connected to ... |
import React from 'react'
import Image from './Image'
const Result = (props) =>{
return(
<div className='image-container'>
{
props.images.map((image) =>(
<Image
key={image.recipe.label}
image={image.recipe.image}
... |
import React from "react";
import Lottie from "react-lottie";
import animation_data from "../lotties/loading_spinner.json";
const LoadingAnimation = () => {
const defaultOptions = {
loop: true,
autoplay: true,
animationData: animation_data,
};
return (
<div>
<Lottie options={defaultOption... |
'use strict';
import React, { Component,PropTypes } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
Platform,
Animated,
Easing,
Switch,
} from 'react-native';
import { WinStyle } from '../styles/BaseStyle';
import { IconData } from '../styles/IconBase';
//开... |
import PropTypes from 'prop-types';
import React from 'react';
import injectStyles from '@/utils/injectStyles';
import { TYPE } from './constants';
import Arcs from './elements/ArcsBackground';
import styles from './styles';
const SpeedometerChart = ({
className,
minValue,
minValueLabel,
maxValue,
maxValue... |
import express from 'express'
import authDtrl from '../controllers/auth.controller'
const router = express.Router()
router.route('auth/signin')
.post(authCtrl.signin)
router.route('/auth/signout')
.get(authCtrl.signout)
export default router
|
var mergesort = require("../mergesort");
var chai = require("chai");
var expect = chai.expect;
describe ("merge", function(){
it("empty array", function(){
expect(mergesort([])).to.equal("Empty Array");
});
it("simple array", function(){
expect(mergesort([3,2,1],0,2)).to.eql([1,2,3]);... |
var Util = require('./util');
function Node(logicOp, condition) {
this.logicOp = logicOp;
this.condition = condition || null;
this.children = [];
}
function generateTree(arr) {
var node = null;
if(!arr && arr.length === 0) {
return node;
}
if(arr[0].toLowerCase() === 'and... |
import React, { Component } from 'react';
import myData from '../data/stock-data.json'
class Home extends Component {
constructor(props){
super(props)
}
render() {
return(
<div className="stocks">
<h2>{this.props.name}</h2>
<ul className="stocks-list">
<li>{this.props.symb... |
import {
querySummaryPageConfig,
queryPagelist,
queryDetailPageConfig,
queryDetailPage,
queryRemoveBusiness,
queryTableDelete,
queryDetailSave,
queryDetailEdit,
queryDetailChildSave,
queryTransactionProcess,
queryPagination,
queryAutocomplate,
queryDetailChildPage,
updateFields,
childUpdat... |
import { niceFlash, goodFlash, greatFlash } from '../../anim/animSpeedWordUI';
import GameObject from '../../core/gameObject';
import Script from '../../core/script';
import Render from '../../render';
import speedWordUIScript from './speedWordUIScript';
class SpeedProfilerScript extends Script {
constructor() {
... |
$('#ver_detalle').on('show.bs.modal', function(event) {
let button = $(event.relatedTarget);
$("#procesoventa_id").val(button.data('proceso_venta_id'));
$("#producto_descripcion").val(button.data('producto'));
$("#producto_kilogramos").val(button.data('kilogramos'));
$("#fechasolicitud").val(button... |
import React from 'react';
import styled from 'styled-components';
const Line = styled.hr`
width : 15%;
border-top: 2px solid rgba(0,0,0,.4);
`
const Header = (props) => {
return (
<div className="mt-5 text-center">
<h2>Our {props.category} Collection</h2>
<Line />
... |
$(document).ready(function(){
player=$('#music-player')[0]
$(document).on('click','#play-btn.fa.fa-play',function(){
$('#play-btn.fa.fa-play').removeClass('fa-play').addClass('fa-pause').css('color','#fff')
player.play();
totalTime =player.duration
PlayingTime=setInterval(function(){
var playedtime=(Math... |
import Database from '../../../server'
class Notes extends Database.Model
{
get tableName ()
{
return 'admin_notes'
}
}
module.exports = Notes
|
import React from 'react';
import BG from '../../assets/images/bg.png';
const ProfileHeader = ({ username }) => (
<header
style={{
backgroundImage: `url(${BG})`,
height: 222,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',... |
'use strict';
var edge = require('edge-js');
var express = require('express');
var bodyParser = require('body-parser')
const util = require('util');
var fs = require('fs');
var https = require('https');
var PrintData = require('./src/print_data.js')
var pd = new PrintData()
var app = express();
var cors =... |
const n = 5;
arr1 = [9, 20, 28, 18, 11];
arr2 = [30, 1, 21, 17, 28];
function solution(n, arr1, arr2) {
let answer = [];
for (let i = 0; i < n; i++) {
let temp1 = arr1[i].toString(2);
let temp2 = arr2[i].toString(2);
if (temp1.length < n) {
temp1 = "0".repeat(n - temp1.length) + temp1;
}
... |
objdataAjax = getAjaxObj();
updateAjax = getAjaxObj();
function noBack()
{
window.history.forward();
}
String.prototype.trim = function()
{
var x = this;
x = x.replace(/^\s*(.*)/, "$1");
x = x.replace(/(.*?)\s*$/, "$1");
return x;
}
//Email Validation
function isEmailAddr(email, errMsg)
{
var result = false;... |
import Button from './Button'
import TextyInput from './TextyInput'
import TextArea from './TextArea'
import Repertoire from './Arrays/Repertoire'
import Performances from './Arrays/Performances'
export {
Button,
TextyInput,
TextArea,
Repertoire,
Performances
} |
/* eslint-disable */
const commonConfig = require('@modules/eslint');
module.exports = {
...commonConfig,
}
|
import test from 'ava';
import { getRandomInt } from './jsUtils';
test('should respect lower bound', t => {
t.true(getRandomInt(0, 100) >= 0);
});
test('should respect upper bound', t => {
t.true(getRandomInt(0, 100) <= 100);
});
|
import {
ROLE_ADMINISTRATEUR,
ROLE_ASSISTANCE,
ROLE_GESTIONNAIRE,
} from "actions/constants/roles";
export default (state = {}, action) => {
const { type, payload: roles } = action;
switch (type) {
case ROLE_ADMINISTRATEUR:
return { ...state, roleAdministrateur: roles.split(",") };
case ROLE_AS... |
import React from 'react';
import "./style.css";
function Footer() {
return(
<div className="footerDiv">
<h6 className="footerText">follow</h6>
<h6 className="footerText">Created By: Mathew Bishop, Callie Hart, and Jordan Beaman</h6>
</div>
)
}
export default Footer; |
import {createLocalVue, mount} from '@vue/test-utils'
import {
getQueriesForElement,
logDOM,
waitFor,
fireEvent as dtlFireEvent,
} from '@testing-library/dom'
const mountedWrappers = new Set()
function render(
TestComponent,
{
store = null,
routes = null,
container: customContainer,
baseE... |
'use strict'
const Hash = use('Hash')
const UserHook = module.exports = {}
UserHook.hashPassword = async (model) => {
const dirty = model.dirty
if (dirty.password) {
model.password = await Hash.make(model.password)
}
}
|
if(document.readyState == 'loading'){
document.addEventListener('DOMContentLoaded', start)
} else{
start()
}
function start(){
const quantityInput = document.getElementsByClassName('quantity-input')
for(let i = 0; i < quantityInput.length; i++){
let input = quantityInput[i]... |
import React from 'react';
import Header from './components/Header';
import Footer from './components/Footer';
import Body from './components/Body';
import {View} from 'react-native';
const Post = ({post}) => (
<>
<View>
<Header imageUri={post.user.image} name={post.user.name} />
<Body imageUri={post... |
// localStorage - keeps a user logged in between visits
// sessionStorage (not using) - only keeps token / them logged in during browser session
// creating a new service called authentication
(function() {
angular
.module('journalApp')
.service('authentication', authentication);
authentication.$inject = ['$... |
$(document).ready(function(){
$('#third-question-container').jScrollPane();
});
function completed(goPre){
if(_previewFlag || goPre){
var isRadio = _type.startsWith("RADIO") ? true :false;
if(goPre){
if(confirm("입력한 사항을 취소하시겠습니까?")){
parent.complete3Depth(_itemId,_questionId,isRadio,true);
}
}else{
... |
// Pour obtenir le nombre de MILLISECONDES par une écriture : (2).minutes / (4).weeks
// -----------------------------------------------------------------------------
// Il faut obligatoirement entourer les chiffres par des parenthèses :
// 2.days => produit une erreur
// (2).days => OK
Object.defineProperties(N... |
const favicon = require('koa-favicon')
const path = require('path')
module.exports = function (app, options) {
// 中间件:用来注册在每个请求生命周期的路由之前 在日志、session中间件之后调用
app.middleware(favicon(path.resolve(__dirname, '../public/favicon.ico')))
}
|
import util from '@/libs/util';
import {computeColumnSpanParams, computeSpanMethod} from "./components/column-span-tool"
import dropdownNav from './components/dropdown-nav'
import {computeSumLime} from "./components/data-groupby-tool"
import {findComponentsDownward} from 'view-design/src/utils/assist';
import {deepCopy... |
import { Model, NeuralNetwork } from 'reimprovejs/dist/reimprove';
import { Random } from 'random-js';
import { AvailableAgentAction } from './AgentFactory';
const rng = new Random(Random.browserCrypto);
export const createNetwork = (maxAgents, maxFood) => {
const baseInputShape =
(2 * maxAgents) + // Inputs... |
import React from 'react';
import styled from 'styled-components';
import Card from '../Card';
const Section = styled.section`
display: flex;
flex-flow: row wrap;
`;
const CardContainer = styled.article`
flex: 1 1 30%;
padding: 1rem;
`;
const SearchResult = () => (
<Section>
<CardContainer><Card /></Ca... |
const babelJest = require('babel-jest');
module.exports = babelJest.createTransformer({
presets: [
[
'@babel/preset-env',
{
targets: {
node: 6
}
}
],
[
'@babel/preset-react',
{
'pragma': 'xEngine.h'
}
]
]
});
|
import './Content.css';
import React, {Component} from "react";
import Wrapper from "../Wrapper";
import Aside from "../Aside";
import CommentContainer from "../CommentContainer";
import PostDetails from "../PostDetails";
import Post from "../Post";
export default class Content extends Component {
render() {
... |
import React from 'react';
import PropTypes from 'prop-types';
import { Col } from 'antd';
const Actions = ({ children, size }) => (
<Col span={size}>
{children}
</Col>
);
Actions.defaultProps = {
size: 24,
};
Actions.propTypes = {
children: PropTypes.node.isRequired,
size: PropTypes.number,
};
export... |
let a = "alpha"
let b = "beta"
let c = "Gamma"
console.log(a,b,c)
let operacion = (1/2)*(4*5)-(2**3)
console.log(operacion)
let numero = 9
if (numero >10 ){
console.log(numero/2)
} else {
console.log(numero*2)
}
// console.log(num>10 ? num/2 : num *2) Esto es una ternaria.
let motor = 0
console.log(... |
const SortedObjectCollection = require("./sorted_object_collection");
const equal = require("deep-equal");
class SortedStateSet extends SortedObjectCollection {
constructor() {
super();
}
add(obj) {
if (this.contains(obj)) {
return null;
}
super.add(obj);
return obj;
}
equals(obj1... |
import React, { useState, useEffect }from 'react';
import ReactDom from 'react-dom';
import styles from './index.scss';
const Counter = () => {
const [count, setCount] = useState(0);
useEffect(() => {
console.log('execute every state change.')
});
useEffect(() => {
console.log('execute after render.')
}, []... |
const createError = require('http-errors');
const { Superhero, Image, Superpower } = require('../models');
module.exports.createSuperhero = async (req, res, next) => {
try {
const { body } = req;
const heroPowers = findAll(body, ['superPower']);
const heroImages = findAll(body, ['imagePath']);
const ... |
import React, { useContext } from 'react';
import { StyleSheet, View, ScrollView } from 'react-native';
import { Button, Text, Avatar, ListItem, Icon } from 'react-native-elements';
import { LoginContext } from '../contexts/LoginContext';
import AsyncStorage from '@react-native-community/async-storage'
const storeData... |
'use strict';
/**
* Module dependencies.
*/
const only = require('only');
const { wrap: async } = require('co');
const { respond, respondOrRedirect } = require('../utils');
const { getBranchConditions } = require('../utils/helper');
exports.configure = function (schema, controller) {
return {
... |
import React from 'react';
import {BrowserRouter as Router, Switch, Route} from 'react-router-dom';
import { createTheme, ThemeProvider } from '@material-ui/core/styles';
import Header from './components/Header';
// Main Page
import HomePage from './components/mainPage/HomePage';
// Theme
const theme = createTheme({... |
import ViewerConfig from "@/helpers/ViewerConfig";
import ViewerServiceKerken from "./service/ViewerServiceKerken";
import ViewerServiceKerkenBAG from "./service/ViewerServiceKerkenBAG";
import ViewerWMS from "../service/ViewerWMS";
class KerkConfig extends ViewerConfig {
constructor() {
super();
this.kerk ... |
import axios from 'axios'
const api = axios.create({
baseURL: 'http://localhost:3000/api',
})
export const insertComment = payload => api.post(`/comment`, payload)
export const getAllComments = () => api.get(`/comments`)
const apis = {
insertComment,
getAllComments,
}
export default apis |
/**
* @Summary: short description for the file
* @Date: 2020/6/18 1:33 PM
* @Author: Youth
*/
const area_pool = [
{
pool_channel: 'topn_taiwan_pool',
channel: '台湾地方站',
channel_name: 'news_news_antip',
topn: 'pneumonia_topn_taiwan_pool',
topn_name: '肺炎池_台湾地方站',
type: '地方站',
name: 'taiwa... |
export default {
gap: 'medium',
columnMin: '280px',
breakpoints: {
mobile: 'small',
min: '320px',
small: '480px',
medium: '768px',
large: '992px',
max: '1200px',
},
}
|
/*
* Copyright 2014 Jive Software
*
* 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 l... |
window.onload = function(){
//动态加载商品
var title = decodeURI(location.search).split("?")[1];
$.ajax({
type:"post",
url:"../php/detail.php",
data:{
"name":title
},
success:function(res){
var arr = JSON.parse(res);
var html = "";
html+=`<!--详细信息开始-->
<div class="content container">
<div class=... |
import React from 'react';
import './leftBar.css';
import Grid from '@material-ui/core/Grid';
function LeftBar(props){
return <Grid item className="d-flex LeftBar" md={2}>
<span className="mb-auto mx-auto"> Navigation </span>
</Grid>;
}
export default LeftBar;
|
require('@babel/register')({
ignore: [/node_modules\//],
plugins: ['add-module-exports'],
});
const Router = require('koa-router');
const axios = require('../../utils/axios').default;
const router = new Router();
router.post('/login', async (ctx, next) => {
try {
const res = await axios.post('https://l94wc... |
import React, {Component} from 'react'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import SelectField from 'material-ui/SelectField'
import axios from 'axios'
import localStorage from 'localStorage'
import * as smtpActions from '../../Actions/SMTPActions'
import {AUTH_BASE_URL} from '../../Config... |
// @flow
import { type Action } from "shared/types/ReducerAction";
import {
type AsyncStatusType,
type NotificationType,
} from "shared/types/General";
import { ASYNC_STATUS } from "constants/async";
import {
ASYNC_ORDERS_INIT,
HANDLE_NOTIFICATION,
GET_ORDERS_SUCCESS,
GET_ORDER_SUCCESS,
INIT_ORDERS,
} fr... |
#!/usr/bin/env node
var debug = false
var request = require('request')
var isRestarting = false
var now = Math.floor(new Date() / 1000)
var timeout = (1000 * 60) * 30
var updateCheckInterval = (1000 * 60) * 5
if (debug) {
updateCheckInterval = 5000 // Check every 5 seconds
timeout = 1000 * 60 // Timeout after a ... |
// Strict Mode On (엄격모드)
"use strict";
"use warning";
var SelectUnitPopup = new function() {
var INSTANCE = this;
var callbackfunc;
var focus = 0;
var frameCnt = 0;
var str;
var teamScore;
var isMenu;
var popX = 0, popY = 0;
var selectBox;
var myUnitIconImg;
... |
export default {
home: 'Home',
login: 'Login',
params: 'Params',
task_pool: 'Task Pool',
sys_monitor: 'System Monitor',
data_monitor: 'Data Monitor',
// cache_monitor: 'Cache Monitor',
// equip_monitor: 'Equip Monitor',
// thread_monitor: 'Thread Monitor',
repo:'Repo',
tree_repo:'Sitch Repo',
db... |
import dynamic from 'next/dynamic'
import styles from '../styles/Home.module.css'
import { Container, Row, Col, Navbar, Nav, NavDropdown, Form, FormControl, Button } from 'react-bootstrap'
const MenuBlog = dynamic(() =>
import('../components/MenuBlog').then((mod) => mod.MenuBlog)
)
const TituloBlog = dynamic(()... |
import React from 'react';
import { Modal } from 'antd';
import { useSelector, useDispatch } from 'react-redux';
import { TOGGLE_REGISTER } from '../../actions/types';
import RegisterForm from './RegisterForm';
const index = () => {
const dispatch = useDispatch();
const isVisible = useSelector(state => state.over... |
module.exports = {
mongoURI: process.env.MONGODB_URI,
cookieKey: process.env.COOKIE_KEY,
apiKey: process.env.MASHAPE_KEY,
apiHost: process.env.MASHAPE_HOST,
googleClientID: process.env.GOOGLE_CLIENT_ID,
googleClientSecret: process.env.GOOGLE_CLIENT_SECRET,
googleCallbackURL: process.env.GOOGLE_CALLBACK_UR... |
/**
* Copyright 2016 Google Inc.
*
* 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... |
/* jshint expr: true, quotmark: false */
/* globals it, describe, before, afterEach */
'use strict';
var expect = require('chai').expect;
var nock = require('nock');
var azureQueue = require('../index');
//nock.recorder.rec();
describe('default client', function() {
var client;
before(function(){
client = a... |
//index.js
//获取应用实例
const app = getApp()
Page({
data: {
inputValue: "", //搜索框输入的值
// 页面配置
winWidth: 0,
winHeight: 0,
// tab切换
currentTab: 0,
isHideLoadMore: false,
hasRefesh: false,
hidden: false,
zhinengtuijiandata: [],
jianglizuigaodata: [],
youhuizuidadata: []... |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const style = {
alignItems: 'center',
width: '100vw',
height: '100vh',
display: 'flex',
justifyContent: 'center'
};
ReactDOM.render(... |
(function () {
"use strict";
function GameArea(convasX, convasY, width, height, statusAreaWidth, componentFactory, drawer) {
this.x = convasX;
this.y = convasY;
this.drawer = drawer;
this.width = width;
this.height = height;
this.statusAreaWidth = statusAreaWidth;
this.componentFactory ... |
var inherits = require('util').inherits;
var debug = require('debug')('homebridge-logic');
module.exports = function (Service, Characteristic, CustomCharacteristic, CustomUUID) {
VariableAddTimerService = function(displayName, subtype) {
Service.call(this, displayName, CustomUUID.VariableAddTimerService, subtype);... |
import { connect } from 'react-redux';
import SignUpForm from 'src/components/Pages/SignUpForm';
import {
handleNicknameInput,
handleEmailInput,
handlePasswordInput,
handleSignUpSubmit,
clearSignupState,
} from 'src/store/reducers/user';
const mapStateToProps = (state) => ({
signupSuccessMessage: state.use... |
// allows you create array with already filled elements;
let scores = Array(10).fill(0);
// the have extra perimeters 0,3 = the element from 0 to 3 with the number 10
let scores2 = [10,2,3,4,5].fill(10,0,3);
console.log(scores2)
console.log(scores); |
var MyApp = MyApp || {};
MyApp.wildifePreserveSomulator = function (animalMaker) {
//프라이빗 변수
var animals = [];
return {
addAnimal(species, sex) {
animals.push(animalMaker.make(species, sex));
},
getAnimalCount() {
return animals.length;
}
};
};
M... |
const url = 'http://localhost:3000/todos';
displayTodos();
const addTodoButton = document.querySelector('#addTodoButton');
addTodoButton.addEventListener('click', addTodo);
function getTodos() {
return fetch(url).then((res) => res.json());
}
function addTodo() {
const text = document.querySelector('#todoText').va... |
import { createRouter, createWebHistory } from 'vue-router';
import CoachDetail from './pages/coaches/CoachDetail.vue';
import CoachesList from './pages/coaches/CoachesList.vue';
import CoachRegistration from './pages/coaches/CoachRegistration.vue';
import ContactCoach from './pages/requests/ContactCoach.vue';
import ... |
import {NAME} from './constants';
import saga from './saga';
import {start, TICK, tick} from "./actions";
export default {
NAME,
saga,
start,
TICK,
tick,
};
|
import React, {Component} from 'react'
import Breadcrumb from './Breadcrumb'
import RightNav from './TopNav'
import RepoCharts from './RepoCharts'
import List from './List'
import '../../../stylesheets/finding-repos.css'
export default class Index extends Component {
static contextTypes = {
router: React.PropTyp... |
// Files to cache
var cacheName = 'ginkoCache-v1';
var appShellFiles = [
'',
'index.html',
'app.js',
'style.css',
'icons/favicon.ico',
'icons/icon-32.png',
'icons/icon-64.png',
'icons/icon-96.png',
'icons/icon-128.png',
'icons/icon-168.png',
'icons/icon-192.png',
'icons/icon-256.png',
'icons/i... |
import {
GraphQLObjectType,
GraphQLString,
GraphQLID,
GraphQLList,
} from 'graphql';
import ClassType from './ClassType';
import RaceType from './RaceType';
const ProficiencyType = new GraphQLObjectType({
name: 'Proficiency',
description: 'The class you pick provides you with different proficiencies',
f... |
exports.gen_salt_sync = function(num)
{
return '';
};
exports.encrypt_sync = function(password,salt)
{
return password;
};
exports.compare_sync = function(password,hashedPassword)
{
return password == hashedPassword;
};
|
//3
function hb(hbtn,cssname,offset){
var a,b,c,d;
d=$('.hbtn').offset().top; //元素相对于窗口的距离
console.log(d)
a=eval(d + offset);
b=$(window).scrollTop(); //监控窗口已滚动的距离;
c=$(window).height(); //浏览器窗口的高度
if(b+c>d+200){
$(('.hbtn')).addClass((cssname));
}
... |
TEMP['notify'] = function(air){
window.Notification = window.Notification || window.webkitNotifications;
var notifiesLists=[];
//-------------------------------------notifyDesktop
var Desktoptimeing={};
var notifyND=0;
var notifyDesktop = function(option){
var defaultOptions={
id... |
.pragma library
//血量坐标
/*
var bloodX = 0
var bloodY = 0
var bloodDX = 20
var bloodDy = 20
var Blood = 123
*/
var Z_ShouPai = 10
var Z_Player = 20
var Z_Line = 30
//延时
var Question_Choice_Time = 7000 //问题选择时间
var Question_ShowChoice_Time = 3000 //问题展示时间
var ChuPai_Time = 10000 //出牌时间,不能小于DELAY_TIME_... |
import React, {Component} from 'react';
/* renders chatbar - allows for TAB (preffered),
ENTER or 'click in chatbar-message(onBlur)' to trigger name change event*/
class ChatBar extends Component {
// a local state of username is set until event is triggered
state = { currentUser: this.props.currentUser }
// if us... |
require('./bootstrap');
window.Vue = require('vue');
Vue.component('single-thread', require('./components/Thread.vue').default);
Vue.component('threads', require('./components/Threads.vue').default);
Vue.component('comments', require('./components/Comments.vue').default);
const app = new Vue({
el: '#app',
}); |
import React from 'react';
import BuyWidget from '../portfolio/BuyWidget';
import Allocation from '../portfolio/Allocation'
import { user_portfolio_value, fromStringtoDollar, user_usd_amount, user_ticker_quantity } from '../../util/transactions';
class Trade extends React.Component {
constructor(props){
... |
const fetch = require('node-fetch');
const getSongSource = (songId) => {
return new Promise((resolve, reject) => {
fetch(`http://www.kuwo.cn/url?format=mp3&rid=${songId}&response=url&type=convert_url3&br=128kmp3&from=web`, {
headers: {
cookie: '_ga=GA1.2.1675613707.1589085909; _gid=GA1.2.1099796595... |
import service from './index';
export default {
get(url, data = {}) {
return service({
url: url,
method: 'get',
params: data,
});
},
post(url, data, params) {
return service({
url: url,
method: 'post',
data,
params: params,
});
},
};
|
var fs = require('fs');
var dir1 = 'C:/Users/JUAN JOSE/node/models';
var dir2 = 'C:/Users/JUAN JOSE/node/models/v1';
if(!fs.existsSync(dir1)){
fs.mkdirSync(dir1);
console.log("La primer carpeta se creo de forma correcta");
if(!fs.existsSync(dir2)){
fs.mkdirSync(dir2);
console.log("La segund... |
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const yargs = require('yargs');
const { runUpdatePrompts, runInitPrompts } = require('./run-prompts');
const { checkProjectExists } = require('./helpers');
const pkg = require('../package.json');
const { log } = require('@js-lib/util');
const c... |
//variable which holds the information of the reviewer
var names = [ "Susan Smith","Anna Johnson","Peter Jones","Bill Anderson"];
var job = ["WEB DEVELOPER","WEB DESIGNER","INTERN","THE BOSS"];
var review = ["I'm baby meggings twee health goth +1. Bicycle rights tumeric chartreuse before they sold out chambray pop-up. ... |
import * as actionTypes from "./actions";
import { initialState } from "./initialState";
const reducer = (oldState = initialState, action) => {
switch (action.type) {
case actionTypes.NEW_CHARGE:
return { ...oldState, charge: action.payload };
case actionTypes.LOAD:
return { ...oldState, loading:... |
'use strict';
/* Controllers */
var todosApp = angular.module('todoApp', []);
var siteurl = wnm_custom.site_url;
todosApp.controller('TodoListController', function ( $scope, $http ) {
$scope.getTodos = function () {
$http.get( siteurl + "/wp-json/wp/v2/todo" ).success( function( response ) {
... |
import styled from "styled-components";
const UserInfoTitle = styled.p`
font-weight: bold;
color: ${props => props.theme.userInfo.title.color};
font-size: ${props => props.theme.userInfo.title.size}em;
margin-bottom: ${props => props.theme.userInfo.spacingY}em;
`;
UserInfoTitle.displayName = "UserInfo... |
/*jshint esversion: 6*/
const { Worker, parentPort, workerData } = require("worker_threads");
console.log("Heart Rate data for avg calculation");
const heartRateDataArray = workerData;
// this accepts the accumulator as 0/intial value as 0 and sums with all heartrate values
const heartRateAvg = array => array.reduce((a... |
// Event model
var Event = require("./models/event");
var Miracle = require ("./models/miracle");
var Resource = require ("./models/resource");
module.exports = function(app, passport) {
// Get method
app.get('/', function(req, res) {
console.log('Nemam Amma Bhagavan Sharanam -- Is the user authenticated?' + ... |
import React, {useState } from "react";
import SearchIcon from '@material-ui/icons/Search';
import { connect } from 'react-redux';
import {searchUserMsg} from "../../actions/searchAction"
import { Redirect } from "react-router-dom";
function SearchUserFrom(props) {
let [user, setUser] = useState({});
let han... |
module.exports = {
DB: 'mongodb://obiwan2.univ-brest.fr/OdysseaSpatium'
} |
import ReactDOM from 'react-dom';
import React, { Fragment } from 'react';
import './../base/_base.scss';
import './../pages/cloud-town/_cloud-town.scss';
import CloudTown from './../pages/cloud-town/CloudTown';
import './../header/_header.scss';
import Header from '../header/Header';
ReactDOM.render(
<Fragment... |
const dt = new Date();
const day = dt.getDate();
const month = dt.getMonth();
const year = dt.getFullYear();
const monthName = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
];
const dayButton = document.querySelector(... |
// See src/models/gameState/gameState.ts
|
'use strict';
require('dotenv').config()
const mongoose = require('mongoose')
const Survey = require('../../models/survey');
mongoose.set('useCreateIndex', true);
const uri = process.env.MONGODB_URI;
let question = "What do you call the auxiliary brake that's attached to a rear wheel or the transmission and keeps th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.