text stringlengths 7 3.69M |
|---|
/**
* Created by 53983 on 2017/5/27.
*/
goceanApp.controller('DealDetailCtrl', function ($scope, $rootScope, $state, $timeout, $stateParams, dealDetailService, configService,localStorageService) {
console.log('about DealDetailCtrl');
var params = configService.parseQueryString(window.location.href);
if (... |
/*
* server.js
* from www.nodebeginner.org
*/
"use strict";
var http = require("http");
var url = require("url");
var configuration = require("./configuration.js");
function start(route) {
var port = process.env.PORT || configuration.get_port();
function onRequest(request, response) {
var pathname = url.pars... |
export const HOL_LOAD_LIST="HOL_LOAD_LIST"
export const HOL_LOAD_LIST_FAILED="HOL_LOAD_LIST_FAILED"
export const HOL_LOAD_LIST_SUCCESS="HOL_LOAD_LIST_SUCCESS"
export const HOL_LOAD_ADD_FORM="HOL_LOAD_ADD_FORM"
export const HOL_SAVE_FORM="HOL_SAVE_FORM"
export const HOL_SAVE_FAILED_FORM="HOL_SAVE_FAILED_FORM"
export co... |
var data =[
{
id: "1",
firstname: "Emilio",
lastname: "Kay",
birthday: "11/11/1969",
company: "J&K",
email: "dk@email.com",
phone: "555-555-1234"
},
{
id: "2",
firstname: "Daniel",
lastname: "Berry",
birthday: "07/06/1980",
company: "Next Tech",
email: "db@email.com",
phone: "415-777-432... |
const AuthReducer = (state = {}, action) => {
switch (action.type) {
case 'INIT_REQUEST':
return {
...state,
loading: action.payload,
};
case 'FETCH_USER_PROFILE':
return {
...state,
profile: action.payload,
};
case 'FETCH_USER_SUCCESS':
return... |
import React from 'react';
import NavBar from '../containers/nav_bar.js';
import pusheen from '../pusheen.jpg';
const About = props => {
return (
<div>
<NavBar />
<div className="row justify-content-center mt-4">
<span>
This todo app was created by <b>Grant Yang</b>
</span>
... |
const withImages = require("next-images");
const dotEnv = require("dotenv");
const prod = process.env.NODE_ENV === "production";
if (!prod) {
dotEnv.config();
}
module.exports = withImages({
env: {
MONGO_DB: process.env.MONGODB,
},
build: {
env: {
MONGO_DB: process.env.MON... |
import { shallow } from 'enzyme'
import React from 'react'
import CounterConnect from './counter-connect-component'
import Counter from './counter-connect-container'
import reducer, { INITIAL_STATE } from './counter-connect-reducer'
import { increment, decrement, reset } from './counter-connect-actions'
const wrapper ... |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import {UncontrolledTooltip} from 'reactstrap';
import {getTranslation} from '../../../utilities/i18n';
const FormSelect = (props) => {
let tooltip = null;
let targetId = props.id || props.name;
if (props.hi... |
import React, { Component } from 'react'
import "./Employee.css"
import EmployeeCard from "./EmployeeCard"
export default class EmployeeList extends Component {
render() {
console.log(this.props)
return (
<React.Fragment>
<div className="employeeHeader">
... |
/* global emojify */
/* global moment */
/* global app */
/* global factory */
app.service('chatService', ['$rootScope','socketFactory',function($rootScope,socketFactory) {
var self = this;
this.messages = [];
socketFactory.on("server:message:new",function(data){
console.log(data);
self.messages.push({date : ... |
import mongoose, { Schema } from 'mongoose';
const UserSchema = new Schema({
email: { type: String, required: true },
firstName: { type: String, required: true },
lastName: { type: String, required: true },
role: { Type: String },
dob: { Type: Date },
createdAt: Date,
});
mongoose.model('user', UserSchema... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var testSchema = Schema({
application: {
type: Schema.Types.ObjectId,
ref: 'Application'
},
name: {
type: String,
required: true
},
description: String,
type: String,
commands: [Schema.Types.Mixed],
});
module.exports = mongoose.model('T... |
angular.module('Directives')
.directive('newCategoryModal', ['$filter', 'CategoryService', 'QuestionFactory', 'UserService', function ($filter, CategoryService, QuestionFactory, UserService) {
return {
restrict: 'E',
templateUrl: 'templates/directives/modals/new-category-modal.html'... |
const logger = require('logger');
const {
generateImageValidator,
generatePdfValidator,
} = require('./validators');
const { getBrowser, closeBrowser, goToPage } = require('infrastructure/browser.helper');
module.exports.generatePdf = async (ctx) => {
const result = await generatePdfValidator.validate(ctx);
... |
var mongoose = require('mongoose');
var Pricelist = require('../models/pricelist.model');
var MemberSchema = mongoose.Schema({
userId: {
type: mongoose.Schema.ObjectId,
index: true,
required: true
},
name: {
type: String,
required: true
},
phone: {
type: String,
default: 'Phone number not submitted... |
(function(globals) {
var define, requireModule;
(function() {
var registry = {}, seen = {};
define = function(name, deps, callback) {
registry[name] = { deps: deps, callback: callback };
};
requireModule = function(name) {
if (seen[name]) { return seen[name]; }
seen[name] = {};
var mod = reg... |
import React, { useState, useContext } from 'react'
import {
View,
ImageBackground,
ScrollView,
KeyboardAvoidingView,
Platform
} from 'react-native'
import * as Notifications from 'expo-notifications';
import styles from './styles'
import { colors, alignment } from '../../utils'
import TextField from '../../u... |
'use strict'
const moment = require('moment-timezone')
const TimeUnit = require('../enums/TimeUnit')
const { IllegalArgumentError } = require('@northscaler/error-support')
/**
* @deprecated Use https://moment.github.io/luxon/docs/class/src/interval.js~Interval.html if you can.
*/
class Period {
static beginningAt... |
// Default user location
var userLat = 44.556;
var userLng = -69.646;
var userTime;
// Markers for shuttle stops.
var mainStLatLng = {lat: 44.550999, lng: -69.632022};
var gilmanStLatLng = {lat: 44.553614, lng: -69.637182};
var diamondLatLng = {lat: 44.562241, lng: -69.659671};
var davisLatLng = {lat: 44.564428, lng: ... |
var galleryIsotope;
var galleryView = {
initialize : function() {
var self = this;
self.initIsotope();
//self.initVenobox();
self.bindEvents();
},
bindEvents : function() {
var self = this;
$('#gallery-flters li').on('click', function() {
$("#... |
import _ from "lodash";
import pagination from "../common/pagination.js";
import Admin from "../model/admin.js";
import Unit from "../model/unit.js";
import Unit_Employee from "../model/unit_employee.js";
import Unit_In_Proj from "../model/unit_in_proj.js";
const add_unit = async (req, res) => {
try {
con... |
const { OrderModel } = require('./model');
class Order {
static get(options) {
return OrderModel.find(options);
}
static add(order) {
return OrderModel.create(order);
}
static updateStatus(id, status) {
return OrderModel.findOneAndUpdate(
{ _id: id },
{ status, updated: Date.now() }... |
import React from 'react'; // eslint-disable-line no-unused-vars
import { LinkEditor as LinkEditorComponent } from '../../../components/link/components/link-editor';
export const LinkEditor = ({ attributes, actions }) => {
const {
blockClass,
link,
} = attributes;
const {
onChangeLinkTitle,
} = ac... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value)... |
import React from 'react';
import ReactDOM from 'react-dom';
import configureStore from './store/store';
import { receiveTodo } from './actions/todo_actions';
import { receiveTodos } from './actions/todo_actions';
import Root from './components/root';
//DELETE THIS
import allTodos from './reducers/selectors'
import To... |
'use strict';
/* Controllers */
var galleryApp = angular.module('galleryApp', []);
galleryApp.controller('ArticleListController', function ($scope) {
var imageUrl = 'http://lorempixel.com/100/100/';
$scope.articles = [
{
'title': 'This is the First Article',
'content': 'Just s... |
/*global showDifference */
$(document).ready(function() {
"use strict";
var orig = [20, 30, 44, 54, 55, 11, 78, 14, 13, 79, 12, 98];
var arr = [12, 11, 13, 14, 20, 30, 44, 54, 55, 79, 78, 98];
showDifference("shellsortCON8", orig, arr);
});
|
// startup
import 'utils/startup';
import utils from 'utils';
// object models
import animalStartup from 'animal/split';
import assessmentStartup from 'assessment/split';
import dataPivotStartup from 'dataPivot/split';
import epiStartup from 'epi/split';
import epimetaStartup from 'epimeta/split';
import invitroStartu... |
var _ = require('underscore');
var fn = require('../fn');
var datas = require('../datas');
var exports = {};
exports.init = function(userID) {}
exports.api = {
GetNetworkInfo: function(req, res, userID) {
var $data = datas[userID].$data;
res.send(fn.result($data.GetNetworkInfo, req.id));
},
... |
import React, { Component } from 'react';
import {
BrowserRouter as Router,
Switch,
Route
} from "react-router-dom";
import routers from '../../Constants/routers';
import Navigation from './Navigation';
import Footer from './Footer'
export default class Layout extends Component {
render() {
re... |
var http = require('http');
var server = http.createServer(function(req, res) {
var body = "<h1>Selamat datang di NodeJS Programming</h1>";
res.writeHead(200, {
'Content-Type': 'text/html',
'Content-Length': body.length
});
res.write(body);
res.end;
});
const port = process.env.POR... |
import React, {Component} from 'react';
import './reset.css';
import './App.css';
import Title from './components/title/Title';
import Cart from './components/cart/Cart';
import Menu from './components/menu/Menu';
import DataCollect from './components/forms/DataCollect';
import MessageWindow from './components/message... |
<style>
/* The Image Box */
div.img {
border: 1px solid #ccc;
}
div.img:hover {
border: 1px solid #777;
}
/* The Image */
div.img img {
width: 100%;
height: auto;
cursor: pointer;
}
/* Description of Image */
div.desc {
padding: 15px;
text-align: center;
}
* {
box-sizing: border-box;... |
import Vue from "vue";
import Router from "vue-router";
import Home from "../views/Home.vue";
import List from "../views/List.vue";
import Profile from "../views/Profile.vue";
import Settings from "../views/Settings.vue";
import Archive from "../views/Archive.vue";
import { authGuard } from "../auth";
require('@/asse... |
const mongoose = require('mongoose');
const Product = require('./models/product');
const data = require('./dummyData');
mongoose.connect('mongodb://localhost/productDetails');
Product.insertData(data)
.then(() => {
console.log('Insert Data Success!');
mongoose.disconnect();
})
.catch((e) => {
consol... |
class Weakness {
constructor (energyType, multiplier) {
this.energyType = energyType
this.multiplier = multiplier
}
}
module.exports = Weakness |
import React, { useState, useRef, useEffect } from "react";
import { Link } from "react-router-dom";
import { Formik, Form, Field } from "formik";
import { Button } from "semantic-ui-react";
import { Mutation } from "react-apollo";
import * as Yup from "yup";
import AuthSystemFormWrapp from "components/Forms/AuthSyst... |
module.exports = function(grunt){
grunt.initConfig({
concat: {
options: {
separator:'\n\n //------------------------>\n',
banner:'\n\n //--------------->\n\n'
},
dist:{
src: 'builds/*.js',
dest:'js/script.js'
}
},
watch: {
options:{
spawn:false,
livereload:true
},
... |
import React, {useState} from 'react';
import {Card} from "../components";
import styled from "styled-components";
import {connect} from "react-redux";
const SearchContainer = styled.div`
width: 100%;
height: 50%;
flex-direction: row;
align-items: center;
justify-content: center;
margin-top: 10px;
margin-bottom... |
const sgMail = require("@sendgrid/mail");
const sendGridKey = process.env.SG_KEY;
sgMail.setApiKey(sendGridKey);
const sendWelcomeMail = (email, name) => {
sgMail.send({
from: "jitendrakumarbhamidipati@gmail.com",
to: email,
subject: `Welcome to the APP,${name}`,
text: `Thank you for joini... |
var express = require('express');
var app = express();
var fs = require('fs')
app.get(/(.+)$/i, function(req, res){
console.log(req.params[0]);
var file_name = __dirname + req.params[0];
fs.exists(file_name,
function(exists) {
if(exists){
res.sendFile(file_name);
} else {
res.send('Error 404: F... |
import React from 'react';
import { makeStyles } from '@material-ui/core';
import Theme from '../common/Theme';
const useStyles = makeStyles(() => ({
root: {
},
title: {
color: Theme.colors.primary,
fontSize: Theme.fontSize.pageName,
fontWeight: Theme.fontWeight.pageName,
... |
import React from "react"
class Footer extends React.Component{
render(){
var tags = <div></div>
return (tags)
}
}
export default Footer |
import axios from 'axios'
class LibraryService {
constructor() {
this.app = axios.create({
baseURL: `${process.env.REACT_APP_BASE_URL}/library`,
withCredentials: true
})
}
libraryList = date_requested => this.app.get(`/${date_requested}`)
bookingLibrary = (init... |
var Slate = {
"Block": {
"create": function() {},
"createList": function() {},
"fromJSON": function() {},
"toJSON": function() {},
"isBlock": function() {}
},
"Change": {
"call": function() {},
"withoutNormalization": function() {},
"deleteBack... |
import React,{useState} from "react";
import PropTypes from "prop-types";
function Checkbox(props) {
const {className, tooltip, ariaLabel,name, labelName } = props;
const [checked,setChecked] = useState(false);
function handleInputChange(event) {
const target = event.target;
const value = target.name =... |
import {state} from '../index';
import {elements, pets,apartments} from '../views/base';
import * as viewProp from '../views/viewProp';
import * as viewWeek from '../views/week';
import * as viewPetsAndApartments from '../views/viewPetsAndApartments';
import * as messages from '../views/messages';
import {maxHours, min... |
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
... |
import vendor from './vendor';
import database from 'modules/database';
import { captureTestErrors, tryCatch, bootstrapApp } from 'modules/utils/test';
describe('vendor route resource', () => {
const app = bootstrapApp(vendor);
const request = captureTestErrors(app);
afterAll(() => Promise.all(database.sequeliz... |
import { queryDevice } from '@/services/device';
export default {
namespace: 'device',
state: {
deviceData: [],
},
effects: {
*query({ payload }, { call, put }) {
const response = yield call(queryDevice, payload);
yield put({
type: 'saveDeviceDa... |
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distribu... |
import React from "react";
import InputExample from "./InputExample";
import { InputStory } from "../Input.stories.styles";
const WithDisabledReadOnlyExampleStory = () => {
return (
<InputStory>
<h3>
<small>
<code>isDisabled</code>
</small>
</h3>
<InputExample isDisabl... |
import styled from 'styled-components'
const TextWrap = styled.div`
height: 100%;
.am-navbar-left-icon{
color:#ccc !important;
}
.am-navbar-title{
color:#666 !important;
}
.demoTitle:before,
.demoTitle:after {
border-bottom: none;
}
.am-list-body{
width:100%;
height:auto;
margi... |
import { Component, EventEmitter, Input, Output } from '@angular/core';
var PassengerCardComponent = (function () {
function PassengerCardComponent() {
this.selectedItemChange = new EventEmitter();
}
PassengerCardComponent.prototype.isSelected = function () {
if (this.selectedItem) {
... |
import "./config.js";
import "./account/index.js";
|
import React from 'react';
import '../CSS/Work.css';
// import 'materialize-css/dist/css/materialize.min.css';
class MyPost extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="PostDiv" onC... |
/*A promise is an object that may produce a single value some time in the future:
either a resolved value, or a reason that it’s not resolved (e.g., a network error occurred).
A promise may be in one of 3 possible states: fulfilled, rejected, or pending.
then() always returns a Promise, which enables you to chai... |
var pos = require('pos');
var words = new pos.Lexer().lex('Best place to live in California');
var tags = new pos.Tagger()
.tag(words)
.map(function(tag){
console.log(tag);
return tag[0] + '/' + tag[1];
})
.join(' ');
console.log(tags); |
import React from 'react';
import '../../styles/dashboard.css';
import Header from '../nav/DashboardHeader';
import Footer from '../nav/DashboardFooter';
import SideBar from '../nav/DashboardSidebar';
const Vote = () => {
return (
<div>
<Header />
<SideBar />
<div classN... |
(function(){
var BufferCache = function(){
var _cache = {};
this.get = function(cacheKey){
return _cache[cacheKey];
};
this.set = function(cacheKey, value){
_cache[cacheKey] = value;
};
this.remove = function(cacheKey){
delete _cac... |
console.log("Hello TypeScript");
//-------------------------------
// function add(num1:number, num2:number, showResult:boolean, phrase:string) {
// // if (typeof num1 !== 'number' || typeof num2 !== 'number') {
// // throw new Error ('Incorrect input')
// // }
// const res = num1 + num2
// ... |
exports.getNotFoundPage = (req,res, next) => {
res.status('404').render('stubs/404', {pageTitle: "Page is not found"});
} |
export const styles = theme => ({
headerStyle: {
marginTop: '0px',
marginBottom: '0px',
fontSize: '24px',
},
root: {
flexGrow: 1,
},
paper: {
padding: theme.spacing(2),
textAlign: 'center',
color: theme.palette.text.secondary,
},
noCaseNotesImg: {
width: '70%',
height: ... |
import {
createI18n
} from 'vue-i18n';
import {
en
} from '../languages/en'
import {
vn
} from '../languages/vn'
const messages = {
vn: vn,
gb: en
}
const i18n = createI18n({
locale: localStorage.getItem('lang') ? localStorage.getItem('lang') : 'gb',
fallbackLocale: 'en',
messages
})
... |
$(document).ready(function() {
$("input:checkbox").checkbox();
$("#form_config").rpcform({
success: function(a) {
sbar.text("Configuration appliquée")
},
error: function(a) {
sbar.error(null, "Impossible d'appliquer la configuration")
}
});
$(".for... |
//service to handle authentication
angular.module("myApp").factory("AuthenticationService", function($http, flash, SessionService) {
var cacheSession = function() {
SessionService.set('authenticated',true);
};
var unCacheSession = function() {
SessionService.unset('authenticated');
};
var checkSession = functi... |
import React from 'react';
import { connect } from 'react-redux';
import {withRouter} from 'react-router-dom'
import {Card , CardImg , Button} from 'reactstrap';
import {addCart } from '../redux/ActionCreators';
import {useDispatch} from 'react-redux';
import {ProductsButtons} from './ProductsComponent';
/*const mapS... |
const { task } = require('hardhat/config')
require('@nomiclabs/hardhat-etherscan')
require('@nomiclabs/hardhat-waffle')
require('hardhat-gas-reporter')
require('dotenv').config()
module.exports = {
networks: {
hardhat: {
forking: {
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY... |
$(window).scroll(function() {
var scrollAmount = $(this).scrollTop();
if (scrollAmount >= 300) {
$('.container').css({
'background-color': '#fff',
'height': '3.5rem',
'border-bottom-color': '#ddd',
'border-bottom-width': '1px',
'border-bottom-style': 'solid'
});
$('#nav-left,.nav-right').css(... |
'use strict';
var Structs = require('./structs');
module.exports = AbiCache;
function AbiCache(network, config) {
// Help (or "usage") needs {defaults: true}
config = Object.assign({}, { defaults: true }, config);
var cache = {};
/**
@arg {boolean} force false when ABI is immutable. When force is true,... |
export default class Circle {
constructor(animation, parentCircle = null) {
this.animation = animation
this.canvas = animation.canvasElt
this.ctx = animation.ctx
if (parentCircle === null) {
this.radius = 20 + Math.round(Math.random() * 10)
this.posX = this.ra... |
import React,{useState} from 'react'
import AddCircleIcon from '@material-ui/icons/AddCircle';
import { makeStyles,useTheme } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import useMediaQuery from '@material-ui/core/useMediaQuery';
import Grid from '@material-ui/core/Grid';
im... |
// filters the routers
import React from 'react'
import { connect } from 'react-redux'
import RouterFilter from './router_filter'
import ShareWidget from './share_widget'
const Routers = (props) => (
<div className='col-md-6 little-space'>
<ShareWidget />
<div >
<h3 className='question-... |
var app = angular.module("personal");
require("stompjs/lib/stomp");
var ws = null;
var test = "";
app.service("serverConnection", function() {
function connect(scope,store,playeraction,complie) {
var connection = new SockJS("/firstOne");
ws = Stomp.over(connection);
var position={};
... |
(function(app) {
'use strict';
function verifyRec(params) {
if (params.endDate < params.startDate) {
return 'End date must be larger or equal to start date.';
}
if (params.referenceDate < params.startDate) {
return 'Reference date must be larger or equal to start date.';
}
... |
var express = require('express');
const { resolve } = require('path');
var router = express.Router();
var conf = require('../../conf');
router.get('/', function (req, res) {
options = {};
res.render('home', {
options: options,
});
});
router.get('/description', function (req, res) {
options =... |
var tau = 6.283185307179586
var canvas = document.getElementById("canvas")
var context = canvas.getContext("2d")
UFX.draw.setcontext(context)
if (!DEBUG) {
UFX.key.watchlist = "up down left right space tab".split(" ")
}
UFX.key.init()
UFX.key.remaparrows(true)
UFX.key.qdown = true
UFX.maximize.fill(canvas, "total")
... |
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import './Recommendations.css';
import Thumbnail from '../Thumbnail/Thumbnail';
import DetailsCard from '../DetailsCard/DetailsCard';
import { getAnimes } from '../apiCalls';
const Recommendations = ({ animes, genre }) => {
const [details,... |
/* global angular */
/* global $ */
/* PlayerController */
angular.module('musicBattleApp').controller('PlayerController',['$rootScope','$scope','playerService','notificationService',
function($rootScope,$scope,playerService,notificationService){
//Scope properties
$scope.players = [];
$scope.isLoggedIn = pl... |
(function(shoptet) {
/**
* Function that fires after end of resize
*
* This function does not accept any arguments.
*/
function resizeEnd() {
if (new Date() - shoptet.runtime.resize.rtime < shoptet.runtime.resize.delta) {
setTimeout(resizeEnd, shoptet.runtime.resize.delta... |
const { Pool } = require('pg');
const pool = new Pool({
user: 'adam',
password: 'test',
database: 'photo_gallery',
port: 5432,
max: 20,
idleTimeoutMillis: 30000,
connectionTimeoutMillis: 2000,
});
pool.connect();
module.exports = {
pool,
query: (text, params, cb) => pool.query(text, params, cb),
};... |
import React from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
export default class BestStockRow extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="stockResults">
<div className="ticker">{this.props.bestStock.ticker}</div>
<div className="na... |
require.config({
baseUrl: "js"
});
define([
'apps/my_app',
'util/dispatcher'
], function(MyApp, Dispatcher) {
var app = new MyApp({el: document.body});
Dispatcher.bind('my_view:click', app.clickHandler, app);
});
|
import './App.css';
import React, {useEffect} from 'react';
import {useDispatch, useSelector} from 'react-redux';
import CardList from './components/CardList';
import SearchBox from './components/SearchBox';
import Scroll from './components/Scroll';
import ErrorBoundary from './components/ErrorBoundary';
import {reques... |
'use strict';
angular.module('PersonalWebsiteAngularApp', ['ngResource']).config(function($routeProvider) {
return $routeProvider.when('/', {
templateUrl: 'views/homeView.html',
controller: 'HomeViewCtrl'
}).when('/resume', {
templateUrl: 'views/resumeView.html',
controller: 'ResumeViewCtrl'
}).wh... |
OperacionesManager.module("ContratoApp.Editar", function(Editar, OperacionesManager, Backbone, Marionette, $, _){
Editar.Controller = {
editar: function(codigo){
var contrato = OperacionesManager.request("contratos:entity", codigo);
console.log(contrato.toJSON());
var crearPrincipal = new Editar.Princip... |
"use strict";
import React from "react";
import "bootstrap/dist/css/bootstrap.min.css";
class CityForm extends React.Component {
render() {
return (
<form onSubmit={(e) => this.props.renderForm(e)}>
<fieldset>
<label>cat name</label>
<input type="text" name="name" />
<... |
import React from "react";
import {
Grid,
Button,
FormControlLabel,
Checkbox
} from "@material-ui/core";
import { connect } from "react-redux";
import { EgretTextField, EgretSelect } from '../../egret'
import { COLORS } from '../../app/config'
const SELECT_DATA = [
{ id: 1, name: 'Commercial Real Estate' },
... |
import { parse } from 'querystring'
import createCtx from './createCtx'
import request from './request'
import theme from './theme'
const getPageQuery = () => parse(window.location.href.split('?')[1])
export {
createCtx,
request,
theme,
getPageQuery
} |
module.exports = [{
plugin: require('/Users/sfair01/Sites/sfairchild/node_modules/gatsby-plugin-offline/gatsby-browser.js'),
options: {"plugins":[]},
},{
plugin: require('/Users/sfair01/Sites/sfairchild/gatsby-browser.js'),
options: {"plugins":[]},
}]
|
import React from "react";
import { Container, Spinner } from "./styles";
function LoadingSpinner() {
return <Container>
<Spinner />
</Container>;
}
export default LoadingSpinner;
|
var storage = (function () {
return {
get : function (argument) {
// body...
},
set : function (argument) {
// body...
}
}
})(); |
const mongoose = require('mongoose');
mongoose.connect('mongodb://127.0.0.1:27017/CBP_BTC-USD', {
useNewUrlParser: true,
useCreateIndex: true,
useUnifiedTopology: true
})
const Schema = mongoose.Schema;
// Create Schema and Model
const HistorySchema = new Schema({
time: Date,
low: Number,
hig... |
module.exports = {
plugins: ['import', 'json', 'unicorn', 'sort-imports-es6-autofix', 'jest-dom'],
extends: ['airbnb-base', 'plugin:unicorn/recommended', 'prettier', 'prettier/unicorn'],
env: {
jest: true,
browser: true,
},
}
|
import styled from "styled-components";
const StyledContainer = styled.div`
margin: 5rem;
margin-top: 2rem;
`;
const Styles = {
Container: StyledContainer
};
export default Styles; |
function calculateCurrentGrade(){
//quiz
var quiz = arrayFromString(document.getElementById("quizzes").value);
var numQuizArr = convertArrayStringToNumber(quiz);
var avgQuiz = averageArray(numQuizArr);
var quizWeight = document.getElementById("quizWeight").value;
var quizWeightedAvg = weightAvg... |
import React from 'react';
import { Modal, Tabs } from 'antd';
import { connect } from 'react-redux';
import { doChangeUserLoginModalVisible } from '../../../redux/action/user.js';
import AppHeaderUserLogin from './app-header-user-login/index.js';
import AppHeaderUserRegister from './app-header-user-register/index.js';... |
import React from 'react'
import { connect } from 'react-redux'
import { Card, CardMedia, CardTitle, CardText } from 'material-ui/Card'
const SelectedVideo = ({ video }) =>
video && (
<Card style={{ flexBasis: '70%' }}>
<CardMedia style={{ position: 'relative' }}>
<iframe
allowFullScreen
... |
const knex = require("../db/connection");
function list(movieId) {
return knex("reviews as r")
.join("critics as c", "r.critic_id", "c.critic_id")
.select("r.*", "c.*")
.where("r.movie_id", movieId)
.then((data) => {
const restructuredData = data.map((review) => {
const critic = {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.