text stringlengths 7 3.69M |
|---|
import { Form, Input, Button, Checkbox } from "antd";
import { connect } from "react-redux";
import { Addcontact } from "../redux-store/actions/actions";
function AddContact(props) {
const onFinish = (values) => {
console.log("Success:", values);
props.addcontact({ ...values, id: Date.now() }); //{name:"Paya... |
/**
** engine.js
** sets up event handlers and runs the main game loop
**/
//globals
const Direction = {"up": 1, "down": 2, "right": 3, "left": 4}; //Direction enum
var dir; //current direction snake is travelling
var startButton = document.getElementById("start-button");
(function() {
var canvas = document.getElem... |
JCL_firebase.setup({
DB_DOMAIN:"grdigital-com"
});
function googleLogin(){
var nextURL = document.referrer || "/";
$(document).ready(function(){
JCL_firebase.googleLogin(function(user){
console.log(user);
window.top.location = nextURL;
},function(error){
console.log(error);
});
});
... |
import React, {Component} from 'react';
import {findDOMNode} from 'react-dom';
import {connect} from 'react-redux';
import {setAddDialogOpen, setActiveDetail, setDetailDialogOpen, setFilterSettingsOpen} from '../redux/actions';
import {getAllAlbums} from '../redux/selectors';
import styles from './albums-list.scss';
... |
$(function () {
//메인메뉴
$('.mainmenu>li').mouseover(function () {
$('.mainnav').css('backgroundColor', 'white');
$('.mainnav').css('border-bottom', '1px solid #eee');
$('.mainmenu>li>a').css('color', 'black');
$('.subnav').show();
$('#logo img').attr('src', 'logo.pn... |
Polymer({
is: "iron-autogrow-textarea",
behaviors: [Polymer.IronFormElementBehavior, Polymer.IronValidatableBehavior, Polymer.IronControlState],
properties: {
bindValue: {
observer: "_bindValueChanged",
type: String
},
rows: {
type: Number,
... |
[{"locale": "es"}, {
"key": "2190",
"mappings": {"default": {"default": "flecha izquierda"}},
"category": "Sm"
}, {"key": "2191", "mappings": {"default": {"default": "flecha arriba"}}, "category": "Sm"}, {
"key": "2192",
"mappings": {"default": {"default": "flecha derecha", "defaultMP": "flecha"}},
... |
try {
require('../../config/env');
} catch (err) {
require('dotenv').config();
}
const jsonServer = require('json-server');
const path = require('path');
const fs = require('fs');
const { MOCK_SERVER_PORT } = process.env;
const server = jsonServer.create();
const router = jsonServer.router(path.join(__dirname, '... |
(function () {
"use strict";
const TEXT_COLOR = "rgb(50, 50, 50)";
const CRITICAL_TEXT_COLOR = "rgb(200, 50, 50)";
const CRITICAL_COUNTDOWN_THRESHOLD = 5000;
class CountdownDrawer extends Drawer {
_draw(countdown) {
this.context.font = "20px impact";
this.context.f... |
const albumID = 'jgv3Zpc';
const albumUrl = "https://api.imgur.com/3/album/" + albumID + "/images";
window.onload = function (e) {
getData(albumUrl).then(
data => {
renderImageAPI("category__list", data.data)
}
)
}
async function getData(url = "") {
const rep = await fetch(url... |
import tw from 'tailwind-styled-components'
/** */
export const StyledIntroCoTwoLiner = tw.div`
col-span-2
` |
import React from 'react';
import Layout from '../../components/Layout';
import ProjectRoll from '../../components/ProjectRoll';
import classes from './projects.module.scss';
import Helmet from 'react-helmet';
import PageTransition from 'gatsby-plugin-page-transitions';
const ProjectPage = () => {
return (
<Lay... |
cssPubSub.subscribe("heart_container","color");
|
'use strict';
app.controller('AnalyticsCtrl', function ($scope, factAnalytics, $timeout) {
console.log ('AnalyticsCtrl');
$scope.selectedwebsite;
$scope.loadpages = function (pagedata) {
console.log('loadpages: started "loadpages"');
console.log('loadpages: pagedata: ' + JSON.stringify(pagedata));
... |
import { combineReducers } from 'redux';
export const context_act = {
SONG_EDIT_C: "SONG_EDIT_C",
SONG_BURGER_C: "SONG_BURGER_C",
PLAYLIST_BURGER_C: "PLAYLIST_BURGER_C",
CLOSE_CONTEXT: "CLOSE_CONTEXT",
SELECT_PLAYLIST_C: "SELECT_PLAYLIST_C",
PLAYLIST_EDIT_C: "PLAYLIST_EDIT_C",
NEW_PLAYLIST: 'NEW_PLAYLIST... |
steal('jquery/class')
.then(function($){
$.Class('TechStudio.JmvcExtensions.Lang.Looper',
/* @static */
{
},
/* @prototype */
{
init: function(loopTime, callbackToLoop) {
this.loopTime = loopTime;
this.callbackToLoop = callbackToLoop;
},
start : function(){
this.looper();
... |
function ClimateChange(year, carbonDioxide, globalTemp, iceSheets, seaLevel) {
this.year = year;
this.carbonDioxide = carbonDioxide;
this.globalTemp = globalTemp;
this.iceSheets = iceSheets;
this.seaLevel = seaLevel;
}
const Y2017 = new ClimateChange(2017, 406.17, 0.95, -1915.45, 43.8);
const Y2016 = new ClimateC... |
if (App == null || typeof App != "object") {
var App = new Object();
}
//set globals
const d = document;
let personName,
bkImg,
canvas,
ctx,
ctxTitle = "Happy Halloween!",
titleHeight = 0,
titleAnimation,
nameWidth = 0,
nameHeight = 0;
App.Submit = function () {
personName = d.getElementById("name").value;
... |
import React, { useState } from 'react';
import { useSelector } from 'react-redux';
import {
Form,
Input,
Button,
DatePicker,
InputNumber,
Switch,
Modal
} from 'antd';
import moment from 'moment';
import { useFormik } from 'formik';
import movieApi from 'apis/movieApi';
import './AddMovie.sc... |
import Immutable from 'seamless-immutable'
export default function combineColorOptions(options, placeholder) {
/* eslint-disable prefer-const */
let colorOptions = Immutable.asMutable(options)
/* eslint-enable prefer-const */
colorOptions.unshift(placeholder)
return colorOptions
}
|
import { mutations } from './mutations';
describe('@/store/supportChat/mutations', () => {
const state = {
chat: '',
};
const chat = '<script>sample data</script>';
it('SET_SUPPORT_CHAT', () => {
mutations.SET_SUPPORT_CHAT(state, chat);
expect(state.chat).toEqual(chat);
});
});
|
const storeTolocal=()=>{
let name=document.getElementById("name").value;
let email=document.getElementById("email").value;
let org=document.getElementById("org").value;
let flag =0;
if(localStorage.length>0){
Object.keys(localStorage).forEach((key)=>{
if(email == key){
alert("sorry u... |
/* @flow */
import Clogy from './main/Clogy';
import type { ClogyType } from './globalFlowTypes';
const clogy: ClogyType = new Clogy();
export default clogy;
// Because of Babel@6
// Can use plugin: https://www.npmjs.com/package/babel-plugin-add-module-exports
// Used this soln. instead:
// http://stackoverflow.co... |
module.exports = {
users: require("./users"),
bills: require('./bills'),
categories: require('./categories'),
customers: require('./customers'),
products: require('./products')
};
|
import React from 'react';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';
import ListSubheader from '@material-ui/core/ListSubheader';
import Avatar from '@material-ui/core/Avatar';
import strings from "../strings... |
export default class AnaliticsCounter {
constructor(category) {
this.category = category;
this.categoryStored = this.getCategory();
}
getCategory() {
return localStorage.getItem(this.category)
? JSON.parse(localStorage.getItem(this.category))
: {};
}
saveCategory() {
localStorage... |
const mongoose = require('mongoose');
const passport = require('passport');
const Score = mongoose.model('Score');
exports.homePage = (req, res) => {
res.render('index');
};
exports.aboutPage = (req, res) => {
res.render('about');
};
exports.quizPage = async (req, res) => {
let quiz = null;
if (req.user) {
... |
var counter=0;var num = 0;
var TIV3335=function(){
var Array_of_Images = [];
return {
loadImages:function(){
var files = document.getElementById("images").files;
for (var i = 0; i < files.length; i++) {
var file = files[i];
if (file.name.match(... |
function setSelection(range) {
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
}
/**
* @mixin
*/
let Selection = (superclass) => class Selection extends superclass {
/**
* Selects everything in the text control.
* @name Selection#select
*/
select() {
this.s... |
/* @flow */
import React from 'react';
import type { Element } from 'react';
import Times from '../times/Times';
type Props = {
first: () => ?Element<*>,
second: () => ?Element<*>,
container?: React$ElementType,
className?: ?string,
id?: ?string,
};
// eslint-disable-next-line object-curly-spacing
export ... |
//Stampa le potenze di 2 fino a 1000
var base = 2;
var esponente = 10;
var risultato = 1;
for (var i = 0; i < esponente; i++) {
//console.log(i);
risultato = risultato * base;
console.log(risultato);
}
|
// YOUR TASK: Add more pictures!
var pictures = ['./imgs/dog.jpg',"./imgs/1.jpg","./imgs/2.jpg","./imgs/3,jpg","./imgs/4.jpg","./imgs/5.jpg" ];
var currentIndex = 0;
function showNextPicture() {
var img = getElementsByTagName("img")[0];
currentIndex++; // increment current picture
// if currentIndex is too large... |
// NewItemForm.jsx
import React from 'react';
import AppDispatcher from '../dispatcher/AppDispatcher';
class NewItemForm extends React.Component {
createItem(e){
// so we don't reload the page
e.preventDefault();
// create ID
let id = guid();
// this gets the value from the input
... |
import { connect } from 'react-redux'
import * as evidencesActions from '../reducers/entities/evidences'
import * as updatesFeedActions from '../reducers/ui/updates-feed'
import * as evidencesSelector from '../selectors/entities/evidences'
import * as updatesFeedSelector from '../selectors/ui/updates-feed'
import { F... |
/// <reference path="jquery-3.1.1.js" />
/// <reference path="config.js" />
/// <reference path="state.js" />
/// <reference path="scene.js" />
var App = function(scene) {
this.scene = scene;
this.state = new State();
this.timeoutId = 0;
this.randomize = function() {
this.state = StateFactory.... |
export default {
secret: "herman-secret-key",
};
|
const uuidv4 = require('uuid/v4')
exports.seed = function(knex, Promise) {
// Deletes ALL existing entries
return knex('user').del()
.then(function () {
// Inserts seed entries
return knex('user').insert([
{id: uuidv4(), name: 'root', email: '[email protected]'},
{id: uuidv4(), name: '... |
function get_content() {
$.post(base_url+'/partials/dashboard_button', function(template, textStatus, xhr) {
$('#main').html(template);
abre_pulsador();
});
}
var pulsador=false;
function abre_pulsador () {
pulsador = window.open(base_url+'/button', "PedirTaxi", "location=0,status=0,scrol... |
import React from "react";
import FileBase64 from "react-file-base64";
import axios from "axios";
// import ImageUploader from 'react-images-upload';
import Toggle from 'react-toggle';
import "react-toggle/style.css"
class Pixupload extends React.Component {
constructor(props) {
super(props);
this.... |
$('document').ready(function() {
var width = 1000,
height = 600,
linkDistance = 50, //approximate distance between nodes
charge = -150; //the repulsion between nodes
//for the sprite images, which can't be handled well in svg
var container = d3.select('.container')
.style('width', width +... |
import dotenv from 'dotenv';
import model from '../db/models';
import processToken from '../helpers/processToken';
const { Users } = model;
dotenv.config();
/**
* User Information are saved here
*/
class UserInfo {
/**
*
* @param {Object} req
* @param {Object} res
* @returns {Object} response after u... |
generateMarkdown = answers => {
const {username,
email,
name,
description,
url,
role,
goal,
reason,
license,
installation,
usage} = answers;
const badge = license.replace(/\s/g, '%20');
... |
function createModal(header, content) {
if (header == "" || header == null) {
var modal = $("<div class = 'modal'><span id = 'close'>✖</span>"+content+"</div>");
var filter = $("<div class = 'filter'></div>");
filter.appendTo($("body")).css({
position:"fixed",
top:0,
left:0,
... |
import { useEffect, useState } from 'react'
import ReactApexChart from 'react-apexcharts';
import { chartOptions } from './chart-config';
import { clone } from 'lodash';
const CityAqiChart = ({ cityName, dataPoints }) => {
const [series, setSeries] = useState([]);
const [options, setOptions] = useState({});
us... |
'use strict';
var mongoose = require('mongoose');
var Shout = mongoose.model('Shout');
module.exports = function(app) {
// List shouts
app.get('/api/shouts', function(req, res) {
Shout
.find()
.exec(function (err, shouts) {
if(err) {
console.log(err);
}
res.json(shouts);
... |
export default {
white: '#fff',
black: '#212121',
primary: '#37474F',
offWhite: '#ECEFF1',
secondary: '#607D8B',
gray: '#777',
overlay: 'rgba(0,0,0, .5)'
}
|
var postsData = require('../../data/data.js')
Page({
/**
* 页面的初始数据
*/
data: {
},
onPostTap: function (event) {
var postId = event.currentTarget.dataset.postid;
wx: wx.navigateTo({
url: 'post-detail/post-detail?id=' + postId
})
},
swiperTap(event) {
var postId = event.currentTar... |
import React, { useEffect } from 'react';
import useStorage from '../../StorageHook/useStorage';
import { motion } from 'framer-motion';
import db from "../../Firebase";
import "./Profile.css"
const ProgressBar = ({ file, setFile,setPhoto,friends,id}) => {
const { progress, url } = useStorage(file);
useEffect(() ... |
// aqiScaleTools.js
import { parseScale } from './charts';
const POLLUTANTS = ['aqi', 'pm2.5', 'pm10', 'no2', 'o3', 'so2', 'co'];
const WEATHER_VARIABLES = ['rh', 'temp', 'wspeed', 'wdir']
export default {
POLLUTANTS,
WEATHER_VARIABLES,
normalizePollutantId: normalizePollutantId,
extraChecks: extraCh... |
/**
* Created by gautam on 19/12/16.
*/
import React from 'react';
import ActivityHeader from './ActivityHeader';
import ActivityFooter from './ActivityFooter';
import TopNotification from './TopNotification';
import { browserHistory } from 'react-router';
import $ from 'jquery';
import Base from './base/Base';
impor... |
this.x = 9;
var module = {
x: 81,
getX: function() {
//return this.x;
console.log(this.x);
}
};
module.getX(); // 81
var getX = module.getX;
getX(); // 9, because in this case, "this" refers to the global object
// Create a new function with 'this' bound to module
var boundGetX = getX.bind(module);
... |
import favouritesReducer from './favouritesReducer';
import { addFavourites, delFavourites } from '../action';
const addNotNewVacancies = {
id: '421871bb-05d3-4fbe-b00c-3f372fa35584',
title: 'Javascript Engineer',
url: 'https://jobs.github.com/positions/421871bb-05d3-4fbe-b00c-3f372fa35584',
};
const addNewVaca... |
import { SPACE_FETCHED } from "../actions/spaceActions";
const initialState = null;
export default function spaceReducer(state = initialState, action) {
switch (action.type) {
case SPACE_FETCHED: {
return action.payload;
}
default: {
return state;
}
}
}
|
import css from 'styled-jsx/css'
export default css`
.text-effect {
transform: translateX(-50%);
display: inline-block;
position: relative;
transition: transform 0.4s ease-out;
animation-delay: .5s;
animation-duration: 1s;
animation-name: textEffect;
animation-fill-mode: forwards;
animation-timing-f... |
// :style="{width: width + 'px'}"
Vue.component('yt-menu', {
template: `
<div id='frameMenu' style="height: 100%; display: flex; flex-direction: column; "
:style="{width: width + 'px'}">
<div v-if="smallScreen" id="headerMenu" :style="{background: '#2d8cf0',
'display': 'flex', 'fle... |
// @flow strict
import * as React from 'react';
import { Translation, DateFormatter } from '@kiwicom/mobile-localization';
type Props = {|
+boardingPassAvailableDate: Date | null,
+boardingPassUrl: ?string,
|};
export default function PastBookingInformation({
boardingPassAvailableDate,
boardingPassUrl,
}: Pr... |
import React, { Component } from 'react'
import enzyme, { shallow } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import renderer from 'react-test-renderer'
import Member from './Member'
import { Text, View, Image } from 'react-native'
enzyme.configure({ adapter: new Adapter()})
let wrapper
let data
b... |
const formats = [{
regex: /\*([^\*]+)\*/,
replacer: function (m, p1) {
return "%c" + p1 + "%c";
},
styles: function () {
return ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', ''];
}
}, {
regex: /\_([^\_]+)\_/,
replacer: function (m, p1) {
return "%c"... |
/* ********
* Requires
* ********/
// Chrome
var ChromeConstants = require("./xul-manager/chrome-constants.js").ChromeConstants;
// SDK
let Preferences = require('sdk/preferences/service');
var data = require("sdk/self").data;
// Bugzilla libraries
var User = require('./user').User;
var BugManager = require("./bug-... |
/* Admin view of edit/delete buttons for single item */
import React, { Component } from "react";
import PropTypes from "prop-types";
import Link from "next/link";
import Title from "../styles/Title";
import ProductStyles from "../styles/ItemStyles";
import PriceTag from "../styles/PriceTag";
import formatMoney from ... |
import React, { Component } from 'react';
import axios from 'axios';
import moment from 'moment';
class Edit extends Component{
constructor(){
super();
this.state = {
task: {}
}
}
componentDidMount(){
console.log(this.props)
const tid = this.props.match.... |
var express = require('express');
var router = express.Router();
var shareDao = require('../dao/shareDao');
var recommendDao = require('../dao/recommendDao');
var utils = require('../util/utils');
var util = require('util');
var setting = require('../config/setting');
/* 播放接口 */
router.get('/getShare', function (req,... |
var touch = require('touch')
var path = require('path')
var fs = require('fs')
module.exports = editTestFile
function editTestFile (directory, opts, done) {
if (!opts.hasTest) return done()
var file = path.resolve(directory, 'test.js')
var base = path.resolve(__dirname, 'test.base.js')
var circleFile = path.... |
import React,{useState} from 'react'
import {FaCamera} from "react-icons/fa"
import {ContextProvider} from "../Global/Context"
const Create = () => {
const {create, loader, user}= React.useContext(ContextProvider)
const[title, setTitle]=useState('');
const[image, setImage]=useState('');
const handleIma... |
let arraySrc = new Array(1, 2, 3, 3, 33, 4 , 5, 5, 5, 5, 6, 6);
let result1 = arraySrc.find(num => num > 3);
let result2 = arraySrc.filter(num => num > 3);
//可以看出来find仅仅是返回一个元素
console.log(result1);
console.log(result2);
let objList = [
{
name: "顾世豪",
sex: "男"
},
{
... |
import React, { Component } from 'react';
import { View, Text, StyleSheet, Image, TouchableOpacity } from 'react-native';
import { Icon, Button } from 'react-native-elements';
import { Actions } from 'react-native-router-flux';
import { joinPublicGroup, joinPrivateGroup } from '../../services/apiActions';
export clas... |
const http = require('http');
const fs = require('fs');
let server = http.createServer((req, res) => {
console.log('Yo! The request was made: ' + req.url);
//If user visits localhost:3000 or localhost:3000/home
//then respond (serve up) with the index.html file.
if(req.url === '/home' || req.url === '/') {
... |
export { PieChartIcon } from "./PieChartIcon";
export { BarChartIcon } from "./BarChartIcon";
export { LineChartIcon } from "./LineChartIcon"; |
//Punto 1
function secret(mensaje, tipo, num){
let retorno = []
mensaje.forEach(x => {
if (tipo === "encrypt"){
let elem = Number(x)+ Number(num)
console.log(elem)
retorno.push(elem)
}else{
... |
// @flow
import React, { Component, Fragment } from "react";
import { connect } from "react-redux";
import {
type AsyncStatusType,
type NotificationType,
} from "shared/types/General";
import Layout from "components/inventoryLayout";
import Button from "components/button";
import Loader from "components/loader";
i... |
TextInput = React.createClass({
onKeyDown: function(e){
if(e.keyCode == 13){
this.save();
//this.setState({editing: false})
}
},
//componentDidMount: function(){
// React.findDOMNode(this.refs.fieldName).select();
//},
save: function(e){
Celestial.updateItem(this.props,
th... |
exports.command = function (selector, value) {
return this.clearValue(selector)
.setValue(selector, value)
.trigger(selector, 'keyup', 13)
} |
Scoped.define("module:VideoPlayer.Dynamics.Loader", [
"dynamics:Dynamic",
"module:Templates",
"module:Assets"
], function (Class, Templates, Assets, scoped) {
return Class.extend({scoped: scoped}, function (inherited) {
return {
template: Templates.video_player_loader,
attrs: {
"css": "... |
let routes = function (router) {
let controller = {
"/home": "./user/home.js",
};
// 此时步骤,加入了处理函数。
for (x in controller) {
router.use(x, require(controller[x]));
}
};
module.exports = routes;
|
const addContext = require('mochawesome/addContext');
const reportLogger = require('../../e2e/support/reportLogger');
class SoftAssert {
constructor(testContext) {
this.testContext = testContext;
this.assertCount = 0;
this.isPassed = true;
this.assertions = [];
this.scenarios = [];
this.scena... |
// import React from 'react';
// import ReactDOM from 'react-dom';
// import './index.css';
// import App from './App';
// import registerServiceWorker from './registerServiceWorker';
// ReactDOM.render(<App />, document.getElementById('root'));
// registerServiceWorker();
import { createStore } from 'redux'
import {... |
const gameCardCopy = {
en: {
DESCRIPTION: "Displaying quantity of total games.",
BUTTON: "Load more"
},
kr: {
DESCRIPTION: "total 개의 게임 중 quantity 개를 표시합니다.",
BUTTON: "더로드"
},
ch: {
DESCRIPTION: "顯示total個遊戲中的quantity個。",
BUTTON: "裝載更多"
},
jp: {
DESCRIPTION: "totalゲーム中quantityゲー... |
"use strict";
// Gulp dev.
var gulp = require('gulp');
var watch = require('gulp-watch');
var config = require('./gulp_tasks/config');
var plugins = require('gulp-load-plugins')();
var runSequence = require('run-sequence');
var exec = require('child_process').exec;
function tasks(task, options) {
return require('... |
const fs = require('fs');
const mode = process.argv[2];
const dir = process.argv[3];
// create html for Sophie's web galleries
// how to use:
// $ node index.js work ~/Pictures/etc
// $ node index.js news ~/Pictures/etc
fs.readdir(dir, function(err, data) {
if (err) {
return err;
}
let dirString = (mo... |
var Event = function(sender) {
this._sender = sender;
this._listeners = [];
}
Event.prototype.attach = function(listener) {
this._listeners.push(listener)
};
Event.prototype.notify = function(args) {
for (var i = 0; i < this._listeners.length; i++) {
this._listeners[i](args);
}... |
import React from 'react';
import Grid from '@material-ui/core/Grid';
import PropTypes from 'prop-types';
const ErrorNotification = ({ error }) => (
<Grid container justify="center">
<h1>Ой, что-то пошло не так: {error}</h1>
</Grid>
);
ErrorNotification.propTypes = {
error: PropTypes.string.isRequired,
};
... |
import { describe, it } from 'vitest';
import { shallowMount } from '@vue/test-utils';
import config from '../../../helpers/config.js'
import reportCategoriesFromRouteMixin from '../reportCategoriesFromRouteMixin.js';
const mountComponentWithQuery = (component, query) => shallowMount(component, {
global: {
... |
$.ajaxPrefilter(function(ops){
ops.url = 'http://api-breakingnews-web.itheima.net'+ops.url;
if(ops.url.indexOf('/my') !== -1){
ops.headers = {
Authorization: localStorage.getItem('token') || ''
}
}
ops.complete = function(res) {
if(res.responseJSON.status === 1 && r... |
import React, {Component} from "react";
class Child extends Component{
constructor(props) {
super(props);
console.log("Demo3.Child: execute constructor");
this.state = {
msg: 'this is child component.'
};
}
static getDerivedStateFromProps(props, state){
... |
/**
* @license
* Copyright 2014 David Wolverton
* Available under MIT license <https://raw.githubusercontent.com/dwolverton/my/master/LICENSE.txt>
*/
define([
"exports"
],
function (exports) {
/**
* Returns the whole number beginning of the hour. For example, 11.5 would return 11.
* @param {numbe... |
import { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Auth } from "aws-amplify";
import { loggedInSet } from '../redux/actions';
class Logout extends Component {
async componentDidMount() {
await Auth.signOut();
const { loggedInSet } = this.pr... |
import StateManager from "./States/StateManager";
import ControlManager from 'Controlers/ControlManager';
/**
* Root game class
*/
export default class Game {
constructor(app) {
this.app = app;
this.stateManager = new StateManager(this);
this.controlManager = new ControlManager();
... |
import ConChartPie from './src/ConChartPie'
/* istanbul ignore next */
ConChartPie.install = function(Vue) {
Vue.component(ConChartPie.name, ConChartPie);
};
export default ConChartPie; |
(function () {
'use strict';
angular
.module('user')
.factory('userFactory', ['$http', 'persistenceFactory', '$window', '$httpParamSerializer', userFactory]);
function userFactory($http, persistence, $window, $httpParamSerializer) {
function getUser() {
var promise = $h... |
/**
* @file Score Class
* @author [email protected]
* @date 2017-09-05
*/
(function () {
function Score(options) {
//
}
var ScoreProto = Score.prototype;
ScoreProto.create = function () {
//
};
ScoreProto.init = function () {
//
};
ScoreProto.update = f... |
var Util = require('../util'),
Base = require('../base');
var transform = Util.prefixStyle("transform");
var transition = Util.prefixStyle("transition");
/**
* An infinity dom-recycled list plugin for xscroll.
* @constructor
* @param {object} cfg
* @param {string} cfg.zoomType choose scroll vertically o... |
import React from "react";
import "../../src/index.css";
const Month = (props) => {
const { month, usersData } = props;
const monthId = month.title;
let listItems = 0;
if (usersData !== "Wait..") {
listItems = usersData.map((oneUserDate) => {
return <li>{`${oneUserDate.firstName} ${oneUserDate.lastN... |
const {Router} = require('express')
const router = Router()
const {
createAuthor,
loginauthor,
getAuthorByBook,
getAuthorById,
UpdateAuthor,
deleteAuthor
} = require('../controllers/authorController')
//route for creating and account
router.post('/api/author',createAuthor)
//route for login
... |
(function(window, _, angular, undefined) {
'use strict';
/**
* @name OnhanhDashboard
* @description DashboardModule
*/
var dashboardModule = angular.module('app.dashboard', []);
'use strict';
/**
* @name OnhanhDashboard
* @description ...
*/
dashboardModule
.config(... |
/* $(function () {
var row = document.getElementsByClassName("afTableRow");
if (row.length === 0){
document.getElementById("afWidgetContainer").hidden = true;
adsElement = document.getElementById("infoJobs")
adsElement.innerText = "";
if (document.documentElement.lang == "en") {... |
/* jshint node: true */
module.exports = function (grunt) {
"use strict";
grunt.loadNpmTasks('grunt-contrib-jasmine')
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
, jasmine: {
src: "src/jquery.ga-event-track.*.js"
, options: {
specs: "spec/*.js"
, vendo... |
var mongo_client = require('mongodb').MongoClient;
var _ = require('underscore');
var config = require('./db_configuration');
var db;
function db_operate(which_callback) {
connecting_string = 'mongodb://' + config.host +':'+ config.port +'/'+ config.db_name;
mongo_client.connect( connecting_string, function(err... |
function sayHello() {
console.log("Hello");
}
sayHello();
var sayBye = function() {
console.log("Bye");
}
sayBye();
function multiply(a, b) {
return a * b;
}
alert(multiply(10, 3)); |
import LikeBtn from "./LikeBtn";
import CommentBtn from "./CommentBtn";
import RepostBtn from "./RepostBtn";
import {DivFlxItmCnt} from "../../../../layout/layout";
const FooterLeftSideBar = props => {
const {likes, comments, reposts} = props
return <DivFlxItmCnt>
<LikeBtn value={likes} />
<Com... |
angular.module('urlService', [])
.factory('Url', function ($http,$location) {
var urlFactory = {};
urlFactory.all = function () {
return $http.get('/api/url');
};
urlFactory.create = function (url) {
return $http.post('/api/url', url);
};
ur... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.