text stringlengths 7 3.69M |
|---|
import React, { Profiler, memo } from 'react'
const onRender = (id, phase, actualDuration) => {
console.log(id, phase, actualDuration)
}
const Children = ({ resource }) => {
console.log(resource)
const n = resource.num.read()
return (
<Profiler id="Children" onRender={onRender}>
<div>{n}</div>
<... |
import * as actionTypes from '../../constants/action-types'
import { connectorDetails } from '../../services/detail-service'
export default function fetchDownloadURL({ downloadURL, error, fetching, otp }) {
return (dispatch) => {
if (fetching) return
if (downloadURL || error) return
dispatch(fetchDownlo... |
meta: {
'xlsx'
:
{
exports: 'XLSX' // <-- tell SystemJS to expose the XLSX variable
}
}
map: {
'xlsx'
:
'node_modules/xlsx/dist/xlsx.core.min.js',
'fs'
: '', // <--|
'crypto'
: '', // <--| suppress native node modules
'stream'
: '', // <--|
'file-saver'
: 'node_modules/file-saver/Fil... |
import rpc from "./rpc"
export {
rpc
}
export default {
rpc
}
|
import React, { useEffect, useState } from "react";
import { Route, Switch } from "react-router-dom";
import "./App.css";
import Header from "../Header/Header";
import Footer from "../Footer/Footer";
import CardsContainer from "../CardsContainer/CardsContainer";
import SearchForm from "../SearchForm/SearchForm";
import... |
import React from 'react'
const CardContent = () => {
return <div>
<p>Card content</p>
<p>Card content</p>
<p>Card content</p>
</div>
}
export default CardContent |
// a. Nathan Ko
// b. nathan_ko@cs.uml.edu
// c. I'm a student for GUI I class
// d. I created this webpage on 11/15/16
// e. This is a multiplication table using javascript and jQuery
// f. It passed both html and css validators listed in the syllabus
// e. Sources used: W3Schools, StackOverflow, https://jquery... |
import React, { Component } from "react";
import "./css/ToDoList.css"
class ToDoItems extends Component {
subDelete = (key) => {
this.props.superDelete(key)
}
render() {
const myList = this.props.entries.map((item) => {
return <li key={item.key} onClick={() => this.subDelete(it... |
import { useState } from 'react'
import { useRouter } from 'next/router'
import Link from 'next/link'
import { auth } from '../utils/fire-config/firebase';
const Login = () => {
const router = useRouter()
const [content, setContent] = useState({ email: '', password: '' })
const onChange = (e) => {
const { v... |
var lXdelta3 = require('../xdelta3');
var fs = require('fs');
var path = require('path');
var aSrcFd = fs.openSync(path.resolve(__dirname, 'files/txt1src'), 'r');
var aDstFd = fs.openSync(path.resolve(__dirname, 'files/txt1result'), 'w');
var aPatch = new lXdelta3.PatchStream(aSrcFd, aDstFd);
aPatch.write(fs.readF... |
//Hecho por Saulo Fernandes.
//Molde de billetes.
class Billete {
constructor(valor, cantidad, index) {
this.index = index; //Posicion en el array
this.valor = valor; //Valor del billete.
this.cantidad = cantidad; //Cantidad del billete.
this.imagen = new Image(); // Imagen del billete.
... |
$(function(){
// item model
// item view
// collection
// collection view
// http://danielarandaochoa.com/backboneexamples/blog/2012/02/22/real-world-usage-of-a-backbone-collection/
// http://stackoverflow.com/questions/19713613/backbone-fetch-callback-the-proper-way
var HackathonItemModel = Backbone.Model.extend({... |
/**权限参考值_查看权限【00001】 */
var ROLE_LOOK=ROLEVALUE_ROLE_LOOK_VALUE;
/**权限参考值_添加权限【00010】 */
var ROLE_ADD=ROLEVALUE_ROLE_ADD_VALUE;
/**权限参考值_更新权限【00100】 */
var ROLE_UPDATE=ROLEVALUE_ROLE_UPDATE_VALUE;
/** 权限参考值_删除权限【01000】*/
var ROLE_DELETE=ROLEVALUE_ROLE_DELETE_VALUE;
/** 权限参考值_导出权限【10000】 */
var ROLE_DOWNLOAD=R... |
import React from 'react';
import APIEpisodes from './APIEpisodes';
import ApiImg from './ApiImg';
import Description from './Description';
import Gallery from './Gallery';
import Header from './Header';
import Spacer from './Spacer';
import Title from './Title';
const blocks = new Map();
blocks
.set('DESCRIPTION',... |
import React from 'react'
import {Link} from 'react-router-dom'
import './style.css'
class Forms extends React.Component{
state={
formTitle: '',
formDescription: '',
question: '',
answer: '',
select : [ 'select option', 'Short Answer', 'Multiple Choice', 'Checkboxes' ],
... |
var express = require('express');
var router = express.Router();
var Todo = require('../models/todo');
Todo.methods(['get', 'put', 'post', 'delete']);
Todo.register(router, '/todos');
module.exports = router; |
import { postModel } from '../../models/postModel';
export const resolver = {
Query: {
getAllPosts: () => postModel.getAllPosts(),
},
Mutation: {
createPost: (root, { input: PostInput }) => {
return postModel.createPost(PostInput);
}
}
} |
//importamos el modelo persona
var Persona = require('../Modelos/persona.js');
var md_auth = require('../Middlewares/auth.js')
//-------obtener personal --------
let obtenerPersonas = (req, res)=> {
Persona.find({}, (err, personas) => {
if (err) {
return res.status(500).json({
ok:false,
... |
(function(){
angular.module('app')
.controller('UsersController',['$route','$log','$http', '$routeParams', '$location', UsersController]);
function UsersController($route,$log,$http,$routeParams,$location){
var vc = this;
vc.items = [];
vc.user = {id:1,name:"",about:""};
... |
var alpha = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L' , 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U' ,'V' , 'W', 'X', 'Y', 'Z'];
function numberArr(int) {
// if number is 5 => alpha[4]
var newArray = [];
var count = 25;
int--;
while((int) > alpha.length){
for(var i = 0; i < alpha.lengt... |
import * as React from "react";
function VolumeHalf(props) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={16}
height={16}
viewBox="0 0 16 16"
{...props}
>
<path d="M9 4a.5.5 0 00-.812-.39L5.825 5.5H3.5A.5.5 0 003 6v4a.5.5 0 00.5.5h2.325l2.363 1.89A.5.5 0 009 12V... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Card } from 'react-bootstrap';
import { addUser } from '../redux/actions/registerAction';
import { Formik, Form, Field, ErrorMessage } from 'formik';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faUse... |
/**
* 表单验证插件
* 开发者:刘鹏
* 开发时间:2012-7-9
* 使用方法:
* jQuery对象之后直接使用.validate()方法,返回值为true|false。具体的默认参数如下:
* require : true, // 是否是必填项
* requiretext : "*必填项", // 必填项显示的文字
* min : 1, // 字符最小长度
* max : 50, // 字符最大长度
* num : false, // 是否是数字验证
* specialnum : false, // 是否是带特殊字符... |
let cont = 1;
let jogoAtivo = true;
let boot = false;
let para = false;
let nivel = '';
let tabuleiro = Array(3);
tabuleiro['a'] = Array(3);
tabuleiro['b'] = Array(3);
tabuleiro['c'] = Array(3);
tabuleiro['a']['1'] = 0;
tabuleiro['a']['2'] = 0;
tabuleiro['a']['3'] = 0;
tabuleiro['b']['1'] = 0;
tabule... |
import './index.css';
import { sidedrawer, drawerToggler, backdrop } from './js/UI';
import { showSideDrawer, hideSideDrawer } from './js/events/sideDrawer';
import { displayProductNutrient, closeProductNutrient } from './js/events/productNutrient';
if (drawerToggler) {
drawerToggler.addEventListener('click', () =>... |
// import React, { useRef } from "react";
// import { useLocalStore, useObserver } from "mobx-react-lite";
// import Typography from "@material-ui/core/Typography";
// import { createStyles, makeStyles, Theme } from "@material-ui/core/styles";
// import Checkbox from "@material-ui/core/Checkbox";
// import FormControlL... |
$('#logoutButton').click(function(e){
console.log('logoutButton');
}); |
function onLoginClick() {
window.location.href = "/login";
}
function onRegisterClick() {
window.location.href = "/register";
}
function onAboutClick() {
window.location.href = "/about";
}
function onContactClick() {
window.location.href = "/contact";
}
|
import React, { Suspense } from 'react';
import PropTypes from 'prop-types';
import { renderClientsRoutes } from '../../utils/routing.utils';
const UserRoutes = ({ initialized, modules, pages }) => (
<Suspense fallback={<div />}>{initialized && renderClientsRoutes({ pages, modules })}</Suspense>
);
UserRoutes.propT... |
export const LOAD_DETAILS = 'my-project/details/LOAD_DETAILS';
export const LOAD_DETAILS_SUCCESS = 'my-project/details/LOAD_DETAILS_SUCCESS';
export const LOAD_DETAILS_FAILURE = 'my-project/details/LOAD_DETAILS_FAILURE';
export const LOAD_REVIEWS = 'my-project/details/LOAD_REVIEWS';
export const LOAD_REVIEWS_SUCCESS =... |
import React, { Component } from 'react';
import Helmet from 'react-helmet';
import { Well } from 'react-bootstrap';
import {
SignalBar,
LocationBar,
WifiBar,
OrientationBar
} from '../../components';
export default class SocketMe extends Component {
state = {
};
render() {
const styles = require('.... |
const fName = document.querySelector('#fName');
const lName = document.querySelector('#lName');
const uName = document.querySelector('#uName');
const mail = document.querySelector('#mail');
const pWord = document.querySelector('#pWord');
const sex = document.querySelector('#sex');
const age = document.querySelector('#a... |
import moment from 'moment';
import * as requestApi from '../config/requestApi';
import applicationService from '../services/application';
export default {
namespace: 'home',
state: {
monthIn: {
RECOMMEND: '',
'SOURCE_AWARD': '',
'SALES': '',
'LIVE_EARNINGS': '',
},
userPrizeIn... |
$(function () {
num()
allTopic('')
$('.head').load("top.html")
})
//头部数字统计
var num=function () {
$.getJSON('http://127.0.0.1:9999/topic/num',function (response) {
if(response.responseCode=='1000'){
$('.num1').text(response.content.today)
$('.num2').text(response.content.y... |
/**
* Copyright (c) 2014, 2017, Oracle and/or its affiliates.
* The Universal Permissive License (UPL), Version 1.0
*/
/*
* Your dashboard ViewModel code goes here
*/
define(['ojs/ojcore', 'knockout', 'jquery', 'appController'],
function (oj, ko, $, app, data) {
function DashboardViewModel() {... |
import React, { useEffect, useState } from 'react';
import './index.css';
import SearchField from 'react-search-field';
import Header from '../Header';
import ApiService from '../../services';
import Loader from '../Loader';
import View from '../View';
// Search bar, making an api call based on keyword entered.
const ... |
function suma(a, b){
return a + b;
}
module.exports = {
suma: function (a, b) {
return a+b;
},
resta: function (a, b){
return a-b;
},
division: function (a, b){
return a / b;
},
multiplicacion: function (a, b){
return a * b;
},
par: function (a){
... |
module.exports = {
name: 'test',
description: 'TestCommand',
execute(message, args) {
message.channel.send('Rats are being experimented on');
},
}; |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
// vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisa... |
var simd = {"4RL":["15.02","f"]}; loaded(); |
// 系统繁忙
export function systemBusy() {
}
// 发送错误
export function systemPutError() {
wx.showModal({
title: '出错啦',
content: '填写信息有误',
showCancel: false
})
}
// 获取错误
export function systemGetError() {
wx.showModal({
title: '出错啦',
content: '找不到该条记录',
showCancel: false
})... |
window.addEventListener("load", function (event) {
var url_string = window.location.href;
var url = new URL(url_string);
var projectId = url.searchParams.get("project-id");
if (projectId != null) {
$('#project option[value=' + projectId + ']').prop('selected', true);
loadBillData();
... |
/**
* Created by Cjy on 2017/08/05.
*/
Ext.define('Admin.store.photoArborescence.PhotoArborescence', {
extend: 'Ext.data.TreeStore',
requires: [
'Common.Config'
],
storeId: 'photoArborescence.PhotoArborescence',
root: {
id: 0,
text: '百胜'
},
proxy: {
type:... |
/**
* Created by iraklitbz on 18/04/16.
*/
/**
* Home controller
*
* @param $rootScope
* @param $scope
* @constructor
*/
function PublishCtrl ($rootScope, $scope, $window) {
}
app
.controller('PublishCtrl', [
'$rootScope',
'$scope',
'$window',
PublishCtrl
]);
|
/**
* FuentesService.js
*
* @description :: Servicio de revision de fuentes, activa y desactiva fuentes segun sea necesario.
* @docs :: TODO
*/
var colors = require('colors'),
later = require('later');
module.exports.start = function(){
console.log("info: ".green + "Fuentes check background service starting.... |
/// <reference path="../include.d.ts" />
var rp = require('request-promise');
var Promise = require('bluebird');
var cheerio = require('cheerio');
var ew = require('node-xlsx');
var fs = require('fs');
var savePic = require('../imageProcessor').savePic;
var columns = ['Product Name','Product Category', 'Product image... |
var sql = require('./BaseModel');
// const Config = require('../globals/Config');
var timeController = require('../controllers/TimeController');
// const _config = new Config();
var Task = function (task) {
this.task = task.task;
this.status = task.status;
this.created_at = new Date();
};
Task.getBookin... |
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
//import { dashboard } from '../imports/api/tasks.js';
// import './main.html';
// list all task
// Template.body.onCreated(function bodyOnCreated() {
// // this.state = new ReactiveDict();
// Meteor.subscribe('dashboa... |
import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'gatsby'
import { Button, Flex, Box } from 'theme-ui'
import { FaChevronLeft, FaChevronRight } from 'react-icons/fa'
const pagingParam = 'page'
const styles = {
wrapper: {
justifyContent: `space-between`,
alignItems: `center`,... |
module.exports = function(module, callback) {
var npm = require("npm");
var npmconf = require("npmconf");
var configDefs = npmconf.defs;
var shorthands = configDefs.shorthands;
var types = configDefs.types;
var nopt = require("nopt");
var conf = nopt(types, shorthands);
var dataToResult... |
(function() {
// 这些变量和函数的说明,请参考 rdk/app/example/web/scripts/main.js 的注释
var imports = [
'rd.controls.Graph', 'css!base/css/custom','css!rd.styles.IconFonts'
];
var extraModules = [ ];
var controllerDefination = ['$scope', 'EventService', main];
function main(scope, EventService) {... |
const vfilter = {
stringfilter(val) {
if (val == "" || val == undefined || val == null) {
return null;
} else {
return val;
}
},
//金额处理函数保留小数点后面两位小数
disposenumber(val) {
if (val.indexOf(".") != -1) {
let listnumber = val.split(".");
... |
import { StyleSheet, Dimensions, Platform } from 'react-native';
import * as FontSizes from '../utils/fontsSizes';
const deviceHeight = Dimensions.get("window").height;
const deviceWidth = Dimensions.get("window").width;
import Globals from '../constants/Globals';
export default channelListStyle = StyleSheet.create({... |
import React, { Component } from "react";
import { Link } from "react-router-dom";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { getDogs } from "../../actions/dogActions";
import isEmpty from "../../validation/is-empty";
import DogItem from "./DogItem";
export class Dogs extends C... |
import {db} from '../firestore'
const GOT_USER = 'GOT_USER'
const LOGOUT = 'LOGOUT'
const CHOOSE_VIEW = 'CHOOSE_VIEW'
const TOGGLE_FORM = 'TOGGLE_FORM'
const initialState = {
fullName: '',
email: '',
isLoggedIn: false,
allTodos: true,
formVisible: false
}
export const gotUser = user => ({ type: G... |
angular.module('PoisRUs').service('searchService', [
'$http', '$resource', 'BaseRoutes', 'ApiRoutes',
function($http, $resource, BaseRoutes, ApiRoutes) {
var Poi = $resource(BaseRoutes.apiRoot + ApiRoutes.SEARCH_POIS);
var User = $resource(BaseRoutes.apiRoot + ApiRoutes.SEARCH_USERS);
... |
/**
Copyright 2021 fernando.reyes@du.edu
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 in writing,... |
var sdb = require('simpledb');
var uuid = require('node-uuid');
module.exports = function(config) {
this.config = config;
this.config.before_create = this.config.before_create ||
function(args, done) {
done(args.data);
}
this.config.after_create = this.config.after_create ||
function(args, done) {
}
this.co... |
import { useState, useEffect } from "react";
import axios from "axios";
axios.defaults.headers.common["Authorization"] =
"Bearer " + sessionStorage.getItem("token");
const useNetworkRequest = category => {
let url = `https://personal-website--backend.herokuapp.com/${category}`;
const [loading, setLoading] = useS... |
// TODO: improve/refactor
import { useEffect } from 'react';
const DEFAULT_POLLING_INTERVAL = 60; // in seconds
function usePolling(callback = () => {}, seconds = DEFAULT_POLLING_INTERVAL) {
useEffect(() => {
callback();
const interval = setInterval(() => {
callback();
}, sec... |
function init(slideID) {
const speechGuessContainer = d3.select(slideID).select('.checkbox-container');
const allBtns = speechGuessContainer.selectAll('.checkbox-btn');
const cowbellVid = document.getElementById('speech-5-video');
d3.selectAll('.checkbox-btn').classed('checked-correct', false);
d3.selectAll('.chec... |
"use strict";
var enzyme_1 = require('enzyme');
var React = require('react');
var index_1 = require('./index');
describe('Alert Component', function () {
it('should create an alert with the default classes', function () {
var alert = enzyme_1.shallow(<index_1["default"]>Loading...</index_1["default"]>);
... |
import React from "react";
import styled from "styled-components";
import { lightBlueBackground } from "../themes";
const Div = styled.div`
height: 9px;
${lightBlueBackground}
`;
export default function CustomHr() {
return <Div />;
}
|
const fs = require("fs")
const S = require('string');
fs.readdir('./pdf', (err, data) => {
if (err) throw err;
for (let i = 0; i < data.length; i++) {
if (S(data[i]).contains("-1")) {
//se tiene que leer el archivo
let files = "./pdf/" + data[i]
fs.readFile(... |
import React from 'react';
import {
FaFacebook,
FaPinterest,
FaTwitter,
FaInstagram,
} from 'react-icons/fa';
// Styles
import './footer.scss';
// Components
import Form from '../Forms/Form';
import H2 from '../HtmlTags/H2';
import H3 from '../HtmlTags/H3';
import Button from '../Buttons/Button';
const Foote... |
let Secretnumber = getRandomInt(1, 5);
let attempts = 3;
//комментируя вызов увидим когда работает функция
function getRandomInt(min, max){
//console.log(min);
//console.log(max);
return Math.floor(Math.random()*(max - min + 1)) + min;
}
document.querySelector(".check").onclick = function(){
let Usernumb... |
import React from 'react';
// Import Style
// import styles from '../../App/App.css';
export function AboutUs() {
return (
<div id="main-container" >
<div className="index-content ">
<div className="container">
<div className="row">
<div id="home-content"... |
/* eslint-disable no-undef */
/*
* Socket集成
* @Author: Jiang
* @Date: 2019-08-27 18:00:15
* @Last Modified by: Jiang
* @Last Modified time: 2020-03-22 10:58:54
*/
let SOCKET = '';
// 服务器断开链接
const serverDisconnect = () => {
if(!SOCKET) {
return;
}
SOCKET.on('disconnect');
};
// 断开链接
const d... |
/**
* CI server
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not e... |
import React from 'react'
import ReactDOM from 'react-dom'
import Web3 from 'web3';
import {SHA256} from 'crypto-js';
import Documents from '../build/contracts/Documents.sol.js'
let web3
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
web3 = new Web3(new Web3.providers.HttpProvi... |
import React, { useState } from "react";
import { View, Image, Dimensions, StyleSheet } from "react-native";
import {
Button,
Headline,
HelperText,
TextInput,
Modal,
Portal,
Provider,
Text,
} from "react-native-paper";
export default function LoginPage({ navigation }) {
const [visible, setVisible] = ... |
import React, { Component } from 'react';
import { Nav, NavItem } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
/*
|--------------------------------------------------------------------------
| Global View
|--------------------------------------------------------------------------
*/
... |
import React from 'react';
import {makeStyles} from '@material-ui/core/styles';
import './Footer.scss';
import Card from '@material-ui/core/Card';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
import clsx from 'clsx';
import Container from "@material-ui/core/Conta... |
import $ from '$';
import _ from 'lodash';
import d3 from 'd3';
import TableFootnotes from './TableFootnotes';
// General object for creating any table
class BaseTable {
constructor() {
this.tbl = $('<table class="table table-condensed table-striped">');
this.thead = $('<thead>');
this.col... |
import { fetchCommonPasswords } from './api.js';
import { ERRORS, SUCCESS } from './constants.js';
/**
* Retrieve the list of common passwords from the express sever
*/
export const getCommonPasswords = async () => {
const response = await fetchCommonPasswords();
const passwords = await response.text();
... |
export class InterfaceService {
static getRooms() {}
}
|
import React from 'react';
import PropTypes from 'prop-types';
const Hamburger = props => (
<button
aria-label="toggle-nav"
className={!props.ariaHidden ? 'hamburger is-active' : 'hamburger'}
onClick={() => props.toggleSideNav(true)}
>
<span className="line"></span>
<span className="line"></sp... |
import React, {Component} from 'react';
import { Input, Table, Icon, Divider,Modal,Button, Tabs, Menu,message } from 'antd';
import {Link} from 'react-router';
import PerForm from './PerForm';
import './css/supervision.css';
const Search = Input.Search;
class ToProcessed extends Component{
constructor(props)... |
import {StyleSheet} from 'react-native';
export default StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#455a64',
alignItems: 'center',
justifyContent: 'center',
},
inputContainer: {
width: '80%',
backgroundColor: 'rgba(255,255,255,0.3)',
borderColor: 'gray',
borderWid... |
import React from "react"
import styled from "styled-components"
import FooterLink from "./FooterLink"
const FooterLinkGroup1 = () => {
const links = [
{ id: 1, title: "Home", slug: "/" },
{ id: 2, title: "About", slug: "/about" },
{ id: 3, title: "Classes", slug: "/classes" },
{ id: 4, title: "Case... |
/**
* Created by hui.sun on 15/11/13.
*/
'use strict';
define(['../app'], function(app) {
app.directive('pl4Select', function() {
return {
restrict: 'EA',
replace: true,
template: '<div class="select-direvtive">'+
'<div class="form-group">'+
'<label>{{selectSetting.firstName}}:</label>'+
... |
/**
* Created by Ramon on 11-9-2017.
*/
const loggingLevels = {
silly: "silly",
debug: "debug",
verbose:"verbose",
info:"info",
warn:"warn",
error:"error"
};
// ports below the 1024 range require root access; run npm with root privileges
var config = {
portHttp: 8080,
portHttps: 443,... |
'use strict';
var path = require('path');
var _ = require('lodash');
/**
* Przygotowanie konfiguracji przez złączenie obiektu konfiguracji bazowej z konfiguracją dla środowiska wykonawczego
*/
function prepareConfig(env) {
var mergedConf = {};
try {
var envConf = require('./' ... |
import React from "react";
import "../../css/leftpanel.css";
import Header from "./header";
import ChgMain from "./chgForms/chgMain";
const LeftPanel = () => {
return (
<div className="col-md-7 panel-one">
<Header />
<ChgMain />
</div>
);
};
export default LeftPanel;
|
//Filename: views/users/UserView.js
define([
'jquery',
'underscore',
'backbone',
'collections/instagram',
'models/location',
'text!templates/projects/projectTemplate.html'
], function($, _, Backbone, InstagramCollection, Locations, videoTemplate){
var VideoView = Backbone.View.extend({
el: $('.content'),
... |
const arr = ['🍊', '🍊', '🍊', '🍊']
// a função findIndex irá retornar o índice do primeiro elemento que
// satisfazer a condição que for declarada.
// OBS: Se o elemento não existir, será retornado -1
const indiceDaPrimeiraLaranja = arr.findIndex(elemento => {
return elemento === '🍊'
})
const indiceDaPrimeiraUva... |
//Written by Nabanita Maji and Cliff Shaffer, Spring 2015
/*global ODSA */
$(document).ready(function () {
"use strict";
var av_name = "threeSATtoHCCON";
$(".avcontainer").on("jsav-message" , function() {
// invoke MathJax to do conversion again
MathJax.Hub.Queue(["Typeset" , MathJax.Hub]);
});
$("... |
/**
* Created by ZG on 2016/3/11.
*/
// 存储当前时间数字
var curtime = [];
// 获取每个页面的数字
function gettimeNum(time){
var LeftTimeNum = Math.floor(time / 10);
var RightTimeNum = time % 10 ;
curtime.push(LeftTimeNum);
curtime.push(RightTimeNum);
}
function rotatePage(i,curPageNum){
var curPageNode = documen... |
export { default } from '@upfluence/ember-upf-utils/meta-er-extractor/service';
|
`
hello git
` |
getLocation('8c800a69caf013').then((location) => {
console.log( `City: ${location.city}` )
console.log( `Region: ${location.region}` )
console.log( `Country: ${location.country}` )
}).catch((err) => {
console.log( `Error: ${err}` )
}) |
function def() {
var j = 10;
for(var i=0; i<a; i++) {
if(j%2) j+3;
}
} |
'use strict'
class ProjectController {
async create({ auth, request }) {
const Database = use('Database')
try {
await auth.check()
} catch (error) {
response.status(401);
return {
ok: false, error: {
msj: 'Token no p... |
/*jslint node: true */
'use strict';
var logger = require('../utils/logger');
var constants = require('../lib/constants'); // for the required JSON parsing error message
var async = require('async'); // enables faster responses for large payloads
var request = require('./request.js');
var plt = require('pagelt');
var ... |
define(['jquery'],
function ($) {
'use strict';
/**
* jQuery extensions
*/
var $win = $(window);
$.fn.place_tt = (function () {
var defaults = {
offset: 5,
css: {
position : 'absolute',
top : -1000,
left : 0,
color : "#c8c8c8",
padding : '10px',
... |
const config = require('../config.json')
const commands = require('../util/commandList.json')
module.exports = function (bot, message, command) {
let msg = 'Available commands are: \n\n'
for (var cmd in commands) {
if (commands[cmd].description) msg += `\`${config.botSettings.prefix}${cmd}\`\n${commands[cmd].d... |
const { assert } = require("chai");
const { expectRevert } = require('@openzeppelin/test-helpers');
const ERC5496Demo = artifacts.require("ERC5496Demo");
contract("ERC5496", async accounts => {
const Alice = accounts[0];
const Bob = accounts[1];
const Tom = accounts[2];
let demoContract;
... |
// 15. Функцийн Statement болон Expression бичиглэл
/* javascript хэлийг гайхалтай болгосон төрлүүд:
1. first class function хэл.
2. Prototype удамшилийг хэрэгжүүлдэг хэл. Энэ нь self хэлнээс гаралтай. Удамшилийг 2 янзаар хэрэгжүүлдэг.
1. Сонгодог удамшилыг хэрэгжүүлдэг жн: java class зарлах байдлаар
... |
// pages/myInf/myInf.js
//获取应用实例
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
userInfo:{},
userListInfo: [ {
icon: '../../icons/public.png',
text: '我的信息',
url: '../identityInfo/identityInfo'
}, {
icon: '../../icons/public.png',
text: '我发布的任务',
url: '..... |
import React from 'react'
import { withRouter } from 'react-router-dom'
const CreatePet = () => {
return (
<div>Cadastrar pet</div>
)
}
export default withRouter(CreatePet)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.