text stringlengths 7 3.69M |
|---|
({
getUpcomingEventList: function (component, event, helper) {
var region = window.sessionStorage.getItem("regionStorage");
let regionVal = region;
if (regionVal) {
helper.callServer(
component,
"c.fetchUpcomingLiveEvents",
functio... |
var HP = {
// Login Related: 1000
ERR_1000: {error : 1000, errorMessage: "Cannot login. Wrong userid or password" },
ERR_1101: {error : 1100, errorMessage: "Userid cannot be empty" },
ERR_1102: {error : 1100, errorMessage: "Password cannot be empty. Must be at least 6 characters" },
ERR_1103: {error : 1100, erro... |
var Markov = require('./markov').Markov;
var zlib = require('zlib'),
fs = require('fs');
var path = require('path');
var currentMarkov;
var markovs = {};
var messages = JSON.parse(fs.readFileSync('messages.txt'));
messages.forEach(function(message) {
currentMarkov = getMarkov(message.corpus);
message.subject... |
// Solution 1 using Regex
var defangIPaddr = function(address) {
let regex = /\./g
let ip = address;
ip = ip.replace(regex, "[.]");
return ip;
};
// Solution 2 using string functions
var defangIPaddr2 = function(address) {
let ip = address
ip = ip.split(".").join("[.]")
return ip
}
let ip = "127.0.0.1"... |
import { useEffect } from "react";
import { connect } from "react-redux";
import { Link, useHistory } from "react-router-dom";
import { api_post, load_user } from "./api";
import { load_token } from "./store";
import { Button } from "react-bootstrap";
import Nav from "./Nav";
import moment from "moment";
import Heart f... |
import * as types from '../mutation-types';
import train from '../../api/train';
import cheerio from 'cheerio';
const state = {
// loginInfo: '',
user: {},
list: [],
filterList: [],
from: '',
to: '',
stations: [],
trainTypes: ['G', 'D', 'Z', 'T', 'K'],
};
const getters = {
trainList: state => state.... |
import {ADD_QUANTITY, ADD_QUANTITY_IN_CART, ADD_TO_CART, REMOVE_ITEM, SUB_QUANTITY, SUB_QUANTITY_SINGLE} from "./action-types/cart-actions";
export const addToCart = (addedItems) => {
return (dispatch, getState, {getFirebase, getFirestore}) => {
const firestore = getFirestore();
const profile = get... |
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import TopBar from "../components/TopBar";
import { useNavigation } from "@react-navigation/native";
const Note = () => {
const navigation = useNavigation();
return (
<TopBar
leftIconName="arrow-back-outline"
middleT... |
class GetDetachmentTypeListRequest {
constructor(wargameId) {
this.wargameId = wargameId;
}
} |
import React, { useContext } from "react";
import {
Navbar,
Nav,
Form,
FormControl,
Button,
InputGroup,
} from "react-bootstrap";
import { Link } from "react-router-dom";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faSearch } from "@fortawesome/free-solid-svg-icons";
import Lo... |
// Utilities:
import memoize from 'lodash.memoize';
// Module:
import { FeaturesModule } from '../features.module';
function createStepDeclarationModelConstructor () {
let StepDeclarationModel = function StepDeclarationModel () {
Object.defineProperties(this, {
feature: {
get (... |
import { createMuiTheme } from '@material-ui/core/styles';
const theme = createMuiTheme({
spacing: {
unit: 20
}
});
export default theme
|
import { combineReducers } from 'redux';
import entities from './entities';
import ids from './ids';
import showPrev from './showPrev';
export default combineReducers({
entities,
ids,
showPrev
});
|
import { defineMessages } from 'react-intl';
export const scope = 'app.components.AllAds';
export default defineMessages({
userNotFound: {
id: `${scope}.userNotFound`,
defaultMessage: 'Пользователь не выбран.',
},
information: {
id: `${scope}.information`,
defaultMessage: 'Информация',
},
va... |
import React from 'react'
import { StyleSheet } from 'quantum'
import { Checkbox } from 'bypass/ui/checkbox'
const styles = StyleSheet.create({
self: {
fontSize: '13px',
color: '#333333',
lineHeight: '30px',
paddingLeft: '10px',
cursor: 'pointer',
},
selected: {
background: '#eceff1',
}... |
import { stepfunctions } from '../lib/aws_clients';
export const makeUpdateAwaitCallbackActivityStatus = ({
getLogger,
}) => async function updateAwaitCallbackActivityStatus(
jobExecutionResult,
callbackTaskToken,
) {
const logger = getLogger();
const { status, progress } = jobExecutionResult;
let method;
... |
import React from 'react';
import {connect} from 'react-redux';
import {Switch,Route,withRouter} from 'react-router-dom';
import TestEditorComponent from './component';
import AddQuestionComponent from './add-question-container';
class TestEditorContainer extends React.Component{
render(){
return(
<Switch>
... |
'use strict';
const util = require('util');
const banks = require('../banks');
const tools = require('../tools');
const db = require('../db');
const crypto = require('crypto');
module.exports = Samlink;
function Samlink(bank, fields, charset) {
this.bank = (typeof bank === 'string' ? banks[bank] || banks.ipizza ... |
/* Server Packages */
import Express from 'express';
import bodyParser from 'body-parser';
import cookieParser from 'cookie-parser';
import morgan from 'morgan';
import mongoose from 'mongoose';
import config from './config';
import User from './models/user';
import Recipe from './models/recipe';
/* Client Packages */
... |
//my age variable
const myAge = 29;
//early years that can change
let earlyYears = 2;
earlyYears *= 10.5;
//later yrs
let laterYears = myAge - 2;
laterYears *= 4;
//log early yrs and later yrs
console.log(earlyYears, laterYears);
//age in dog years
const myAgeInDogYears = earlyYears + laterYears;
//my name converted t... |
const foo1 = a && a.b && a.b.c && a.b.c.d;
const foo2 = a || a.b;
const foo3 = a?.b.c.d;
const foo4 = a && a.b.c.d;
const foo5 = a && a.b && a.b.c.d;
const foo6 = a && a.b && a.d.c.d;
const foo7 = a && a.b.c && a.b.c.d;
const foo8 = a.b && a.b.c;
const foo9 = a.b && a.b.b.b;
const foo10 = a.b && a.b.b.b.b.b;
const foo1... |
import { createLogic } from 'redux-logic';
import CONSTANTS from '@/athleteTests/Anthropometry/constants';
import { ROUTE } from '@/pages/Root/constants';
import { replaceTest } from '@/pages/TestPage/actions';
import { makeSelectPersonId } from '@/pages/TestPage/selectors';
import {
ANTHROPOMETRY_SAVE_FORM,
ANTH... |
({
onInit : function(component, event, helper) {
helper.getQueues(component, event, helper);
},
handleConfirmEvent : function(component, event, helper){
var selectedQueueId = component.find("queuePicklist").get("v.value");
component.set("v.selectedQueueId", selectedQueueId);
... |
/**
* Created by 姜昊 on 2016/5/9.
*/
var waterline= require('waterline');
var user = require('./collections').user;
var note = require('./collections').note;
var orm = new waterline();
orm.loadCollection(user);
orm.loadCollection(note);
exports.orm = orm; |
const { db, responseChat, mergeById } = require("../helper");
module.exports = class Message {
constructor(userId) {
this.userId = parseInt(userId)
}
async getRooms(){
const userChatRooms = await db.select('*')
.from('chat_room_members')
.where({user_id: this.userId });
const chat_room_ids = userChatR... |
export const stock = [
{
id: 1,
nombre: "Red Dead Redemption 2",
category: "Shooter",
precio: 3500,
avatar: "https://orig00.deviantart.net/5070/f/2018/179/9/7/red_dead_redemption_2_icon_1_by_iiblack_iceii-dcfqu85.png",
desc: "Sumergete en esta aventura de vaqueros.",
... |
// morphs the tie into a seed
plant: {
init: function(t){
var
paths = frames.rusetti,
path0 = transSVGPath( paths[0][0], [ 480, 210 ], 1 ),
path1 = transSVGPath( paths[1][0], [ 400, 350 ], 1.5 ),
path2 = transSVGPath( paths[2][0], [ 340, 340 ], 2 ),
path3 = ... |
import React from "react";
import "./CustomTooltip.scss";
const CustomTooltip = ({ active, payload }) => {
if (active) {
const itemData = payload[0].payload;
return (
<tooltip-container>
<h3>{itemData.paper}</h3>
<metric-value>
{itemData.metricName}: {itemData.metricValue} ({i... |
function() {
var v0 = {};
var v6 = [];
var v7 = {};
var v13 = {};
var v19 = {};
var v25 = {};
v7['isDisabled'] = false;
v7['id'] = 1;
v7['isDefault'] = true;
v7['name'] = "\u73B0\u91D1";
v7['intro'] = "";
v7['discount'] = null;
v13['isDisabled'] = false;
v13['id'] = 2;
v13['isDefault'] = false;
v13['nam... |
const handler = {
async exec({ m }) {
if (m.hasMedia) {
let media = await m.downloadMedia();
media.filename = ''
try {
m.reply(media, m.from, {sendMediaAsSticker: true})
} catch (err) {
m.reply(err)
}
} else ... |
import Component from '@glimmer/component';
import debugLogger from 'ember-debug-logger';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';
import { isPresent } from '@ember/utils';
export default class TwyrCheckboxComponent extends Component {
// #region Services
@service ... |
const path = require('path');
const getInventory = require('@architect/inventory');
module.exports = async function getPaths() {
const { inv: inventory } = await getInventory({ cwd: process.cwd() });
// NOTE: no need to worry about inventory.macros, the are not deployed
const sharedPath = inventory.shared != nu... |
/**
* Created by Shaun on 2016/10/5.
*/
var mongoose = require('mongoose');
var userSchema= require('../schema/users');
// 模型类的创建,返回一个构造函数
module.exports=mongoose.model('User', userSchema); |
const fs = require('fs')
const filename = `.env.development`
if (fs.existsSync(filename)){
require('dotenv-expand')(
require('dotenv-safe').config({
path: filename,
example: '.env.example',
allowEmptyValues: true
})
)
} |
// Copyright (c) 2021 Visiosto oy
// Licensed under the MIT License
export default {
hiddenSectionShow: 'Näytä',
hiddenSectionHide: 'Piilota',
};
|
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var schema = new Schema({ newMessages : { type: Number, default: 0},
gallerys : { type: Number, default: 0},
user_id : { type: String},
user_folder : { type: String},
... |
/**
* Created by anonymoussc on 6/30/15 7:40 PM.
*/
exports.config = {
seleniumAddress : 'http://localhost:4444/wd/hub',
specs : ['testbSpec.js'],
jasmineNodeOpts : {
showColors : true,
defaultTimeoutInterval : 30000
}
}; |
module.exports = {
plugins: [
{
resolve: "gatsby-source-graphql",
options: {
// This type will contain the remote schema Query type
typeName: "Lolly",
// This is the field under which it's accessible
fieldName: "lolly",
//... |
/*=============================================================================
#
# Copyright (C) 2016 All rights reserved.
#
# Author: Larry Wang
#
# Created: 2016-07-12 22:07
#
# Description:
#
=============================================================================*/
import { connect } from 'react-redux';
imp... |
'use strict';
angular.module('feedbackerApp')
.config(function ($stateProvider) {
$stateProvider
.state('feedback', {
parent: 'entity',
url: '/feedbacks',
data: {
authorities: ['ROLE_USER'],
pageTitle: 'feed... |
var stripe = require("stripe")("sk_test_u5SnaAfls7lh4yS0mxdVu8jR");
module.exports =function(req, res) {
stripe.balance.retrieve({
stripe_account: req.body.account
}, function(err, balance) {
// asynchronously called
return res.send(balance)
}
);
}
|
/*
* Copyright 2012 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... |
define(["assets", "collision", "explosion"], function(assets, collision, explosion) {
var NUM_TANKS = 10;
var TANK_RANDOM_MOVE = 80;
var TANK_SPEED = 6;
var AIM_XDIST = 600;
var AIM_YDIST = 600*0.65;
var TANKGUN_LENGTH = 64;
var TANK_SHOOT_TIME = 600; //ms
var stage, stageHeight;
var tank, t... |
Global = React.createClass({
mixins: [ReactMeteorData],
getMeteorData: function() {
return {user: Meteor.user()};
},
render: function() {
if (!this.data.user) { // show login if no user
return <Login />;
}
else { // if user logged in
if (Meteor.user().profile.master) { // enter maste... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "d3048049c95547d3c991175ae95a4947",
"url": "/index.html"
},
{
"revision": "da2748b9d947da8d6c79",
"url": "/static/css/main.a379bd37.chunk.css"
},
{
"revision": "a8349c43ee15ec5def5f",
"url": "/static/js/2.... |
import { pipe } from "../pipe/pipe"
import { curry } from "../curry/curry"
const _minBy = (_fn, source) => {
const fn = Array.isArray(_fn) ? pipe(..._fn) : _fn
if (source.length === 0) {
return undefined
}
const result = {
item: source[0],
value: fn.call(null, source[0]),
}
for (let i = 1, l... |
$(document).ready(function(){
if(window.matchMedia('(max-width: 767px)').matches){
$('.form-cadastro-nf').insertBefore($('.info-promocao'));
}
$('input[name=numero-nf]').mask("000.000.000", {placeholder: "000.000.000"});
$('input[name=cnpj-nf]').mask("00.000.000/0000-00", {placeholder: "00.000.000/0000-0... |
// Item Hauler
// for DanIdle version 4
// Uses workers to move single items from one place to another. Worker-expensive, but still very versatile, and requires no tech
import { game } from "./game.js";
import { blockDeletesClean, blockHasWorkerPriority } from "./activeBlock.js";
import { danCommon } from "./danCommon... |
/*
bootstrapExportExcel https://github.com/fg1998/bootstrapExcelExport
Copyright 2015 Fernando Garcia [email protected]
Based on batta tech excel export https://github.com/battatech/battatech_excelexport
*/
var defaults = {
tableSelector: null,
fileName: "Relatorio.xls",
worksheetName: "Relatori... |
import React, { PureComponent } from "react";
import { Route, Redirect } from "react-router-dom";
import fire from "../fire";
import "../layouts/css/site.css";
import "../layouts/css/entry.css";
import { connect } from "react-redux";
class Authentication extends PureComponent {
constructor(props) {
super(props)... |
import React, { Fragment } from 'react';
import HeaderComponent from './header';
import HomePage from './home-page';
import FooterComponent from './footer';
const App = () => {
return (
<Fragment>
<HeaderComponent />
<HomePage />
<FooterComponent />
</Fragment>
... |
import request from '../utils/request';
export function fetchTodoList() {
return request('http://localhost:3200/api/todo');
}
export function fetchAnotherList() {
return request('http://localhost:3200/api/another');
} |
angular.module('companyApp.services',[])
.factory('Company',function($resource){
return $resource(_contextPath+'/api/companies/:id',{id:'@id'},{
update: {
method: 'PUT'
}
});
}); |
/**
*
*/
function showTypeWindow(){
document.getElementById('window_type').style.display='block';
document.getElementById('fade').style.display='block';
}
function closeTypeWindow(){
document.getElementById('window_type').style.display='none';
document.getElementById('fade').style.d... |
import styled from "styled-components";
export const Container = styled.div`
display: flex;
flex-direction: column;
margin: 0 10px 10px 0;
padding: 5px;
min-height: 100%;
min-width: 300px;
width: 400px;
background-color: ${({ theme }) => theme.primaryWhite};
border: 1px solid ${({ theme }) => theme.b... |
import { forwardRef } from "react";
import styled, { css } from "styled-components";
import { Input } from "./lib";
const Field = forwardRef(
({ error, label, optional, bold, light, id, ...props }, ref) => (
<Container>
<Label htmlFor={id} bold={light === true}>
{label}
{optional && <Label ... |
import express from 'express';
import passportFacebook from '../../db/config/auth/facebook';
import passportGoogle from '../../db/config/auth/google';
import passportTwitter from '../../db/config/auth/twitter';
import socialLogin from '../../controllers/socialLogin';
import socialUser from '../../middlewares/socialUser... |
import React, { Component } from 'react';
import UpdateFormModal from './UpdateFormModal';
import axios from 'axios';
import { Button, Container, Badge } from "react-bootstrap";
import {
FaEdit
} from "react-icons/fa";
class Cart extends Component {
constructor(props) {
super(props);
this.state = {
... |
import React, { Component } from 'react';
class UniProjects extends Component{
render(){
return(
<div>
<div className="intro">
<p><b>{this.props.item.projectName}</b><br/>{this.props.item.uniName}</p>
<span className="project-title"><b>Obj... |
// @flow strict
import * as React from 'react';
import { AdaptableBadge, StyleSheet } from '@kiwicom/mobile-shared';
import { Translation } from '@kiwicom/mobile-localization';
import { graphql, createFragmentContainer } from '@kiwicom/mobile-relay';
import { defaultTokens } from '@kiwicom/mobile-orbit';
import type ... |
'use strict';
// Define the module
angular.module('listeEleves', ['core.eleve']);
|
const df = {
name: 'viewPort',
x: 0,
y: 0,
w: 10,
h: 10,
targetEdge: 5,
}
let id = 0
class ViewPort {
constructor(st) {
augment(this, df, st)
this.id = ++id
this.name = 'port' + this.id
if (!this.port) this.port = {
x: 0,
y: 0,
... |
[
{
"creatDate": "2018-09-08",
"id": "11094",
"image": "/d/file/guochan/2018-09-08/f15adb50e29b5bca95e687896a195490.jpg",
"longTime": "00:11:04",
"title": "体位才是王道大庆哥工厂楼道银行职员副经理真骚干的骚货直叫好爽",
"video": "https://play.cdmbo.com/20180907/EgIHx9j2/index.m3u8"
},
{
"creatDate": "2018-09-08",
... |
const commando = require('discord.js-commando');
const discord = require('discord.js');
const SERVER1 = new discord.WebhookClient("ID of webhook 1 here", "Token of webhook 1 here")
const SERVER2 = new discord.WebhookClient("ID of webhook 2 here", "Token of webhook 2 here")
const SERVER3 = new discord.WebhookClient(... |
import React, { Component } from 'react'
import { feedsAction } from '../actions/feeds'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import Feed from './feed'
import { Container, Header } from 'semantic-ui-react'
export class FeedsComponent extends Component {
componentWillMount (... |
const {assert} = require('chai');
const middle = require('../middle');
describe("#middle", () => {
it('returns [2, 3] for [1, 2, 3, 4]', () => {
assert.deepEqual(middle([1, 2, 3, 4]), [2, 3]);
});
it('returns [3, 4] for [1, 2, 3, 4, 5, 6]', () => {
assert.deepEqual(middle([1, 2, 3, 4, 5, 6]), [3, 4]);
... |
import React, { useState } from 'react'
import { Form, Row, Col, Input, Button } from 'antd';
import { ReactSortable } from "react-sortablejs";
export default () => {
console.log('Form ***********')
const [expand, setExpand] = useState(false);
const [fieldList, setFieldList] = useState([
// { id:... |
import mongoose from 'mongoose';
import bcrypt from 'bcrypt-nodejs';
// define the User model schema
let UserSchema = new mongoose.Schema({
name: {type: String, index: {unique: true}},
password: String
});
/**
* Compare the passed password with the value in the database. A model method.
*
* @param {string}... |
const m = "ABC";
const musicinfos = ["12:00,12:14,HELLO,C#DEFGAB", "13:00,13:05,WORLD,ABCDEF"];
const isThisSong = (timeDiff, lyrics, findString) => {
const newM = findString
.replace(/(C#)/g, "c")
.replace(/(D#)/g, "d")
.replace(/(F#)/g, "f")
.replace(/(G#)/g, "g")
.replace(/(A#)/g, "a");
con... |
import React from "react";
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
import { Ionicons } from "@expo/vector-icons";
import { AntDesign } from "@expo/vector-icons";
import { LinearGradient } from "expo-linear-gradient";
const MyButton = (props) => {
return (
<TouchableOpacity onPres... |
/*global describe: true */
describe("fs", function() {
// TODO
}); |
const maybeHas = require('./lib');
const obj = {
anchor: {
anchor: {
anchor: 0
}
},
bank: 2,
case: {
anchor: {
bank: {
anchor: 99
}
}
}
};
const objHas = maybeHas(obj);
[
objHas('anchor.anchor.anchor'),
objHas('case.anchor.bank.anchor'),
objHas('case'),
obj... |
queue()
.defer(d3.json, "/premierleague/team/MANCHESTER%20UNITED")
.await(makeGraphs);
function makeGraphs(error, premierleagueData) {
if (error) {
console.error("makeGraphs error on receiving dataset:", error.statusText);
throw error;
}
var ndx = crossfilter(premierleagueData);
... |
import React, { Component } from "react";
class Allocation extends Component {
render() {
return <div>this is Allocation page</div>;
}
}
export default Allocation;
|
// import React from 'react'
// const AddProductForm = () => {
// return (
// <>
// <InputField label="Product name" name="name" isRequired form={form} />
// <CheckboxGroup options={listColor} value={variant} onChange={onChange} />
// <InputField
// label="Quantity"
// name="qua... |
/*
* File: app/view/DateTegion.js
*
* This file was generated by Sencha Architect version 3.2.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 4.2.x library, under independent license.
* License of Sencha Architect does not include license for Ext JS 4.2.x. For more
* deta... |
import React from 'react';
import './ArraySelector.scss';
export function ArraySelector(props) {
function handleClick(id) {
props.onChange && props.onChange(id);
}
return (
<div className="array-selector__container">
{ props.list.map((item) =>
<div className=... |
$(function(){
////////////////////////////////////
/////////////// MODEL /////////////
///////////////////////////////////
var Card = Backbone.Model.extend({
// defaults: {
// category: "Personal"
// }
// validate: function(attrs){
// if (!attrs.name)
// return "Name is required.";
// }
});
/... |
import { CHANGE_SEARCHFIELD,
REQUEST_ROBOTS_PENDING,
REQUEST_ROBOTS_SUCCESS,
REQUEST_ROBOTS_FAILED } from './constants.js';
import {ApiCall} from './api//ApiCall';
export const setSearchfield = (text) => ({
type: CHANGE_SEARCHFIELD,
payload: text
});
export const requestRobots = () => (dispatch) => {
di... |
import React from 'react'
import styled from 'styled-components'
const pathStyle = `
fill: none;
stroke:#000000;
stroke-width:4;
stroke-linecap:round;
stroke-linejoin:round;
stroke-miterlimit:10;
`
const Path = styled.path`${pathStyle}`
const Polyline = styled.polyline`${pathStyle}`
const Poly... |
var friends = [
{
"name":"Matthew",
"photo":"https://www.learnreligions.com/thmb/yE3pO1h6PSdGvaGF-TuGGYfGD8s=/1500x844/smart/filters:no_upscale()/Matthew-GettyImages-112186109-5787c6175f9b5831b50e48ac.jpg",
"scores":[5,1,4,4,5,1,2,5,4,1]
},
{
"name":"Mark",
"photo":"https://www.learnreligions.co... |
#! /usr/local/bin/jjs
// 意図がよくわかりません。全て、java.lang.String
// castはHelloが表示される
var str = 'Hello, World'
print(str)
print(str.getClass())
var sub = str.substring(0,5)
print(sub)
print(sub.getClass())
var cast = java.lang.String.class.cast(sub)
print(cast)
print(cast.getClass())
|
const util = require('../app util/util');
const code = require('../constants').http_codes;
const msg = require('../constants').messages;
const userdao = require('../user/userDao');
const sportdao=require('../sport/sportDao')
const bcrypt = require('bcrypt');
const user = require('../schema/user')
const crypto = require... |
/**
* LINKURIOUS CONFIDENTIAL
* Copyright Linkurious SAS 2012 - 2018
*
* - Created on 2017-09-01.
*/
'use strict';
// locals
const IndexDAO = require('../indexDAO');
class JanusGraphSearchDAO extends IndexDAO {
constructor(options, graphDao) {
super('janusGraphSearch',
[],
['disableIndexExistCh... |
const $navBtn = document.getElementById('nav-btn')
const $nav = document.getElementById('nav')
const media = window.matchMedia('max-width: 1220')
$navBtn.addEventListener('click', toggleNav)
function toggleNav() {
$nav.classList.toggle('active')
$navBtn.classList.toggle('close')
$navBtn.classList.toggle('fa-bar... |
import React from "react";
import "./StarWars.css";
//Setting up how the character info is displayed on the page.
//Adding props so the data can be applied in App.js
const CharacterInfo = props => {
return (
<div className="container">
{props.data.map(character => {
// console.log(character);
... |
import React from "react"
import {
View,
Image,
ImageBackground,
TouchableOpacity,
Text,
Button,
Switch,
TextInput,
StyleSheet,
ScrollView
} from "react-native"
import Icon from "react-native-vector-icons/FontAwesome"
import { CheckBox } from "react-native-elements"
import { connect } from "react-re... |
app.controller('loginController', ['$cookies', '$state', '$rootScope', '$scope' ,'$http' ,'people', function($cookies, $state, $rootScope, $scope,$http,people) {
$scope.register = function() {
console.log('register');
$state.go('register');
}
$scope.user = {};
$scope.user.email = "new@n... |
import React from 'react'
import PropTypes from 'prop-types'
// redux
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
// module
import { ActionCreators as AppActions } from '../../modules/app/actions'
import { ActionCreators as ClientLinkActions } from '../../modules/client-links/actio... |
/**
* Copyright © 2014 Julian Reyes Escrigas <[email protected]>
*
* This file is part of concepto-sises.
*
* concepto-sises
* can not be copied and/or distributed without the express
* permission of Julian Reyes Escrigas <[email protected]>
*/
;
(function () {
"use strict";
... |
// edit_publication.js
$(document).ready(function(){
// adds the events to the edit/save authorship button
$('.author_save_btn').live('click', disable_fields);
$('.author_edit_btn').live('click', enable_fields);
}); |
var ProgressBar = function () {
this.i = 0;
this.value = 0;
this.res = 0;
this.context = null;
this.total_width = 0;
this.total_height = 0;
this.radius = 0;
this.initial_x = 0;
this.initial_y = 0;
this.div = undefined;
this.elem = undefined;
var tProgressBar =... |
import axios from 'axios';
import { loginUser } from './userAuth';
import { addFlashMessage } from './flashMessage';
/**
* @description This makes network request to create an account for user
* @param {object} userData - user data for creating a new user
* @returns {promise} Axios http response
*/
export const ... |
import React from 'react';
import { CityDropdown } from './CityDropdown';
import { CityWeatherInfo } from './CityWeatherInfo';
import { cities } from '../data/CitiesData';
export function Main(props) {
return (
<main className="locations">
<CityWeatherInfo selectedCity={props.selectedCity} ... |
// @flow
/* **********************************************************
* File: components/Devices/DevicesPage.js
*
* Brief: Page for starting scan, and choosing scan
* method.
*
* Author: Craig Cheney
*
* 2017.09.25 CC - Changed name to DevicesPage (from ScanForDevicesComponent)
* Refactored out ScanMethodBtn, Sc... |
var mongoose=require("mongoose");
/*
This is the basic device schema which will be modified during the course of the project
*/
var deviceSchema=new mongoose.Schema({
name:{
required:true,
type:String
},
pubkey:{
required:true,
type:String
},
project:{
id:{
... |
X.define("data.addressData",function () {
var address = {
"pro": [
{
"ProID": 1,
"ProName": "北京",
"ProSort": 1,
"ProRemark": "直辖市",
"ProNameEnglish": "Beijing",
"ProRemarkEnglish": "Municipality"
},
{
"ProID": 2,
"ProName": "天津",
"ProSort": 2,
"... |
import { createStore, applyMiddleware } from 'redux'
import thunkMiddleware from 'redux-thunk'
import reducer from './reducer'
const enhancer = applyMiddleware(thunkMiddleware)
// store
export default createStore(reducer, enhancer) |
import "./App.css";
import React, { useState, useEffect } from "react";
import { useParams } from "react-router-dom";
import { QuizRender } from "./components/QuizRender";
import { QuizCompleted } from "./components/QuizCompleted";
// TODO
// 1. Introduce Quiz and Question component to allow dynamic questions
// 2. Sav... |
export const AGREGAR_PERSONA = 'AGREGAR_PERSONA'
export const AGREGAR_PERSONA_EXITO = 'AGREGAR_PERSONA_EXITO'
export const AGREGAR_PERSONA_ERROR = 'AGREGAR_PERSONA_ERROR' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.