text
stringlengths
7
3.69M
define(function(require, exports, module) { var $ = require('jquery'); var chart = require('./chart.js'); module.exports = { init: function() { var parentObj = 'base'; //顶部菜单点击事件 $('.dtm-tabh-h li').unbind('click').bind('click', function(event) { t...
import React, {useContext} from 'react'; import { VideoListContext } from '../contexts/VideoContext'; import './VideoItem.css'; const VideoItem = ({video}) => { const { onVideoSelect } = useContext(VideoListContext) return ( <div onClick={() => onVideoSelect(video)} className="item video-item"> ...
import Riego from '@/models/ModeloRiego'; export default { namespaced: true, state: { riego: new Riego('', '', '', '', '', '', '', '', '', ''), // Modelo Riego formRiegoValido: false, // Indica si el formulario de Riego es valido }, mutations: { // Coloca un nuevo Riego ...
(function() { var Address, Mongo, Schema, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; retur...
/* Spinal Tap Case Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes. Here are some helpful links: RegExp String.prototype.replace() */ function spinalCase(str) { // "It's such a fine line between stupid, and clever." // --David St. Hubbins return str.replace(/(?!^)([A-Z])/...
const rp = require('request-promise'); var config = require('../config'); const baseUrl = config.url; const apiKey = config.api_key; module.exports = { getDefinition: async (word, printFlag) => { var url = baseUrl + '/word/' + word + '/definitions?api_key=' + apiKey; var result = []; awai...
const mongoose = require('mongoose'); const db = require('./index.js'); mongoose.Promise = global.Promise; const gallerySchema = new mongoose.Schema({ listing_id: Number, photos: [{ position: Number, imageUrl: String, description: String, }, ], }); const Gallery = mongoose.model('Gallery', gallery...
var files____c__8js_8js = [ [ "files__c_8js", "files____c__8js_8js.html#acccaebca3e0ff6ec53d409c4c6ad9b89", null ] ];
import routes from "../routers"; import { renderToString } from "react-dom/server"; import { StaticRouter, Route } from "react-router-dom"; import React from "react"; import { Provider } from "react-redux"; import { getStore } from "../store"; import { renderRoutes, matchRoutes } from "react-router-config"; import { He...
// ** React Import import { useState, useEffect } from "react" import { useDispatch, useSelector } from "react-redux" // ** Custom Components import Sidebar from "@components/sidebar" import Select from "react-select" // ** Utils import { getImageUser } from "@utils" import Flatpickr from "react-flatpickr" import "@...
export default async (db, token) => ({ message: "user profile response" });
const db = require('../db'); const ExpressError = require('../helpers/expressError'); class User{ static async createUser(userObj){ const userQuery = await db.query(` INSERT INTO users (username, password, first_name, last_name, email, photo_url, is_admin) VALUES($1, $2, $3, $4, $5, $6, $7) RETURNIN...
Ext.define('Gvsu.modules.users.view.PublUsersForm', { extend: 'Core.form.DetailForm', titleIndex: 'name', layout: 'border', defaults: { margin: '0', }, width: 400, height: 420, buildItems: function() { var me = this; return [{ xtype...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const PoemSchema = new Schema({ title: { type: String }, user: { type: Schema.Types.ObjectId, ref: 'user' }, stanza: [{ type: Schema.Types.ObjectId, ref: 'stanza' }] }); PoemSchema.statics.addStanza = function(id, content)...
/* *@author samuel richards *@candidate number: 77513 * * Description: JavaScript passes all required files automatically when using Node.JS and Express. Creating this file that loads all images at the beginning of the game initialisation insures all images are passed to the client before they start the game. */ //func...
// 设置cookie function setCookie (name, value, day) { // 当设置的时间没有时,不设置expires属性,cookie在浏览器关闭后删除 if (day) { var expires = day * 24 * 60 * 60 * 1000; var date = new Date(+new Date()+expires); document.cookie = name + "=" + escape(value) + ";expires=" + date.toUTCString(); } else { document.cookie = name...
import React from "react"; import { View, Text, StyleSheet, Dimensions } from "react-native"; import Color from "../constants/Color"; import TitleText from "./TitleText"; const Header = props => { return ( <View style={styles.header}> <TitleText>{props.title}</TitleText> </View> ); }; const styles =...
import React from 'react'; import "./SocialMediaContainer.css"; import SocialMediaButtons from '../SocialMediaButtons/SocialMediaButtons'; import contactPicture from '../../../src/assets/images/profile-pic256px.png' import starsDecor from '../../../src/assets/misc/three-stars-svg.svg' import multipleStarsDecor from '.....
import React, { useContext, useState } from 'react'; import { Link } from 'react-router-dom'; import ProfileContext from '../../context/profile/profileContext'; export const Footer = () => { const profileContext = useContext(ProfileContext); const { language, toggleLanguage } = profileContext; const [newLangua...
import React from "react"; import { MdRefresh } from "react-icons/md"; const RefreshPanel = ({ transactionID }) => { return ( <div className="ref-panel"> <p style={{ textAlign: "center" }} > <b> <MdRefresh className="ref-icon" /> </b> </p> ...
const userModel = require('../model/userModel'); module.exports = { save: (newUser,callBakc) => { newUser.save(callBakc); }, find: (callback) => { userModel.find(callback); } }
import express from 'express'; export const healthRouter = express.Router(); const healthPath = '/health'; healthRouter.get(healthPath, (_request, response) => { try { const healthy = { status: 'UP' }; response.send(healthy); } catch (e) { response.status(500).send(e.message); } })...
module.exports = async (pg, logId) => { const entryResults = await pg.query({ name: 'fetch-log-entries', text: 'SELECT message, roll, result, created_at, log_id FROM entries WHERE log_id = $1 ORDER BY created_at DESC LIMIT 100;', values: [logId] }) return entryResults.rows }
import { connect } from 'react-redux'; import ShipComponent from './ShipComponent'; import { bsOperations } from './duck'; const mapStateToProps = (state) => { return { shipSelected: state.bs.arrange.shipSelected, placedShips: state.bs.arrange.placedShips } } const mapDispatchToProp...
/** * */ $(document).ready(function() {menu.getMenu(0); menu.getListBody();}); var font = "微博订单详细"; var valids = ["媒体订单DID", "订单号", "媒体名", "QQ", "备注", "状态", "最后修改时间", "最后修改人"]; var sizes = [100, 100, 100, 100, 100, 100, 100, 100]; var contents = ["媒体订单DID", "订单号", "媒体名", "QQ", "备注", "状态", "最后修改时间", "最后修改人...
var myArr = A[-1, 3, -4, 5, 1, -6, 2, 1,]; function solution(A) { if ( A.length > 0) { if (A.length == 1) return 0; var leftSize = 0; var rightSize = 0; var i=0; for (i;i<A.length;i++){ rightSize = rightSize+ A[i]; } for (i=0;i<A.length;i++){...
/* if */ var a = 1, b = 1; if (a==b) console.log("블록X"); if (a==b) console.log("1번줄") console.log("2번줄"); /* 세미콜론(;)까지 조건 if 실행 */ var a = 1, b = 1; if (a==b) { console.log("블록사용"); }; /* 블록에 작성한 내용을 다 실행. 블록 사용 권장 - 확장성과 일관성을 위해 */ // if(표현식) 문장1 else 문장2 -> 표현식이 true면 문장1을 false면 문장2를 반환 var a = ...
var router = require('express').Router() var Orderitems = require('../models/orderitems') router.index = function (req, res) { // 여기는 조건부로 바 /* var estimates = Estimates.find(function(err, estimates){ if (err) return console.error(err) console.log(estimates) res.render('pages/estima...
import React from 'react'; import cx from 'classnames'; import PropTypes from 'prop-types'; import s from '../styles/Widget.module.scss'; function Widget({ title, className, children }) { return ( <section className={cx(s.widget, className)}> {title && (typeof title === 'string' ? ( <h5 ...
const mongoose = require("mongoose"); const orangeTypeSchema = new mongoose.Schema({ name: String, price: Number, creationTime: Date, userId: mongoose.Schema.Types.ObjectId, }); const Orange = new mongoose.model("Oranges", orangeTypeSchema); module.exports = Orange;
import styled from 'styled-components'; export const Header = styled.header` background-color: ${({ theme }) => theme.surface}; padding-top: 10px; padding-bottom: 10px; box-shadow: 0 11px 10px -10px rgba(0,0,0,.1); `; export const MenuOverlay = styled.div` position: fixed; top: 0; right: 0; bottom: 0;...
import React, { useEffect, useState } from "react"; import { db } from "../Database/firebase"; import "./productDetailsPage.css"; import { BsBag } from "react-icons/bs"; import { LocalDatabase } from "../context/DataLayer"; import { Link } from "react-router-dom"; import { event, isArray } from "jquery"; const Product...
var orionClient = require('fiware-orion-mintaka'); var h = require('./helper'); var disabled = false; module.exports = { init: function(conf){ orionClient.configure(conf); }, initEntities: function(definition){ if(disabled) return; definition.entities.map(function(ent){ var attrObj = { attributes: e...
import React from 'react' import { Tabs, useTabState, Panel } from '@bumaga/tabs' import LoginForm from './NoteloginForm'; import VendorPanel from './NoteVendorInfo'; import NoteServiceInfo from './NoteServiceInfo'; import NoteVendorUpload from './NoteVendorUpload'; const cn = (...args) => args.filter(Boolean)....
import React, { Component } from 'react'; import { Button, Tabs, Table, Menu, message, Breadcrumb } from 'antd'; const TabPane = Tabs.TabPane; import PunishTable from "./PunishTable"; import ClaimantTable from "./ClaimantTable"; import "./css/punish.css"; class PunishClaimant extends Component { constructor(props) ...
export const cipher = text => { let textToChars = text => text.split('').map(c => c.charCodeAt(0)) let byteHex = n => ("0" + Number(n).toString(16)).substr(-2) let applySaltToChar = code => textToChars(process.env.REACT_APP_SALT).reduce((a, b) => a ^ b, code) return text.split('') .map(textToCh...
//Export results for use in cost estimation model //Systemwide point of interest (POI) variable var sys_poi = []; var sys_poi_out = []; var sys_poi_depth = []; var sys_poi_flooded = []; var sys_switch_flooded = []; //Results variables var light_rail_flood_depths = []; var hvy_rail_flood_depths = []; var...
import { Container } from "@material-ui/core"; import React from "react"; import Controls from "../../components/patient-ui/Echannelling/Controls"; import { Form } from "../../components/patient-ui/Echannelling/useForm"; import { useState } from "react"; import { useParams } from "react-router-dom"; import channellServ...
import React from "react"; import Layout from "./../components/Layout/Layout"; import SimpleCard from "./../components/SimpleCard/SimpleCard"; import { Table, TableRow, TableHead, TableHeader, TableBody, TableCell, Button, } from "carbon-components-react"; import { useParams } from "react-router-dom"; im...
export default { createReviewRequest: "CREATE_REVIEW_REQUEST", createReviewResponse: "CREATE_REVIEW_RESPONSE", deleteReviewRequest: "DELETE_REVIEW_REQUEST", deleteReviewResponse: "DELETE_REVIEW_RESPONSE" };
import React, { Component } from 'react'; import DatatableComponent from './Datatable.js' import './App.css'; import Modal from 'react-bootstrap/lib/Modal'; import Button from 'react-bootstrap/lib/Button'; const List = ({ items}) => ( <ul> { Object.keys(items).map((e, i) => (<li><h4>{e}: </h4>{i...
import React, { useContext, useState } from 'react'; import cn from 'classnames'; import { SliderButton } from '../SliderButton'; import { ForecastCard } from '../ForecastCard'; import style from './style.module.css'; import { StateContext } from '../../../../app/App'; import { setDaily, setHourly } from '../../../.....
(function () { 'use strict'; angular.module('veegam-trials') .service('signupService', signupService); signupService.$inject = ['httpservice', 'apiUrl']; function signupService(httpservice, apiUrl) { var self = this; apiUrl = apiUrl + "/signup-service"; //check if user...
// Predict 1: // a count from 0 to 14 // Predict 2: // a count containing 3,6,9 // Predict 3: // prints 1,4,5,8,12,13,16 console.log("Predict 1 Results") for(var num = 0; num < 15; num++){ console.log(num); } console.log("") console.log("Predict 2 Results") for(var i = 1; i < 10; i+=2){ if(i % 3 == 0){ ...
import "./App.css"; import { NoAuthService, TokenAuthService } from "./service/auth_service"; import React, { Component } from "react"; import EmulatorScreen from "./components/emulator_screen"; import LoginPage from "./components/login_page"; import { ThemeProvider } from "@material-ui/styles"; const development = ...
(function () { 'use strict'; angular .module('videoForm') .config(config); function config($stateProvider) { $stateProvider .state('videoForm', { url: '/video-form', views: { 'mainView': { templateUrl: 'video-form/video-form.tpl.html', ...
import React, { Component } from 'react'; import InfoItem from "../../components/InfoPanel/InfoItem"; import PropTypes from "prop-types"; class AdsCount extends Component { render() { return ( <InfoItem info={{ icon_color: "icon icon-info", icon: "fab fa...
/** * Created by ALTAIR on 06.04.2016. */ var RedColor = React.createClass({ render: function () { var lit = this.props.turnedOn ? 'color red on' : 'color red'; return ( <div id="redLight" className={lit}></div> ); } }); var YellowColor = React.createClass({ render: funct...
import Model from './Model'; import Component from './components/ViewProxy'; // Controller links Model and view class Controller { constructor(extent) { this.model = new Model({ extent }); let { xmin, ymin, xmax, ymax } = this.model.extent; this.view = new Component({ position: 'topright', xmin, ymin, ...
import React from 'react'; import PropTypes from 'prop-types'; import Input from './elements/Input'; import InputGroup from './elements/InputGroup'; import Button from './elements/Button'; const AddGrocery = ({ onSubmit }) => ( <form className="container" onSubmit={onSubmit}> <h1> Add a Grocery Item{' '} ...
var Tickets = Backbone.Collection.extend({ url: '/api/v1/tickets', parse: function(response) { return response.tickets; } });
import { combineReducers } from 'redux'; import commonReducer from './commonSlice'; import entranceReducer from './entranceSlice'; import writeReducer from './writeSlice'; import postcardReducer from './postcardSlice'; import postcardsReducer from './postcardsSlice'; import expireReducer from './expireSlice'; export ...
const COUNTDOWN = "COUNTDOWN"; const UPDATE_ROOM_STATE = "UPDATE_ROOM_STATE"; const RESET_ROOM = "RESET_ROOM"; const START_ROOM = "START_ROOM"; const TURN_TAKEN = "TURN_TAKEN"; const RESET_REQUEST_PROMPT = "RESET_REQUEST_PROMPT"; const WAITING_RESPONSE_PROMPT = "WAITING_RESPONSE_PROMPT"; const DECLINE_PROMPT =...
const express = require('express'); const app = express(); const server = app.listen(9000); const io = require('socket.io')(server); var path = require("path"); var bodyParser = require('body-parser'); var session = require('express-session'); const flash = require('express-flash') var mongoose = require('mongoose'); ...
$(document).ready(function() { var area = $('#inputAreaCite').val(); // area selected var month = $('#inputMonth').val(); // month selected var day = $('#inputDay').val(); // day selected // listen sockets socket.on('new-cite-registered', function(res) { // if date created by other user i...
import React from 'react' import { storiesOf } from '@storybook/react' import SearchBar from '../components/SearchBar/SearchBar' storiesOf('SearchBar', module) .add('default state', () => ( <SearchBar onSubmit={() => console.log('hey')}/> ))
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router'; import './House.css'; class House extends React.Component { render() { return ( <Link to={"/requestDetail/userId/" + this.props.user_id + "/requestId/" + this.props.request_id} className="collection-item"> ...
//index.js //获取应用实例 const app = getApp() Page({ data: { }, onLoad: function () { var that = this wx.request({ url: "http://localhost:8080/lock/getDeviListInfo.action?method=getDeviList", headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' }, succes...
// Your task is to make function, which returns the sum of a sequence of integers. // The sequence is defined by 3 non-negative values: begin, end, step (inclusive). // If begin value is greater than the end, function should returns 0 // Examples // 2,2,2 --> 2 // 2,6,2 --> 12 (2 + 4 + 6) // 1,5,1 --> 15 (1 + 2 + 3...
import React from 'react'; import {convertDate} from '../user/UserItem'; const ProductItem = props => { const { product, deleteProduct, handleUpdateClick } = props; return ( <tr key={product.id}> <th>{product.name}</th> <th>{product.carat}</th> <th>{product.price}</th> <th>{prod...
var fs = require('fs'); var http = require('http'); var mime = require('mime-types'); const $path = require('path'); var port = process.env.PORT || 5000; http.createServer(function (request, response) { let contentType = 'text/plain'; let data; let path = request.url; let file = '.' + decodeURIComponent(reque...
import React from 'react'; import Aux from "../../../hoc/_Aux"; import Cart from '../Cart'; import './CartList.css'; const cart = new Cart(); class CartList extends React.Component { constructor(props) { super(props); this.state = { products: [], total_price: 0, ...
const rules = require("./rules"); const webpack = require("webpack"); const webpackMerge = require("webpack-merge"); const path = require("path"); module.exports = { context: path.join(__dirname, ".."), entry: ["./src/test.ts"], output: { filename: "build.js", path: path.resolve("temp"), publicPath: ...
import React from 'react'; import MySlider from './MySlider'; class Background extends React.Component { constructor(props) { super(props); this.state = { redValue: 0, blueValue: 0, greenValue: 0 }; } render() { return ( <div...
var searchData= [ ['audio_5fframes_5fper_5fvideo_5fframe_677',['audio_frames_per_video_frame',['../group__TransportControl.html#gaf28a3e9ee8b36a92309de372093f56f3',1,'jack_position_t']]] ];
// initialize the app const lib = { model: {}, view: {}, controller: {} };
import { userReducer } from '../userReducer'; import * as actions from '../../actions'; describe('userReducer reducer', () => { it('should return initial state', () => { expect(userReducer(undefined, {})).toEqual({}) }) it('should return a success case', () => { const state = {} const body = { ...
let mongoose = require('mongoose'); //连接数据库 mongoose.connect('mongodb://localhost/yonghu', { useNewUrlParser: true }); //上一行的yonghu指的是mongodb中的仓库名 //创建一个对象模型 var userSchema = new mongoose.Schema({ userTelNum:{ type:String, validate:{ validator: function(v) { return /^[1-9]\d{10}$/.test(v); ...
export const DOMAIN_NAME = "https://phallery.herokuapp.com";
import React, { PropTypes } from 'react'; import { getObject } from '../../../common/common'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import s from './TenantCurrency.less'; import {SuperTable, SuperToolbar, Indent} from '../../../components/index'; const TOOLBAR_EVENTS = ['onClick']; const TAB...
$(document).ready(function(){ $('table.invoice tfoot tr.addnew td:first button').click( function(e) { e.preventDefault(); var departmentField = $('table.invoice tfoot tr.addnew td:eq(1) input:first'); var descriptionField = $('table.invoice tfoot tr.addnew td:eq(1) input:eq(1)'); var costField = $('table.in...
var countOfPagesScrolled = 0; var searchPhrase = "Developer"; function scrollDown(height, countOfPagesScrolled){ scroll(0, document.body.clientHeight); setTimeout(function(){ if(height != document.body.clientHeight && countOfPagesScrolled > 0){ scrollDown(document.body.clientHeight, --countOfPagesScrolled); }...
var btnTranslate = document.querySelector("#btn-translate"); var txtInput = document.querySelector("#txt-input"); var output1Div = document.querySelector("#output"); var output2Div = document.querySelector("#weather"); function getTranslationURL(text){ return "https://api.openweathermap.org/data/2.5/weather?q=" ...
function () { var env = karate.env; // get system property 'karate.env' projectID = 1879048400 mjennerID = 1879048288 polearyID = 1879049107 karate.configure('connectTimeout', 6000000); karate.configure('readTimeout', 6000000); var config = { env: env, serverUrl : 'https://q...
import DOM from "./DOM" DOM.createDOM();
const { expect } = require('chai'); const noOutOfScopeVars = require('../checks/no-out-of-scope-vars'); describe("No Out Of Scope Variables", () => { it("skips if there is no orders file", async () => { const deployment = { serviceName: "streamliner" }; const results = await noOutOfScopeVars(deplo...
(function () { 'use strict'; angular .module('app.core') .factory('mockdata', mockdata); function mockdata() { var service = { getUnqueuedAircraft: getUnqueuedAircraft, getQueuedAircraft: getQueuedAircraft }; return service; function getUnqueuedAircraft() { var unqueuedAircraft = [ {i...
describe('P.behaviors.exercises.Descriptions', function() { 'use strict'; var Behavior = P.behaviors.exercises.Descriptions, Overlay = P.overlays.exercises.Description; var SimpleTestView = P.views.Item.extend({ template: function() { return '<span class="js-exercise-description">C&J</span>'; ...
/** * Created by zhuo on 2017/9/13. */ var fightState = new ListBox(); fightState.enemies = []; fightState.fightLog = []; fightState.lastState = mainState;//上一个场景 fightState.selectWindow = new ListBox(); fightState.inited = false; fightState.bgImg = null; fightState.init = function () { fightState.list = [operIt...
console.log("traverse-connect"); $( document ).ready(function() { console.log( "ready!" ); // Interesting life of dom elements ////////////////////////////////////// // tree traversals ***************************** // children(), parent(), parents(), parentsUntil() siblings(), closest(), find(), next(), ne...
/* * Module code goes here. Use 'module.exports' to export things: * module.exports.thing = 'a thing'; * * You can import it from another modules like this: * var mod = require('screeps.stats'); * mod.thing == 'a thing'; // true */ var logger = require("screeps.logger"); logger = new logger("screeps.stats"); ...
$(function () { var h = $("#content").height(); var h2 = $(".breadcrumb").height(); $("#content .row-fluid").height(h - h2); DungouViewer.init("earth"); // 加载球模型 DungouViewer.initLeftClick(globalviewer,function(){}); var surveymanager = new SurveyManager(globalviewer,function(){}); in...
import React, { Component } from "react"; import { Link } from "react-router-dom"; import Grid from '@material-ui/core/Grid'; import Button from '@material-ui/core/Button'; class Landing extends Component { render() { return ( <Grid container style={{height: "75vh"}} justify="center" alignItems="center" ...
import React from 'react' import { BrowserRouter as Router, Route, Switch } from 'react-router-dom' import withStates from "./components/hoc/withStates" import './App.css' import Navbar from "./components/navbar/Navbar" import Home from "./components/pages/Home" import About from "./components/pages/About" import Regi...
function ObjAjax() { var xmlhttp = false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { xmlhttp = new XMLHttpRequest(); } re...
/* DOM(Document Object Model) 브라우저의 렌더링 머신이 웹문서를 로드한 후 파싱하여 메모리에 적제하는데 이를 DOM이라 한다. 모든 요소와 요소의 어트리뷰터, 텍스트를 각각의 객체로만들고 이들 객체를 트리로 구성한것. js를 통해 동적으로 변경 가능하다. * 기능 - html 문서에 대한 모델 구성 이 때 모델을 객체의 트리로 구성하고 이를 DOM Tree라고 한다. - html 문서 내의 각 요소에 접근/ 수정 DOM Tree DOM에서 모든 요소, 어트리뷰트, 텍스트는 하나의 ...
$(document).ready(function(){ var gameInProgress = true; restart(); function restart(){ $('.x, .o').removeClass('x o'); gameInProgress = true; } $('.newGame').on('click', function(){ restart(); }) $('.square').on('click', function(){ if (!gameInProgress) { return; } $(this).addClass('x');...
import React, { useContext } from "react"; import { Button, Container, Nav, Navbar } from "react-bootstrap"; import { Link } from "react-router-dom"; import { UserContext } from "../../App"; const Header = () => { const [loggedInUser, setLoggedInUser] = useContext(UserContext); return ( <header> <Nav...
//goalFactory.js (function() { 'use strict'; angular.module('goalsFactory', []) .factory('goals', goals) // a factory named goals goals.$inject = ['$http'] // goals factory function goals($http){ var goalsUrl = '/api/goals' var goals = {} goals.list_all = function() { console.log("calling http.get ...
'use strict'; import { applyMiddleware, createStore } from 'redux'; import thunk from 'redux-thunk'; import reducers from './reducers/reducerIndex.js'; const configureStore = () => { const createStoreWithMiddleware = applyMiddleware(thunk)(createStore); if(process.env.NODE_ENV !== 'production'){ retur...
import React from 'react'; import 'Styles/index.css'; import PropTypes from 'prop-types'; import HeaderContainer from 'Components/atoms/container/header-container'; import ButtonText from 'Components/molecules/button/button-text'; import { Icon } from 'Components/atoms/icon'; import Button from 'Components/atoms/butto...
let DetailsCtrl = function($scope, CharactersService, $stateParams){ let id = $stateParams; CharactersService.getChar(id).then( (res) => { $scope.char = res.data; }) }; DetailsCtrl.$inject = ['$scope', 'CharactersService', '$stateParams']; export default DetailsCtrl;
{ "class" : "Page::ring::conversation" }
import distinct from '../signals/processes/distinct' import pipe from '../signals/pipe' import scroll from './scroll' import throttle from '../signals/processes/throttle' export default pipe( scroll, throttle(300), distinct )
import React from "react"; import AlbumSelectors from "selectors/AlbumSelectors"; import { connect } from "react-redux"; import { wrapper } from "redux/configureStore"; import * as Util from "utils/Util"; import AlbumView from "components/AlbumView"; import AlbumActions from "redux/AlbumRedux"; import SearchBar from "c...
const HorizontalRule = ({ style }) => { return ( <div className={`${style} w-[90%] mx-auto flex items-center justify-center space-x-3 my-16 sm:my-20 md:my-24 lg:my-32`} > <div className=" w-full sm:w-[200px] md:w-[250px] lg:w-[300px] xl:w-[350px] h-[2px] bg-hLight dark:bg-hDark"></div> <div...
export function getFizzBuzzUntil(n) { //* declare empty array for storing values let fizzBuzz = []; //* for loop, where we start i at 1 instead of 0 to prevent getting a FizzBuzz return for 0 //* also, using <= to ensure we iterate on the value passed for (let i = 1; i <= n; i++) { //* we check for FizzBu...
// Hooks import { useState, useCallback } from 'react' import { useTranslation } from 'next-i18next' import { useBackend } from 'site/hooks/useBackend.mjs' import { useDropzone } from 'react-dropzone' import { useToast } from 'site/hooks/useToast.mjs' // Components import { Icons, welcomeSteps, BackToAccountButton } fr...
module.exports = function(app) { app.use('/api/auth', require('./auth.js')); app.use('/api/post', require('./post.js')); }
var defines________________________________6________________8js________8js____8js__8js_8js = [ [ "defines________________6________8js____8js__8js_8js", "defines________________________________6________________8js________8js____8js__8js_8js.html#a6f4e5e64def0b1adf1c7901d2575d422", null ] ];