text stringlengths 7 3.69M |
|---|
Meteor.subscribe('infoTitle');
Template.welcomeParentCareToolkit.onCreated(function helloOnCreated() {
// counter starts at 0
// alert('hello world');
this.counter = new ReactiveVar(0);
document.body.style.backgroundColor = '#fff';
//document.body.style.color = ' #00827f !important';
});
Template.welcomePa... |
var FirstName = React.createClass({
render: function(){
return (
<div>
<label htmlFor={this.props.id}>First Name: </label>
<input id={this.props.id} placeholder="Enter your first name" type="text" value={this.props.value} onChange={this.props.onChange} />
</div>
)
}
});
var La... |
import React from "react";
import styled from "styled-components";
const BackGround = styled.div`
position: absolute;
top: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.90);
z-index: 50;
`;
const BackDrop = ({closeTokenSearch, children }) => {
return (
<BackGround onClic... |
import React from 'react';
import { Link } from "react-router-dom";
import "./style.css";
//basic layout components
import Col from "../../components/Col";
import Container from "../../components/Container";
import Row from "../../components/Row";
import logo from '../../assets/logo.svg'
function Footer () {
retu... |
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var passport = require('passport'),
FacebookStrategy = require('passport-facebook').Strategy,
GoogleStrategy = require('passport-... |
import React, { useState } from 'react';
import './App.scss';
import { makeStyles } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
import Button from '@material-ui/core/Button';
const useStyles = makeStyles((theme) => ({
root: {
'& > *': {
margin: theme.spacing(1),
... |
import React from "react";
import stream from "../../crispimage/stream.png";
const Description = () => {
return (
<section className="description container-full p-6">
<div className="content-65">
<div className="row">
<div className="desc-img col-50">
<img src={stream} alt="" /... |
$(function() {
var ttp =$("#sum").attr("value");
var ttp1=ttp;
$("input:checkbox[name^='cartId_']").prop('checked', true);
var id=0;
var inputNum=0;
$("input[name^='text_']").change(function(){
var $i=$(this).parents('td');
id=$i.find("input[name^='id_']").val();
inputNum=parseInt($i.find("input[name^='tex... |
const express = require('express'),
mongoose = require('mongoose'),
path = require('path'),
bodyParser = require('body-parser'),
flash = require('connect-flash'),
session = require('express-session'),
cookieParser = require('cookie-parser'),
passport = require('passport'),
... |
import React from 'react';
import NavigationBar from './NavigationBar';
import { MDBBtn } from "mdbreact";
import {Alert, Button, Card} from 'react-bootstrap';
class Upld extends React.Component {
constructor(props) {
super(props);
this.state = {
imageURL: '',
showSuccess: false
};
th... |
import axiosInstance from "../../../helpers/axiosInterceptor"
import { GET_CONTACTS_FAIL, GET_CONTACTS_LOADING, GET_CONTACTS_SUCCESS } from '../../../constants/actionTypes';
export default () => (dispatch) => {
dispatch({
type: GET_CONTACTS_LOADING
})
axiosInstance.get("/contacts").then((res) => {... |
/**
* Sessions access and update.
* Session has whatever data caller wants to place in the document.
*/
var db = require('./database.js'); // database connection and collection cursors
var utilityDao = require('./utility.js');
var config = db.config;
var log = config.log;
var hash = require(config.utility+'hash... |
var sqlite3 = require( 'sqlite3' ).verbose();
var q = require( 'q' );
var path = require( 'path' );
var squel = require( 'squel' );
module.exports = function( core, callback ) {
var db = {
db: new sqlite3.Database(
path.resolve( core.config.db.filename ),
callback
)
};
db.close = function() {
var de... |
new Vue({
el: "#app",
data: {
users: {}
},
methods: {
/*findById:function (id) {
var _this = this;
var url = "user/findById/"+id;
axios.get(url).then(function (result) {
_this.user = result.data;
console.log(result);
... |
import Banner from "./Banner";
import ProgressInfo from "./ProgressInfo";
import Pieces from "./Pieces";
export { Banner, ProgressInfo, Pieces };
|
import {customerSelector, getCustomer, getPolicies} from "../../../store/Selectors";
import {useSelector} from "react-redux";
const CustomerData = () => {
const customer = useSelector(getCustomer);
const policies = useSelector(getPolicies);
return (
<div className={"d-flex justify-content-around my... |
const express = require("express");
const mongoose = require("mongoose");
const cors = require("cors");
const path = require('path');
const cookieParser = require('cookie-parser');
const app = express();
const PORT = process.env.PORT || 3000;
const login = require('./backend/routes/index');
const users = require('./bac... |
import { StyleSheet, Dimensions} from 'react-native';
import { Constants } from 'expo';
const window = Dimensions.get('window');
export const styles = StyleSheet.create({
//共通--------------------------------------------
root: {
paddingTop: Constants.statusBarHeight,
},
init_root: {
flex: 1,
justi... |
import React from 'react'
import renderer from 'react-test-renderer'
import { StyleRoot } from '@instacart/radium'
import { mount } from 'enzyme'
import { spy } from 'sinon'
import Menu from '../Menu'
import MenuItem from '../MenuItem'
import MenuDivider from '../MenuDivider'
it('renders Menu with MenuItems correctly'... |
var LOGIC = (function () {
var my = {};
var settings = SETTINGS.getAll();
// Score
my.scorePlusOne = function () {
var score = STATE.getScore();
score++;
STATE.setScore(score);
DRAW.scoreUpdate(score);
};
// Point
my.generateNewPointPosition = function () {... |
import React, { useState, useCallback } from 'react';
import {
BoldExtension,
ItalicExtension,
UnderlineExtension,
YjsExtension,
} from 'remirror/extensions';
import { Remirror, useRemirror, EditorComponent } from '@remirror/react';
import * as Y from 'yjs';
import { Doc } from 'yjs';
import useWebRtcProvider ... |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
// import "assets/css/nucleo-svg.css";
// import "assets/css/nucleo-icons.css";
// import "@fortawesome/fontawesome-free/css/all.min.css";
// import "assets/scss/argon-design-system.scss?v1.0.0";
//import "assets/vendor/nucleo/css/n... |
// Promenljive
// Evaluate what answers you would get if you ran this in the
// Javascript Console in Google Chrome. Answer the questions then
// check them by copying them and running it in the console yourself
// line by line
// add variable "firstName" and "lastName" // so that they equal your name
var ime = ... |
var Explosion = cc.Sprite.extend({
active: true,
animation: null,
ctor: function () {
var pFrame = cc.spriteFrameCache.getSpriteFrame("explosion_01.png");
this._super(pFrame);
this.setBlendFunc(cc.SRC_ALPHA, cc.ONE);
this.animation = cc.animationCache.getAnimation("Explosion"... |
/**
* 编辑或新增规格
*/
import React, { Component, PureComponent } from "react";
import {
StyleSheet,
Dimensions,
View,
Text,
Button,
Image,
ScrollView,
TouchableOpacity
} from "react-native";
import { connect } from "rn-dva";
import Header from "../../components/Header";
import CommonS... |
/**
* Created by 编程只服JAVA on 2017.07.13.
*/
var arr = [1,43,23,56,12,12];
function selectSort(Array)
{
// 临时变量,用于交换
var temp = 0;
var minIndex = 0;
// 要注意一点,当要排序 N 个数,已经经过 N-1 次遍历后,已经是有序数列
for(var i = 0; i < Array.length - 1; ++i)
{
// 用来保存最小值得索引
minIndex = i;
// 寻找第... |
import React from "react";
import {Card, Tag} from "antd";
const ColorTag = () => {
return (
<Card title="Color Tag" className="gx-card">
<h4 style={{marginBottom: 16}}>Presets:</h4>
<div>
<Tag color="magenta">magenta</Tag>
<Tag color="red">red</Tag>
<Tag color="vo... |
import React, { Component } from "react";
import { StatusBar, Animated, Image, View, Text, ImageBackground, AsyncStorage, Alert, Platform } from "react-native";
import { Container } from "native-base";
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import NavigationService from '../u... |
import React from "react";
import PropTypes from "prop-types";
import { Popup } from "./Popup";
export class LoadingPopup extends Popup {
constructor(props) {
super(props);
this.state = {
timeoutId: -1
};
}
componentDidUpdate(oldProps) {
if (oldProps.isLoading &&... |
const Connection = require("./Connection");
class Orm {
selectAll() {
console.log("Hello");
}
insertOne() {
console.log("HI");
}
updateOne() {
console.log("Blah");
}
}
module.exports = Orm;
|
const FixSvText = () => {
function fixsvtxt(mes) {
try {
return decodeURIComponent(escape(mes));
} catch (e) {
String.prototype.replaceAll = function(str1, str2, ignore) {
return this.replace(
new RegExp(
str1.replace(
/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g,
'\\$&'
... |
// your components will all go in this `component` directory.
// feel free to change this component.js into TodoList.js
//
import React from 'react';
const TodoList = props => {
return (
<div>
{props.list.map((item, index) => {return <p
className={item.complete ? 'done' : 'notDone'}
... |
var Game = require('./model');
var Season = require('../season/model');
module.exports = {
getGames: (req, res, next) => {
Game.find().then((docs) => {
res.status(200).send(docs)
}, (err) => {
res.status(400).send(err)
});
},
getSingleGame: (req, res, next) => {
id = req.params.id;
Game.find({ _id: ... |
const db = require("../../database/models");
const { Op } = require("sequelize");
const apiPedidos = {
findAll: async (req, res) => {
const allPedidos = await db.Pedido.findAll({
logging: false,
attributes: ["cantidad", "createdAt"],
where: { compra_id: null },
... |
// @flow
const PATH: { [path: string]: string } = {
TOP: '/',
GAME: '/game',
}
export default PATH
|
import Fruit from './fruit';
export default class extends createjs.Container {
constructor(x = 0, y = 0, distanceToGround, wordlist) {
super();
this.distanceToGround = distanceToGround;
this.wordlist = wordlist;
this.x = x;
this.y = y;
this.fruits = [];
this.spawnFruit();
this.o... |
import React from 'react';
import ReactDom from 'react-dom';
import MyNavBar from './myNavBar.js'
ReactDom.render(
<div>
<h2>Hello REACT !!</h2>
<MyNavBar name="dexter" />
</div>,
document.getElementById("root")
);
|
const
express = require('express'),
router = express.Router(),
authorize = require('../../auth/authUtils/auth-mid.js'),
addJob = require('./addJob.js'),
removejob = require('./removeJob.js'),
updateJob = require('./updateJob.js'),
getJobs = require('./getJobs.js');
// add a job to your list of jobs
router.p... |
import itemTemplate from '../devtools/timeLineItem.js'
import arrayBufferTo from './arrayBufferTo.js'
URL.prototype.Host = function () {
return this.host.replace('www.', '')
}
const __ = chrome.i18n.getMessage
const DEBUG = true
const reqFilters = ['*://api.exponea.com/*', '*://api.infinario.com/*']
var ports = { }
... |
const context = {
title: 'Welcome to Musicon',
button: 'Shop now',
body: 'Musicon is a budding musical storefront with a mission to share the joy of music. These magnificent auditory tools are designed with musical creators, like you, in mind. Hobbyists, beginners, and experts alike can appreciate the resplendent... |
import Label from "../label";
import "./index.css";
import Icon from "../Icon";
class File {
constructor(props) {
this.fileName = new Label({ name: props.name, className: "file-label" });
this.fileLayout;
this.name = props.name;
this.type = props.type;
this.image = props.image;
this.height = ... |
class InputManager {
constructor() {
this.attach_callbacks();
this.keyboard_buffer = new Array(32).fill(0.0);
}
attach_callbacks() {
$(document).mousemove((x) => this.update_mouse(x))
$(document).keyup((x) => this.update_keyboard(x.which))
}
update_mouse(event) {
... |
/**
* 前提条件 express服务(4.0) mysql数据库 与前端属于不同域
* 后台服务运行正常
*/
var mysql =require('mysql'); //数据库连接
var express = require('express'); //express服务
var bodyParser = require('body-parser'); // 消息体解析
// .. 省略其余代码
// 服务端支持跨域CORS
var allowCors = function(req, res, next) {
res.header('Access-Control-Allow-Origin... |
angular.module('app.pages.hello')
.controller('HelloCtrl', function () {
var vm = this;
vm.name = 'World';
}); |
import {
GET_OFFICE_REQUEST,
GET_OFFICE_SUCCESS,
GET_OFFICE_FAILURE,
} from '../constants/office.constants';
import api from '../services/api';
//GET OFFICE
export const getOffice = () => (dispatch) => {
dispatch({ type: GET_OFFICE_REQUEST });
api.get('/offices')
.then((res) => {
const { data } = ... |
const mysql = require('mysql');
const con = mysql.createConnection({
host: "rm-d9ji2vf8691hofn3amo.mysql.ap-southeast-5.rds.aliyuncs.com",
user: "elnuhdba",
password: "cricket169!",
database: "bkpsdmd",
//dateStrings:true,
//timezone: "Asia/Jakarta",
});
con.connect(function (err){
if(err)... |
const keywordExtractor = require('keyword-extractor')
const KeywordBank = require('../../src/twitter/keyword-bank')
describe('KeywordBank', () => {
it('should extract keywords using keyword-extractor', () => {
const keywordBank = new KeywordBank()
const sentence = 'This is a sentence with some keywords for t... |
const router = require("express").Router();
const Contrat = require("./DBtable");
const fs = require('fs');
const path = require('path');
var pdf = require('html-pdf');
const verification = require("./verification")
var bool;
router.get('/contract', (req, res) => {
Contrat.findAll().then((data) => {
res.json(da... |
'use strict'
const Lucid = use('Lucid')
class Type extends Lucid {
matracs () {
return this.hasMany('App/Model/Matrac')
}
}
module.exports = Type
|
import { useState, useEffect, useContext } from "react";
import Masthead from "../components/masthead";
import { dateFormat } from "../helpers/dateformat";
import { indexStyles } from "../styles/index-styles";
import PostContext from "../context/posts";
function Index() {
const { posts, tags } = useContext(PostConte... |
const common = require('./common.js');
const customer = require('./customer.js');
module.exports = {
common,
customer,
} |
/*
Write:
function summaryRanges(nums)
that given a sorted array of numbers, returns the summary of its ranges.
Examples:
summaryRanges([1,2,3,4]) === ['1->4']
summaryRanges([0, 1, 2, 5, 6, 9]) === ["0->2", "5->6", "9"]
summaryRanges([0, 1, 2, 3, 3, 3, 4, 5, 6, 7]) === ["0->7"]
summaryRanges([0, 1, 2, 3, 3, 3, 4, 4... |
const createError = require('http-errors');
const express = require('express');
const path = require('path');
const cookieParser = require('cookie-parser');
const logger = require('morgan');
const compression = require('compression');
const helmet = require('helmet');
const connection = require('./config/db');
const mo... |
module.exports.home= function(application, req, res){
res.render('index');
}; |
var searchData=
[
['forcedblink_58',['ForcedBlink',['../dc/db8/class_eyelid_controller.html#a7f9ab7cba044ec8701c1eaf7bd8e49ec',1,'EyelidController']]]
];
|
module.exports = function (){
try {
this.removeTable('discord_users');
} catch (e) {
console.log("[ERR] Could not delete discord_users table.");
}
try {
this.removeTable('discord_user_vehicles');
} catch (e) {
console.log("[ERR] Could not delete discord_user_vehicles table.");
}
this.creat... |
import jwt from 'jsonwebtoken';
require('dotenv').config()
const { SECRET_KEY, EXPIRES_IN } = process.env;
export default async (user) => {
const payload = {
id: user._id,
username: user.username,
time: new Date()
};
const token = await jwt.sign(payload, SECRET_KEY, {
expiresIn: EXPIRES_IN
})... |
var locationOrigin = location.origin;
var schemaControl = document.getElementById("schema");
var tableControl = document.getElementById("table");
var inClusterControl = document.getElementById("selInCluster");
var outClusterControl = document.getElementById("selOutCluster");
var selectStatementControl = document.getEl... |
import React, { Component } from 'react';
import { View, Text, Image } from 'react-native';
import { CardSectionNoBorder, Button } from '../../Common'
import { Actions } from 'react-native-router-flux';
import Icon from 'react-native-vector-icons/FontAwesome';
class WelcomePage1 extends Component {
state = {
... |
var array = [{ index : 1, cd : 'a', up_cd : 'z'}
, { index : 2, cd : 'b', up_cd : 'a'}
, { index : 3, cd : 'a', up_cd : 'b'}
, { index : 4, cd : 'e', up_cd : 'b'}
, { index : 5, cd : 'c', up_cd : 'a'}
, { index : 6, cd : 'f', u... |
var BundleCode = require("../../plasma/BundleCode");
var Plasma = require("organic").Plasma;
var Chemical = require("organic").Chemical;
var path = require("path");
xdescribe("BundleCode", function(){
var plasma = new Plasma();
var config = {
"cwd": {
"root": "/tests/data/client/",
},
"useCach... |
import { get,post,put,del } from './tools';
import * as _config from './config';
//====== token api
export const obtainToken = params => post({url:`${_config.API_TOKEN_URL}/acquire`, data:params,config:{'Accept':'application/json'}});
//====== menu api
export const findLeftMenus = params => get({url:`${_config.API_ME... |
import React, { useState, useCallback } from 'react';
import Modal from 'react-modal';
import Prompt from '../components/core/Prompt';
import uiStrings from '../ui-strings';
Modal.defaultStyles.overlay.backgroundColor = 'rgba(0, 0, 0, 0.6)';
Modal.defaultStyles.overlay.zIndex = '1111';
Modal.defaultStyles.overlay.just... |
define(['apps/base/base.service'],
function (module) {
module.factory("chatClient", function ($window, $rootScope, wsAddress, $timeout, notifyClient) {
// ws连接对象
var ws = undefined;
// 所有消息
var _clientMessages = {};
// 未读消息
var _cl... |
var numberFive=5;
var harshithaName="Harshitha"
if(numberFive<1){
console.log("Its below 1 ")
}else{
console.log("Its greater than one ")
}
switch(harshithaName) {
case "Harshitha":{
console.log("Hey Harshitha")
break;
}
case "Mukil":{
console.log("Hey Mukil")
break... |
// ---------------------------------------------
// Davis Putnam Core Functions
// ---------------------------------------------
(function(DavisPutnam) {
// Init Davis Putnam with total number of atoms
DavisPutnam.init = function(atom_count) {
this.atoms = [];
this.values = [];
for(var i=0;i<atom_count;i++) ... |
/*jshint globalstrict:false, strict:false, maxlen: 500 */
/*global fail, assertEqual, AQL_EXPLAIN */
////////////////////////////////////////////////////////////////////////////////
/// @brief tests for Ahuacatl, skiplist index queries
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-2016 ArangoDB GmbH, Cologne... |
/**
* @name BigNumber
* @param n
* @constructor
*/
function BigNumber(n) {
if (typeof n === 'number') {
n += '';
}
this.value = n;
}
/**
* @name equalizeMemberLengths
* @function
* @private
* @description
* Both members in a add operation should have same length, even thou we are only a... |
// function proses(){
// try {
// alert("mulai");
// return "result";
// } catch (err){
// alert(alert.message);
// } finally{
// alert("Selesai");
// }
// }
// proses();
function proses(){
try {
throw new error("Error!!");
} catch (e){
if("can't handle the error") {
}
... |
import React, { useState, useEffect } from 'react'
import { useSelector, useDispatch } from 'react-redux'
import { Button } from 'react-bootstrap'
import PolesModal from '../../components/poles/PolesModal'
import PolesTable from '../../components/poles/PolesTable'
import { fetchPoles } from '../../store/ducks/poles/fet... |
const allPictures = [
"pics/argentina.png",
"pics/australia.png",
"pics/belgium.png",
"pics/brazil.png",
"pics/canada.png",
"pics/chile.png",
"pics/china.png",
"pics/colombia.png",
"pics/denmark.png",
"pics/finland.png",
"pics/france.png",
"pics/germany.png",
"pics/hong-kong.png",
"pics/indi... |
(function() {
'use strict';
angular.module('app.funcionarios.controller', [])
.controller('FuncionariosCreateCtrl', FuncionariosCreateCtrl)
.controller('FuncionariosListCtrl', FuncionariosListCtrl)
.controller('FuncionariosUpdateCtrl', FuncionariosUpdateCtrl);
FuncionariosCreateCtrl.$inject = ['$loc... |
var imageViewDiv = document.getElementById('image-view-div');
var viewImage = function(imgSrc, background = 'transparent') {
viewBoxImageMouseDown = false;
imageViewDiv.style.display = 'block';
var boxImage = document.getElementById('image-view');
boxImage.src = imgSrc;
boxImage.style.backgroundC... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "f3bda9e86dfef8ea122835fbce20ac99",
"url": "/index.html"
},
{
"revision": "18ba21e515ec576edb68",
"url": "/static/css/main.21daf9cd.chunk.css"
},
{
"revision": "7e4252405ccced4f8d35",
"url": "/static/js/2.... |
const getS3 = () => {
let s3;
if (!s3) {
const { AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY } = process.env;
const AWS = require("aws-sdk");
AWS.config.update({ region: "us-east-2" });
s3 = new AWS.S3({
accessKeyId: AWS_ACCESS_KEY,
secretAccessKey: AWS_SECRET... |
import Repository from "./Repository";
class CommentRepository extends Repository {
constructor() {
super('Comment');
}
/**
* Finds a comment by its ID
* This overrides the base repository function
* @param id
* @param db
* @returns {Promise}
*/
findById(id, db) ... |
import React from "react"
import style from "./Sidebar.module.css"
import { useStateValue } from "./../../context/StateProvider"
import Logo from "./../Logo";
import HomeIcon from "@material-ui/icons/HomeOutlined"
import SearchIcon from "@material-ui/icons/Search"
import LibraryIcon from "@material-ui/icons/Lib... |
import { CrudStore } from '../crudStore/crudStore';
import crudService from '../../services/crudService/crudService';
const usersActions = {
async fetchUsers({ dispatch }) {
await Promise.all([
dispatch('roles/get', null, { root: true }),
dispatch('get')
]);
}
};
class RolesStore extends CrudS... |
/**
* A 1/2 second fade out animation.
* @class TVFadeOut
* @constructor
* @param el {HTMLElement} the element to animate
* @param callback {Function} function to invoke when the animation is finished
*/
YAHOO.widget.TVFadeOut = function(el, callback) {
/**
* The element to animate
* @property el
... |
const firstTriangleNumberWithOverNDivisors = n => {
let nth = 0
let nthTriangle = 0
let divisors = 0
while(divisors <= 500){
nth++
divisors = 0
nthTriangle += nth
if(nthTriangle > 500) {
for(let i = 1; i <= Math.sqrt(nthTriangle); i++){
if(nthTriangle%i === 0){
divisors++... |
var main = angular.module('main');
var mainControllers = {
BookShelfController: function ($scope, $http, $rootScope, cookies) {
// information about user logged in or not
$scope.loggedin = (cookies.getCookie("username") !== '');
$scope.admin = cookies.getCookie("admin");
// data containers:
// lis... |
const ActiveProcessGroup = require('../models').ActiveProcessGroup;
const SharedController = require('./SharedController');
ActiveProcessGroupController = {
index(req, res) {
return ActiveProcessGroup.findAndCountAll()
.then(activeProcessGroups => res.status(200).send({ ActiveProcessGroups: act... |
function myFunction() {
document.getElementsByClassName("topnav")[0].classList.toggle("responsive");
}
/* COMMENTS LAST BORDER REMOVAL */
$(function() {
var comments = $('div.article-comment-top');
var last = comments.last();
last.css({ borderBottom : 'none' });
});
function myButtonFunction() {
consol... |
let marioTextureImageSource = "http://i.imgur.com/KxFBFbe.png?1";
let groundBlockTextureImageSource = "http://i.imgur.com/53tE88X.png";
let undergroundBlockTextureImageSource = "http://i.imgur.com/w34IpSn.png";
let brickTextureImageSource = "http://i.imgur.com/VuAeSyH.png";
let undergroundBrickTextureImageSource = ... |
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import Field from '../Field';
import DisplayErrors from '../DisplayErrors';
import RegisterStyle from '../FormStyle';
const Register = ({
username,
email,
password,
confirmedPassword,
changeValue,
regis... |
// ES6 -> ECMAScript versão 6, de 2016
// Toda vez que o arquivo tem export (sem default), a importação precisa
// acontecer entre chaves (desestruturação)
import { numeros } from './includes/dados.mjs' // esse ponto representa a pasta atual, desce para a pasta includes e desce para dados
// Podemos importar só o que... |
const { readdirSync } = require('fs');
const auth = (ctx, next) => {
// 判断登录状态, 用户权限
if (!ctx.session.accessToken) {
ctx.code = 'REQUEST_FORBIDDEN';
return ctx.status = 403;
}
return next();
};
const files = readdirSync(__dirname);
export default (app) => {
// app.prefix('/api');
files.forEach((fi... |
module.exports = {
THUMB_WIDTH: 120,
THUMB_HEIGHT: 120,
"s3": {
"bucket": "futran",
"accessKeyId": "AKIAI7XDMZBIUXTDLFCA",
"secretAccessKey": "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",
"s3URL": "https://futran.s3.amazonaws.com/",
"folder": {
"aLarge": "aL... |
// Call the dataTables jQuery plugin
$(document).ready(function() {
$('#dataTable').DataTable({
dom:'Bfrtip',
buttons:[
'copy','csv','excel','pdf','print'
]
});
});
|
const container = document.querySelector('#container')
let num = 8;
let nodeList = []
let width = (800/num) + 'px'
function addSquares() {
return num * num
}
function sketch(divCount) {
if (num > 100) {
alert('Value is too high')
} else if (num < 100){
divCount = addSquares()
for (let i = 0; i < divCount; ... |
/************************
des: form数据转json
date: 2017/01/06
auth: mike
************************/
import ngApp from '../../components/app';
export default ngApp.service('formToJson', function() {
this.toJson = (form,extendobj) => {
var o = {};
var a = form.serializeArray();
$.each(a, function() {
if (o[this.... |
import { useState } from "react"
import './App.css';
import Characters from "../Characters/Characters"
import Single from "../Single/Single"
const App = () => {
const [stateId, setStateId] = useState(null)
return (
<div className="App">
<header>
<h3 onClick={() => setStateId(null)}>Rick and ... |
import React from 'react';
import {View, StyleSheet} from 'react-native';
import {Button} from 'react-native-elements';
import Colors from '../../constants/Colors';
const LinkButton = ({title, onPress}) => {
return (
<View style={styles.buttonBlock}>
<Button
style={styles.button}
type="clea... |
import React from 'react'
function PatientList() {
return (
<div>
<h1>Patient List Page</h1>
</div>
)
}
export default PatientList
|
import './_firTree.scss';
import React from 'react';
import PropTypes from 'prop-types';
const FirTree = ({ x, y }) => {
return (
<div
className='firTree'
style={{
left: x,
top: y,
}}
>
</div>
)
}
FirTree.propTypes ... |
const fs = require('fs'), path = require('path');
const input = fs.readFileSync(path.join(__dirname, './first-puzzle.input'), 'utf-8').split('\r\n');
const getBagsCount = (input) => {
let bags = ['shiny gold'];
let processedBags = [];
let count = 0;
while (bags.length > 0) {
let currentBag = b... |
/*--------- jQuery ---------*/
$(document).ready(function () {
/*--------- scroll ---------*/
var menu = $('.menu'),
menuLinks = menu.find('a');
menuLinks.on('click', function (event) {
event.preventDefault();
var id = this.hash;
$('html, body').animate({ scrollTop: $(id).offset().top }, ... |
//Entity: EntidadCSSS
//EntidadCSSS. (Button) View: EstudianteCSSSForm
//Evento ExecuteCommand: Permite personalizar la acción a ejecutar de un command o de un ActionControl.
task.executeCommand.VA_VABUTTONEOZOFXC_955710 = function( entities, executeCommandEventArgs ) {
executeCommandEventArgs.commons.execServe... |
adminModule.controller('sectionController', SectionController);
SectionController.$inject = [
'sectionRequest'
];
function SectionController(sectionRequest) {
var ctrl = this;
ctrl.section = {};
ctrl.init = init;
ctrl.getSection = getSection;
ctrl.editSection = editSection;
ctrl.generate... |
describe('P.views.log.set.Reps', function() {
var View = P.views.log.set.Reps,
Set = P.models.sets.Set;
describe('time strings', function() {
var view;
beforeEach(function() {
view = new View({
model: new Set({
reps: '1:00'
})
});
view.render();
});
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.