text stringlengths 7 3.69M |
|---|
module.exports = {
future: {
// removeDeprecatedGapUtilities: true,
// purgeLayersByDefault: true,
},
purge: [
'src/**/*.js',
'src/**/*.jsx',
'src/**/*.ts',
'src/**/*.tsx',
'public/**/*.html'
],
theme: {
fontSize: {
base: '1.4rem',
h1: '6.8rem',
h2: '4.5rem',... |
function Blackberry() {
return "This is the blackberry page";
}
export default Blackberry;
|
var express = require("express");
var router = express.Router();
var axios = require("axios");
var fxml_url = "http://flightxml.flightaware.com/json/FlightXML3/";
var username = "YOURUSERNAME";
var apiKey = "YOURAPI";
var restclient = require("restler");
/* GET weaTHERR. */
router.get("/weather", function(req, res, ne... |
var skills = ["HTML", "CSS", "JAVASCRIPT", "MONGODB", "MONGOOSE", "JQUERY", "RUBY", "RAILS"];
window.onload = function(skills ) {
for(var i = skills.length; i < skills.length; i++) {
document.getElementById("little").style.write(i);
}
};
|
export default class EventEmitter{
constructor(){
this.__events = {}
}
on( eventName , eventListener ){
if( this.__events[eventName] ){
this.__events[eventName].push( eventListener )
return
}
this.__events[eventName] = [ eventListener ]
}
of... |
import { combineReducers } from 'redux';
import loading from './LoadingReducer';
import error from './ErrorReducer';
import user from './UserReducer';
const rootReducer = combineReducers({
loading,
error,
user,
});
export default rootReducer;
|
/**
* Clear all the entries
* Create a new-entry event
* Make date dynamic
*
*
* ERRORS:
* Make Date static (to stay after having recorded the new entry of the day) : HOPEFULLY FIXED (have to fix LS first)
* HOw to read entries: you have to create a data structure. Every entry will have its title, entry and d... |
//document.getElementById('date').innerHTML = new Date().toDateString();
$(document).ready(function(){
$("#hide").click(function(){
$("#image3").hide();
});
$("#show").click(function(){
$(".image").show();
});
});
$(document).keydown(function(e) {
switch (e.which) {
case 37:
$("#i... |
import React ,{Component} from 'react';
import './style.css';
class FinishedItem extends Component{
render(){
let toDoFinished = this.props.toDo;
return(
<div className="FinishedItem">
<div className="itemFinished" >
<span>{toDoFinished.index}.</sp... |
import { compose, withApollo } from 'react-apollo'
import Component from './MediaManager.component'
import query from '../../../apollo/queries/medias'
import OrgQuery from '../../../apollo/queries/organization'
import { withRouter } from 'next/router'
let ExportComponent = Component
ExportComponent = compose(query, ... |
function millisecondsFrom({ minutes, seconds, milliseconds }) {
let time = minutes;
time *= 60;
time += seconds;
time *= 1000;
time += milliseconds;
return time;
}
export function after({ minutes = 0, seconds = 0, milliseconds = 0 }) {
return new Promise((resolve) => {
window.setTimeout(
resolv... |
import React, { useState, useEffect, Fragment, useRef } from "react";
import queryString from "query-string";
import { Redirect } from "react-router-dom";
import {
validateEmail,
validateUsername,
validateFirstName,
validateLastName,
validatePassword,
validatePicture
} from "../../validation/val... |
function nodeReducer(state = [], action) {
switch (action.type) {
case 'ADD_NODE':
let name = action.node.name,
node = state.find(node => node.name === name);
if (typeof node !== 'undefined')
throw `Node with given name '${name}' already exists`;
... |
import React from "react";
import _ from "lodash";
import { TwitterTweetEmbed } from "react-twitter-embed";
import tweets from "../utils/pokemon/tweets.js";
import tweetId from "../utils/pokemon/tweetId.js";
export function Card(props) {
const card = {
maxWidth: "500px",
minWidth: "220px",
borderRadius:... |
;(function ($) {
$(function () {
});
$('a').click(function(){
$('html, body').animate({
scrollTop: $('[name="' + $.attr(this, 'href').substr(1) + '"]').offset().top
}, 1000);
return false;
});
$('.parallax-window').parallax({imageSrc: 'images/kyiv.jpg'}... |
/*
* @Author: AlexiXiang
* @Date: 2018-12-04 10:21:22
* @LastEditors: AlexiXiang
* @LastEditTime: 2018-12-04 10:23:19
* @Description: 云函数调用的封装
*/
const app = getApp()
function cloudApi(fnName, data = {}, config = {}) {
return wx.cloud.callFunction({
name: fnName,
data: {
env: app.g... |
console.log('main');
const divValores = document.querySelector('div.valores');
const divMedia = document.querySelector('div.media');
const divMenor = document.querySelector('div.menor');
const divMaior = document.querySelector('div.maior');
const divAmplitude = document.querySelector('div.amplitude');
const divMediana ... |
import CONFIG from "web.config";
import MasterPage from "components/website/master/MasterPage";
import { useRouter } from "next/router";
import Header from "components/website/elements/Header";
import { BS } from "components/diginext/elements/Splitters";
import BannerAboutUs from "components/website/pages/about-us/sect... |
app.factory('JobService',function($http){
var jobService={}
jobService.createJob=function(job)
{
console.log("job service")
return $http.post("http://localhost:8010/Project2Backend/savejob",job)
}
jobService.getAllJobs=function(){
return $http.get("http://localhost:8010/Project2Backend/getalljobs"... |
import CharactersService from "../services/characters.service";
import router from "../router";
const state = {
characters: {},
};
const getters = {
fetchCharacters: (state) => {
return state.characters
},
};
const actions = {
async fetchCharacters( {commit} ) {
try {
cons... |
/**
* @module :: Routes
* @description :: Maps routes and actions
*/
var User = require('../models/user.js');
var Comment = require('../models/comment.js');
var Track = require('../models/track.js');
var Rating = require('../models/rating.js');
var Mix = require('../models/mix.js');
module.exports = fu... |
//check if the dom content already loaded or not
document.addEventListener('DOMContentLoaded', () => {
const cardArray = [
{
id: 1,
name: 'css',
img: 'src/img/css.png'
},
{
id: 2,
name: 'graphql',
img: 'src/img/graphql.png'
},
{
id: 3,
name: 'html',... |
const mongoose = require("mongoose")
const {ObjectId}=mongoose.Schema.Types
// we are creating a relation between user and the post so getting the objecId
const postSchema = new mongoose.Schema({
title:{
type:String,
required:true
},
body:{
type:String,
required:true
},
... |
/*global define*/
define([
'underscore',
'backbone',
'models/publication'
], function (_, Backbone, PublicationModel) {
'use strict';
var PublicationCollection = Backbone.Collection.extend({
url: function () {
var url = App.BaseUrl + '?json=get_posts&post_type=publication';
if ( this.author ) {
url =... |
const quizCard = document.querySelector('#quizCard')
const resultCard = document.querySelector('#resultCard')
const titleCard = document.querySelector('#titleCard')
const startBtn = document.querySelector('#startBtn')
const quizImgs = document.querySelectorAll('#quizForm img');
const quizForm = document.querySelector(... |
// pages/post/posts/posts.js
const { $Message } = require('../../../dist/base/index');
var util = require('../../../utils/util.js');
var api = require('../../../config/api.js');
var user = require('../../../utils/user.js');
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
showRigh2: false,
visib... |
const fs = require('fs')
const googleStorage = require('@google-cloud/storage')
// const gcsHelpers = require('../helpers/google-cloud-storage')
const GOOGLE_CLOUD_PROJECT_ID = process.env.PROJECT_ID
const GOOGLE_CLOUD_KEYFILE = process.env.CLOUD_KEYFILE
const storage = new googleStorage.Storage({
projectId: GOOG... |
import React, { Component } from "react";
import Router from "next/router";
import moment from "moment";
import _ from "lodash";
import withAuth from "../libs/withAuth";
import CordaService from "../services/CordaService";
import StandardService from "~/services/StandardService";
import Layout from "../components/Layo... |
const Theme = {
colors: {
cinza: '#bdbdbd',
},
};
export default Theme;
|
const path = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies
const tsImportPluginFactory = require('ts-import-plugin');
const CSSLoader = {
test: /\.css$/,
// exclude: /node_modules/,
use: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
options:... |
const { mergeSort } = require("./mergeSort");
describe("mergeSort", () => {
const unorderedNumbers = [6, 5, 3, 1, 8, 7, 2, 4];
it("should sort numbers into ascending order", () => {
expect(mergeSort(unorderedNumbers)).toEqual([1, 2, 3, 4, 5, 6, 7, 8]);
});
});
|
import React, { useContext, createContext, useState } from "react";
import { useHistory, useLocation } from "react-router-dom";
import axios from "axios";
import logo from "../../src/images/child.png";
import Cookies from 'universal-cookie';
import swal from 'sweetalert';
const authContext = createContext();
functio... |
import '../styles/index.scss';
const proxyurl = 'https://cors-anywhere.herokuapp.com/',
apiKey = '6958609d-7fcc-44ef-8996-71ea12a520e9',
start = 1,
limit = 50,
url = `https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest?CMC_PRO_API_KEY=${apiKey}&start=${start}&limit=${limit}&convert=USD`;
const... |
module.exports.isAllow = function (req,iss,rules) {
try {
// Is are iss valid and have a rules for him. Else unauthorized.
if (req.user.iss !==iss || !rules[iss]){return false}
// If have no direct route rule then use "*" route
const route = (rules[iss].allowed[r... |
// 驳回原因
require('./PageRebutinfo.less');
import logic from './PageLogic';
import { Component, LogicRender } from 'refast';
import {
Checkbox,
InputItem,
TextareaItem,
SearchBar
} from 'antd-mobile';
import { createForm } from 'rc-form';
import mydingready from './../../dings/mydingready';
import momen... |
import * as React from 'react';
import useControl, {useFinalControl} from '../src';
import {mapSetter} from '../src/transform';
function Counter({control}) {
const useState = useFinalControl(control);
const [total, setTotal] = useState('total', 0);
return (
<div>
<span> {total} </span>
<button o... |
import mix from "@vestergaard-company/js-mixin";
import Command from "./abstract/Command.js";
import AriaChecked from "../attributes/aria-checked.js";
/**
* A checkable input in a group of elements with the same role,
* only one of which can be checked at a time.
*
* @extends Command
* @mixes AriaChecked
* @exa... |
import CharacterSkill from './CharacterSkill';
export default baseClass => {
return class SkillsMixedIn extends baseClass {
constructor(props) {
if (!props) {
props = {};
}
super(props);
this._initSkills(props.skills);
}
/* -... |
/**
* @author Guilherme Nogueira <[email protected]>
*/
import React, { Component, PropTypes } from 'react'
import { LinkContainer } from 'react-router-bootstrap'
import FontAwesome from 'react-fontawesome'
import {
Col,
Alert,
HelpBlock,
Button,
ButtonGroup,
Panel,
Form,
Checkbox,
For... |
'use strict';
const Marionette = require('backbone.marionette');
module.exports = Marionette.AppRouter.extend({
appRoutes: {
'register(/:method)': 'register',
profile: 'profile',
index: 'main'
}
});
|
$(document).ready(function(){
$('#btnSubmit').on('click', function(){
var searchValue = $('#inputSeach').val();
$('#inputSeach').val('')
getCity(searchValue)
});
});
function getCity(searchValue){
$.ajax({
url: `https://developers.zomato.com/api/v2.1/locations?query=${sear... |
import React, { Component } from 'react';
import Particles from 'react-particles-js';
import './App.css';
import Header from './components/Header/Header';
import SearchBar from './components/SearchBar/SearchBar';
import Timeline from './components/Timeline/Timeline';
const particlesOptions = {
particles: {
num... |
import React, { PropTypes } from 'react';
import styles from './ScheduleTable.module.scss';
import cssModules from 'react-css-modules';
import {
Table,
TableBody,
TableHeader,
TableHeaderColumn,
TableRow,
TableRowColumn
} from 'material-ui/Table';
import moment from 'moment';
const parseTime = (t) =>
mom... |
const Sequelize = require('sequelize')
const sequelize = require('../../database/database')
const Ponto = sequelize.define('ponto', {
matricula: {
type: Sequelize.STRING,
allowNull: false
},
tipo: {
type: Sequelize.STRING,
allowNull: false
},
data: {
type: Sequelize.DATEONLY,
allowNu... |
import { useEffect, useState } from 'react'
import { Link } from "react-router-dom";
import Support from '../components/Support';
import "./Home.css";
export default function Supports() {
const date = new Date().getFullYear();
const [supports, setSupports] = useState([]);
const getSupports = async () => {
... |
// # Learning Resource
// ## index.js (Questions)
// Imports the required dependencies.
const _ = require('lodash');
const { AMQP_URL } = require('./config');
const questionRouter = require('./router');
const questionProcessor = require('./processor');
const AmqpLib = require('simple-amqplib-wrapper');
const amqp = ... |
import React, {PureComponent} from 'react';
import TextField from 'material-ui/TextField';
class TodoInput extends PureComponent {
componentWillReceiveProps ({editingTodo: {name = ''}}) {
this.input.value = name;
this.input.focus();
}
render () {
console.log('render TodoInput');
... |
import React from 'react'
import PropTypes from 'prop-types'
import styles from './ListItem.module.scss'
import ListMessage from './ListMessage'
const icon = {
droid: 'fab fa-android',
human: 'fas fa-user-circle',
}
const ListItem = (props) => {
const {
item: {
name,
height,
mass,
ge... |
import {Map, fromJS} from 'immutable';
export const INIT_STATE = Map({
email: null,
id: null,
pending: false,
error: false
});
export const actionType = {
FETCH_USER_PENDING : 'FETCH_USER_PENDING',
FETCH_USER_FULFILLED : 'FETCH_USER_FULFILLED',
FETCH_USER_REJECTED : 'FETCH_USER_REJECTED',
CLEAR_USER_ERROR ... |
/*
* @class StackManagerView
* @extends Backbone.View
*/
var StackManagerView = Backbone.View.extend({
tagName: 'li',
className: 'stack-manager-list',
initialize: function(options) {
this.listenTo(this.model, 'change', this.render);
},
events: {
'click input.js-archive': 'archive',
'click input.js-unarchi... |
const accounts = [
{ name: '@VersaAgency', id: 'versaagency', tweets: [], amount: 30 },
{ name: '@RainAgency', id: 'rainagency', tweets: [], amount: 30 },
{ name: '@alexadevs', id: 'alexadevs', tweets: [], amount: 30 }
];
export default accounts; |
import React, { useRef } from "react";
import axios from "axios";
export default function Login(props) {
const username = useRef(null);
const password = useRef(null);
const login = e => {
e.preventDefault();
axios
.post("http://localhost:4500/api/login", {
username: username.current.value,... |
angular.module('starter.tiquetesFactoria', [])
.factory('tiquetesFactoria', function($http) {
// Might use a resource here that returns a JSON array
// Some fake testing data
var tiquetes;
function cargarFactoria(valor){
tiquetes = valor;
}
return {
all: function() {
return tiquetes;
... |
import React from "react";
import PropTypes from "prop-types";
import Banner from "../Banner";
import styles from "./Banners.module.css";
const Banners = ({ banners }) => {
return (
<section className={styles.banners}>
<h2 className="visually-hidden">Promo Banners</h2>
<ul className={styles.banners... |
function UserParamsValidate(req, res, next) {
const { username, password, email } = req.body;
if ((username && typeof (username) === 'string' && username.length > 5)
|| (email && typeof (email) === 'string' && email.length > 8)) {
if (password && typeof (password) === 'string' && password.length > 6) {... |
var React = require('react');
var Router = require('react-router');
var Navigation = Router.Navigation;
var ReactBootstrap = require('react-bootstrap');
var Row = ReactBootstrap.Row;
var Col = ReactBootstrap.Col;
var Button = ReactBootstrap.Button;
var Alert = ReactBootstrap.Alert;
function getHomePage(UserStore, Us... |
const { expect } = require("chai");
const supertest = require("supertest");
const logger = require("../../src/config/logger");
let TEST_URL = "https://gorest.co.in/public-api";
const request = supertest(TEST_URL);
describe("User test suite", () => {
it("should POST /users", (done) => {
const data = {
emai... |
/**
* IMPORTANT NOTE:
* Please do not use Logical Operators such as && and || which breaks the functionality in Windows8 Device.
*
* @author: Amit Gharat <[email protected]>
* @modified: 29th July 2013
* @modified: 5th August 2013
*/
function getAbsolutePath(url) {
if ("unknown" == DetectBrowser()) {
... |
OC.L10N.register(
"federatedfilesharing",
{
"Federated sharing" : "Partekatze federatua",
"Add to your ownCloud" : "Gehitu zure ownCloud-era",
"Invalid Federated Cloud ID" : "Hodei Federatu ID baliogabea",
"Sharing %s failed, because this item is already shared with %s" : "%s elkarbanatzeak huts... |
const fs = require('fs')
const argv = require('./argv')
const Configuration = require('./configuration/Configuration')
const lib = require('../lib')
function makeObtainOptions (args, config) {
const options = {
artifactName: args.artifact
}
if (!args.ignoreLocal) {
options.useLocalRepository = true
... |
var secret = require("../secret")
var config = require("../config")
var httpUtil = require('../interface/httpUtil')
var moment = require('moment')
var dbUtils = require('../mongoSkin/mongoUtils.js')
var userCollection= new dbUtils("user")
var async = require('async')
var MD5 = require("crypto-js/md5")
var redisClient =... |
import React from 'react';
import PropTypes from 'prop-types';
import * as Highcharts from 'highcharts';
import HighchartsMore from 'highcharts/highcharts-more';
Highcharts.setOptions({
global: {
useUTC: false
},
lang: {
noData: 'No Data'
},
credits: {
enabled: false
}
});
HighchartsMore(Highc... |
import { makeActionCreator } from '../../../utils/helpers/redux';
const USER_FORGOT_PASSWORD_REQUEST = 'forgot-password/USER_FORGOT_PASSWORD_REQUEST';
const USER_FORGOT_PASSWORD_RESPONSE = 'forgot-password/USER_FORGOT_PASSWORD_RESPONSE';
const CLEAR_STATE = 'forgot-password/CLEAR_STATE';
export const userForgotPasswo... |
const mongoose = require('mongoose');
const bcrypt = require('bcrypt');
const SALT_I = 10;
require('dotenv').config();
const adminSchema = mongoose.Schema(
{
email: {
type: String,
trim: true,
unique: 1
},
password: {
type: String,
trim: true
},
role: {
type: ... |
/**
* Created by a88u on 2016/12/9.
*/
// 力导向图,机构基金页面
var tree_force_option_nonode = {
title: {
show: false,
text: '',
x: 'right',
y: 'bottom'
},
tooltip: {
trigger: 'item',
formatter: function (data) {
//var result="hh:";
//for(var... |
import { useState, useEffect } from 'react';
import { useDispatch, useSelector } from "react-redux";
import { Form, Select, Input, Button } from 'antd'
import NumberFormat from "react-number-format";
import DetailExpense from '../../assets/icons/detail-expense.png'
import YourExpense from '../../assets/icons/your-expen... |
import React, { Component } from 'react';
import {Link,Redirect} from 'react-router-dom';
import './Body.css';
class Body extends Component{
constructor(){
super();
this.state={
purpose:'instamo',
amount:0
}
}
// handler to check amount is more... |
import firebase, {db} from '../firebase'
export default function LogIn() {
return new Promise((resolve, reject) => {
var provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(provider).then(result => {
console.log(result.user.displayName)
resolv... |
define("gui", ["expose"], function(expose){
var _main,
_synchIcon,
_loginName;
function init(main){
_main = main;
_synchIcon = $("#synch")[0];
_loginName = $("#loginName");
$("#loginForm").on("submit", onPlayClicked);
$("a[href=#play]").on("click", onPlayClicked);
$("a[href=#login]").on("click... |
import staffData from '../../helpers/data/staffsData';
import staffBuilder from '../staffBuilder/staffBuilder';
const deleteStaffMember = (e) => {
const staffMemberId = e.target.id;
staffData.deleteStaffCard(staffMemberId)
.then(() => {
staffBuilder.printStaffCards();
})
.catch((error) => console... |
const fs = require('fs')
var db = require('./mongoCollections')
var Picture_DB = db.collection_picture()
function getExtensionOfFilename(filename) {
var _fileLen = filename.length;
var _lastDot = filename.lastIndexOf('.');
var _fileExt = filename.substring(_lastDot, _fileLen).toLowerCase();
return _fil... |
import { SET_USER } from '../actions'
const initialState = {}
export default function modal(state = initialState, action) {
switch(action.type) {
case SET_USER:
return Object.assign({}, state, action.user)
default:
return state
}
}
|
(function () {
'use strict';
var myApp = angular.module("list"); //Music corresponds to the module//
myApp.controller("dataControl", function($scope, $http,$window) { //Scope defines variables that can be accessed through HTML//
//data on songs
$http.get("getlists.php")
.then(function(response){
$scope.d... |
import firebase from 'firebase';
export default function FirebaseInstance() {
if (firebase.apps.length === 0) {
// Configure Firebase.
const config = {
apiKey: 'AIzaSyASs_Hf1R0pib5FErgK-4nTGYWnxvTU5JY',
authDomain: 'triberelations-94f8c.firebaseapp.com',
projectI... |
export default {
verifiCode: null, // 验证码
shuldLoginFormShow: false,
loginFormType: 'login', // <'login'|'regist'|'authentication_student'|'authentication_teacher'|'authentication_company'>
userInfo: {}, // 用户信息
isShowSave: true,
isLogin: false, // 是否登录
mobilePhone: '', // 注册手机号码
password: '', // 注册密码
... |
import React from "react";
import { AppSidebarWrapper } from "../styles/base";
import uuid from "uuid";
import ProjectTree from "./ProjectTree";
import { connect } from "react-redux";
import { importProject } from "../actions/projectActions";
class AppSidebar extends React.Component {
handleClick = e => {
e.prev... |
import React from 'react'
import { connect } from 'react-redux'
import { Field, reduxForm } from 'redux-form'
import { transactionRequest } from './actions.js'
import settings from './../../util/settings.js'
const submit = (data, state, props)=>{
props.transactionRequest(data)
}
const SimpleForm = (props) => {
con... |
var delay;
var editor;
var codeviewReadyDelay;
var preview;
var previewFrame;
function updatePreview() {
if (document.getElementById('preview')) {
var previewFrame = document.getElementById('preview');
var preview = previewFrame.conte... |
import Vue from 'vue';
import { ApolloClient } from 'apollo-client'
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory'
import VueApollo from 'vue-apollo';
const httpLink = new HttpLink({
// You should use an absolute URL here
uri: 'http://localhost:4000/graphql',... |
module.exports = function(source) {
this.cacheable();
return source.replace(/{{(?:[\S\s])*?\n((?:[\S\s])*?\n)*?[\s\S]*?}}/mg, '');
};
|
import React from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image,
TouchableOpacity,
Button,
ImageBackground
} from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import auth from '@react-native-firebase/auth';
import { createStackNavigator ... |
var submit = document.getElementById("submitButton");
//var assignmentGrade = 0.0;
//var groupProjectGrade = 0.0;
//var quizGrade = 0.0;
//var examGrade = 0.0;
//var intexGrade = 0.0;
//var totalGrade = 0.0;
submit.addEventListener("click", function () {
var assignmentGrade = parseInt(document.getElementById("As... |
var authorizeButton = null;
var signoutButton = null;
var eventList = [];
function handleClientLoad() {
// Loads the client library and the auth2 library together for efficiency.
// Loading the auth2 library is optional here since `gapi.client.init` function will load
// it if not already loaded. Loading it upfr... |
/**
Core script to handle the entire layout and base functions
**/
'use strict';
var App = function () {
return {
//main function to initiate template pages
init: function () {
}
}
}();
/* initizalize common actions */
function init(entity){
$.fn.dataTable.ext.errMode = 'thro... |
"use strict";
exports.__esModule = true;
var YahooAdapter = /** @class */ (function () {
function YahooAdapter(destinatario, fecha, yahoo) {
this.yahoo = yahoo;
this.destinatario = destinatario;
this.fecha = fecha;
}
YahooAdapter.prototype.enviar = function (titulo, mensaje) {
... |
module("Movie App Unit Tests", {
setup: function () {
},
teardown: function () {
}
});
test("Verify We Have movieApp with expected members", function () {
//basic sainty assertions to know members are present
isFunction(movieapp, "movieapp object should exist");
isFunction(mo... |
import * as actions from './action';
import {resetForm} from "../../../functions/serialize";
const initialState = {
registered: false,
register_error: false,
register_error_cause: [],
};
export default (state = initialState, {payload, type}) => {
switch (type) {
case actions.REGISTER_FAILED:
return ... |
import React, { PureComponent } from "react";
import { Button, DialogContainer } from "react-md";
export default class SimpleModal extends PureComponent {
state = { visible: false };
show = () => {
this.setState({ visible: true });
};
hide = () => {
this.setState({ visible: false });
};
render()... |
import Vue from 'vue'
import vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
Vue.use(vuex)
const state = {
songlist:[],
musiclist:[],
// 当前播放音乐的信息
plaingsong:{},
//存取排行所有信息
ranklist:[],
//存储当前播放mvli列表
mvlist:[],
userinfo:{},
userdetail:{},
//存储个人的音乐列表... |
export const getRedirectUri = () => {
if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {
return 'http://localhost:3000/app';
} else {
return 'https://moodify.benmiz.com/app';
}
};
export const login = () => {
const CLIENT_ID = process.env.REACT_APP_CLIENT_ID;
const scope = 'user-r... |
function relay(){
console.log("This is relay function");
}
function shortjump(){
console.log("This is shortjump function");
}
module.exports.relay = relay |
// eslint-disable-next-line no-restricted-imports
import ko from 'knockout';
import variableWrapper from '../../core/utils/variable_wrapper';
if (ko) {
variableWrapper.inject({
isWrapped: ko.isObservable,
isWritableWrapped: ko.isWritableObservable,
wrap: ko.observable,
unwrap: function unwrap(value) ... |
window.onload = function () {
show(0);
}
let questions = [
{
id: 1,
question: "What is the capital of USA?",
answer: "Washington, D.C.",
options: [
"New York",
"Chicago",
"Washington, D.C.",
"Las Vegas"
]
},
{
... |
var fs = require('fs');
var data = "Some data i want to write to a file";
fs.writeFile('file.txt',data,function(err){
if(!err){
console.log('Wrote to the file');
}else{
throw err;
}
});
|
// Write a function to alphabetize words of a given string. Alphabetizing a string means rearranging the letters so they are sorted from A to Z.
// "Republic Of Serbia" -> "Rbceilpu Of Sabeir"
function alphabetizeString(string){
var result = "";
var newStr = "";
var sorted;
newStr = string.split(" ");
//co... |
import React, {Component} from "react";
export class Tabs extends Component {
constructor(props) {
super(props);
this.state={
activeIndex:props.activeIndex
}
}
TabsChange = (event,index)=>{
event.preventDefault()
this.setState({
activeIndex:i... |
var currentState,
width,
height,
frames = 0,
theBird,
theCacti,
textAndButtonContainer,
rowOneText,
rowTwoText,
theButton,
theScore = 0;
var states = {
splash: 0,
game: 1,
score: 2
};
var canvas,
renderingContext
function CactusGroup()
{
this.col... |
import React, { useState, useEffect } from "react";
import { useHistory } from "react-router-dom";
import { Col, Row, Layout } from "antd";
import ContentWrapper from "../atoms/ContentWraper";
import FooterWrapper from "../atoms/FooterWrapper";
import MenuItem from "../molecules/MenuItem";
import Logo from "../molecule... |
/**
* Clients Slider
*/
import React, { Component } from "react";
import Slider from "react-slick";
// api
import api from 'Api';
export default class Clientslider extends Component {
state = {
clients: null
}
componentDidMount() {
this.getClients();
}
// get clients
getClients() {
api.ge... |
import React, { Component } from 'react';
import { Text, View,StyleSheet,Image,ScrollView,TouchableOpacity,SafeAreaView,TouchableWithoutFeedback } from 'react-native';
import { time_red, check, uncheck, back_arrow,invite, location, calendar_red, time, scanner } from '../../assets/icons/index';
import { event_image, re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.