text stringlengths 7 3.69M |
|---|
var searchData=
[
['bandwidth_5fweight_5frule_5ft',['bandwidth_weight_rule_t',['../or_8h.html#a391c33d526d1e1210b4e9a6e85b21268',1,'or.h']]],
['bidi_5fmap_5fentry_5ft',['bidi_map_entry_t',['../rephist_8c.html#afe776d732ebba6b2d589fd3ecc9e4544',1,'rephist.c']]],
['bridge_5fline_5ft',['bridge_line_t',['../config_8h... |
import React from 'react';
import FeIcons from 'components/FeIcons';
import SlideCaption from '../SlideCaption/SlideCaption';
export const Slide = (props) => {
let style = ' item carousel-img ';
if (props.index === props.initialSlideIndex) {
style = 'active ' + style;
}
return (
<div className={style} style={{... |
import { Grid } from '@material-ui/core';
import React, {useState, useEffect} from 'react'
import { makeStyles } from '@material-ui/core'
import useCIForms, {Form} from '../components/useCIForms';
import Control from '../components/controls/Control';
import * as ciServices from '../service/ciServices'
const initial... |
import './index.less'
import {Modal, Form, Input, Button} from "antd";
import React from 'react'
import FormItem from "antd/es/form/FormItem";
export default class modal extends React.Component {
constructor(props) {
super(props)
this.state = {
form: props.form
}
}
com... |
const e = require("express");
let express = require("express");
let router = express.Router();
let mongoService = require('./mongo/service');
router.get(
"/testQuery",
(req, res) => {
if (req.query.date && req.query.product) {
const dateQuery = req.query.date.split(',');
console... |
import logo from './pics/jh.png';
// import tests from './pics/tests.png';
import usatoday from './pics/usatoday.png';
import abcnews from './pics/abcnews.png';
import mashable from './pics/mashable.png';
import { checkURL } from './js/urlChecker'
import { handleSubmit } from './js/formHandler'
import './styles/resets.... |
import BaseLfo from '../../src/core/BaseLfo';
/**
* node that make assertions against expected frames
*/
class Asserter extends BaseLfo {
constructor(asserter) {
super();
this.asserter = asserter;
this.counter = 0;
}
setExpectedFrames(frames) {
this.expectedFrames = frames;
}
processSign... |
import React from 'react';
import { Table, Popconfirm, message } from 'antd';
import { $axios } from '@/utils/interceptor';
import 'moment/locale/zh-cn';
import useAntdTable from '@/hooks/useAntdTable';
import useBreadcrumb from '@/hooks/useBreadcrumb';
import useMount from '@/hooks/useMount';
import { useSelector }... |
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, TextInput,LayoutAnimation,Animated,Image, TouchableOpacity} from 'react-native';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to r... |
import React from 'react';
import './Comment.css';
function Comment(props) {
const date = new Date(props.date);
return (
<div className="comment" data-id={props.id}>
<time className="date" dateTime={date.toDateString()}>{date.toDateString()}</time>
<div className="content">{prop... |
import template from './navigation.jade'
var navigation = [
() => {
return {
restrict:'E',
template:template
}
}
]
export default angular.module('navigation',[])
.directive('zfNavigation',navigation)
.name |
import React, {Component} from 'react'
import Create from './Create.jsx'
import Detail from './Detail.jsx'
class Form extends Component {
static propTypes = {
open: React.PropTypes.bool,
edit: React.PropTypes.bool,
schema: React.PropTypes.array,
hide: React.PropTypes.func,
selectedItem: React.Pr... |
const products = [
{
id: 1,
name: 'Pencil',
price: 8,
description: 'A pencil is an implement for writing or drawing, constructed of a narrow, solid pigment core in a protective casing that prevents the core from being broken and/or marking the user hand.'
},
{
id: 2,
... |
Session.setDefault('choosenRecipes', []);
Template.SearchRecipe.onRendered(function() {
this.subscribe('allRecipes');
});
Template.SearchRecipe.onCreated( () => {
let template = Template.instance();
template.searchQuery = new ReactiveVar();
});
Template.SearchRecipe.helpers({
query() {
return Template.... |
const requestURL = 'http://localhost/PoliAPI//Official/GetOfficials/1';
fetch(requestURL)
.then(function (response) {
return response.json();
})
.then(function (jsonObject) {
console.table(jsonObject);
const officials = jsonObject;
for (let i = 0; i < officials.length; i++)... |
import React, { Component, Fragment } from 'react';
import ReactMapGL, { Marker } from 'react-map-gl';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Creators as DeveloperActions } from '../../store/ducks/developer';
import Modal from '.... |
import React from 'react';
import './styles/Eventos.css';
import AgileInnova from '../img/logo-agile.png'
class Eventos extends React.Component{
render(){
return(
<section className="eventos">
<div className="container">
<h2 className="h4 mb-3">MÁS SOBRE MI EXPERIENCIA</h2>
<... |
$(document).ready(function () {
$("a#buttonUp").click(function () {
$("html, body").animate({
scrollTop: 0
}, "slow");
return false;
});
var btnUp = $('a#buttonUp');
var elemBtnW = $('header h1');
var zapuskBtnUp = false;
if ($('a').is('#buttonUp')) {
zapuskBtnUp = true;
} else {
zapu... |
//Mostra o dobro de um valor qualquer
var assert = require('assert')
function showDouble(valor){
return valor * 2;
}
//
// Testes
//
try {
assert.equal(10, showDouble(5));
} catch(e) {
console.log(e);
}
console.log(showDouble(9)) |
//Entity: EntidadClienteBusquedaGrupoA
//EntidadClienteBusquedaGrupoA. (Button) View: FormularioFacturacionClientesGrupoA
//Evento ExecuteCommand: Permite personalizar la acción a ejecutar de un command o de un ActionControl.
task.executeCommand.VA_VABUTTONWLKKQSA_336924 = function( entities, executeCommandEventArgs... |
import './style.css';
import React, { useEffect, useState, useContext } from 'react';
import { Link, Redirect } from 'react-router-dom';
import API from '../../Utilities/API';
export default function Registration() {
const [redirect, setRedirect] = useState(false);
const [user, setUser] = useState({
firstName:... |
var menuRouteEntry = require('./menu')
var articleDetailsRouteEntry = require('./articleDetails')
var articleListRouteEntry = require('./articleList')
// 路由配置
var routes = {
'/menu': menuRouteEntry,
'/articleDetails': articleDetailsRouteEntry,
'/articleList/:key' : articleListRouteEntry,
}
gRouter = Route... |
const socialMediaFooter =()=>{
const body = document.querySelector('body');
const footer = document.createElement("footer");
footer.innerHTML = `<a href="https://github.com/shalommoise" target='_blank'>
<img class="footericon" src="./pictures/socials/git hub logo.png" alt="GitHub" /></a>
<a... |
// la fonction showArticlesByDate affiche les genres possible
const showArticlesByDuration = () => {
let html = '';
html += `
<div class="form-check">
<form id="formSearchedByDuration">
<div class="form-check">
<input class="form-check-input" type="radio" name="durationMax" value="3... |
/**
* @fileOverview Carousel View Module File
*
* @author Zach Walders
*/
STATUS.Carousel = function($) {
'use strict';
var $window = $(window);
/**
* Determines current wrapper and creates carousels for each related wrapper found
*/
var CarouselFactory = function(options) {
this... |
module.exports = {
before: {
all: [],
find: [],
get: [],
create: [
context => {
const { app, data, params } = context;
return app.service('push-notification-subs')
.find({
query: {
token: data.token
}
}).then(subs => {
... |
/**
* @author v.lugovsky
* created on 16.12.2015
*/
(function () {
'use strict';
angular.module('BlurAdmin.pages.app.warehouse', [
'BlurAdmin.pages.app.warehouse.polocation',
'BlurAdmin.pages.app.warehouse.poimport',
'BlurAdmin.pages.app.warehouse.import',
'BlurAdmin.pages.app.warehouse.stockcou... |
import React, {useEffect, useState} from 'react'
import axios from 'axios'
import { v4 as uuidv4 } from 'uuid';
import NewsItem from './NewsItem'
const fetchData = async (setData, setError, keyword ='') => {
try {
const response = await axios(`http://localhost:8081/api/news?keyword=${keyword}`)
se... |
(function(){
$(document).ready(function(){
var video = document.querySelector("#videoElement");
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;
if (navigator.getUserMedia)... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var default_rules_1 = require("./default-rules");
var rule_1 = require("./rule");
var RulesManager = (function () {
function RulesManager(htmlInputElement) {
this.htmlInputElement = htmlInputElement;
}
RulesManager.appendRu... |
(function () {
'use strict';
//Localstorage and Sessionstorage ids
const LOCALSTORAGE_ID = "deez-web-app-dylan";
const SESSIONSTORAGE_ID = "last-search-deez-web-dylan"
//Button to launch the search
const startSearch = $('#submitInput');
//Array with all your fav songs
let favorites = ... |
import React,{useState} from 'react';
import {Card,Form, Button, Container, Row, Col, InputGroup, FormControl, Badge, FormGroup} from 'react-bootstrap';
import {Input} from 'reactstrap';
import axios from 'axios';
import {
Redirect
} from "react-router-dom";
import "../Postaproject.css";
import button1 from '.... |
import React, {useEffect, useState} from 'react';
import {CircularProgress, makeStyles} from "@material-ui/core";
import Paper from "@material-ui/core/Paper";
import useInput from "../../hooks/useInput";
import Input from "../Common/Form/Input";
import FileInput from "../Common/Form/FileInput";
import useFileInput from... |
'use strict';
import {
UnknownValueError
} from 'Error.js';
import {
formatNumber,
CALC_DISPLAY_ERROR,
CalcDisplay,
} from './display/CalcDisplay.js';
/**
* @readonly
* @enum {number}
*/
const CalcState = {
NUM1: 0, // 123
OPER: 1, // 123 +
NUM2: 2, // 123 + 456
EQ: 3, // 123 + 456 =
ERR: 4 ... |
import React, { Fragment } from "react";
import styled from "styled-components";
const ViewTag = props => {
const { url, name } = props[0];
return (
<Fragment>
<StyledViewTag>
<img src={url} alt={name} />
<div>{name}</div>
</StyledViewTag>
</Fragment>
);
};
const StyledViewTag... |
var CONSTANTS = require('../constants/constants');
var Session = function ( PostGre ) {
this.register = function ( req, res, options) {
if(req.session && options && req.session.userId === options.userId){
return res.status( 200 ).send( { success: CONSTANTS.LOG_IN, cid: options.id } );
... |
//returns the test score
function scoreTest(str, right, omit, wrong){
for(var i = 0, sum = 0; i < str.length; i++) {
switch(str[i]) {
case 0:
sum += right;
break;
case 1:
sum += omit;
break;
case 2:
sum -= wrong;
break;
}
}
return sum;
} |
const { exec } = require('child_process');
exec('openssl genrsa -out ./certs/privatekey.pem 2048 && openssl req -new -key ./certs/privatekey.pem -out ./certs/certrequest.csr -subj "/C=NL/ST=All/L=Amsterdam/O=openstad/CN=www.openstad.org" && openssl x509 -req -in ./certs/certrequest.csr -signkey ./certs/privatekey... |
import React, { useState, useRef, useEffect } from "react";
import {
Form,
Button,
Container,
Row,
Col,
Toast,
Spinner,
ProgressBar,
} from "react-bootstrap";
import { BsBoxArrowInUp, BsArrowLeftShort } from "react-icons/bs";
import { FaTimes, FaCheck } from "react-icons/fa";
import { Link, useHistory }... |
let Models = require("../models");
var http_status = require('http-status-codes');
let sequelizeErrorHandler=require("../helpers/sequelizeErrorHandler").handleErrors;
module.exports.controllers = {
getAll: async (request, response) => {
try {
let all_amenities = await Models.Amenity.findAll({
... |
'use strict';
define(['app'], function (app) {
var branchController = function ($rootScope, $scope, $log, $timeout, $route,$routeParams, _, messageService,
dashboardService, constantService, navigationService, localStorageService,
configurationService,branchService) {
var userInfo, promis;
$... |
// share buttons link properly
function shareLink(sPermaUrl) {
var addthis_share = {
url: sPermaUrl
};
}
// overlay/modals
function popupModal(divId) {
$("#" + divId).show();
$(".page-overlay").show();
}
function hideModal() {
$(".popup-container").hide();
$(".page-overlay").hide();
... |
// STEP 3: Create Article cards.
// -----------------------
// Send an HTTP GET request to the following address: https://lambda-times-backend.herokuapp.com/articles
// Stduy the response data you get back, closely.
// You will be creating a component for each 'article' in the list.
// This won't be as easy as just ite... |
const path = require('path');
const winston = require('winston');
const onFinished = require('on-finished');
const uaParser = require('ua-parser-js');
require('winston-loggly-bulk');
const {exec} = require('child_process');
let gitHead;
let appVersion;
const cmd = 'git describe --tags || git log --pretty="%h" -n1 HEA... |
var google;
function initRewardsMap() {
if ("geolocation" in navigator) {
/* geolocation is available */
//Get user location
navigator.geolocation.getCurrentPosition(function(position) {
locateUser(position.coords.latitude, position.coords.longitude);
});
func... |
import { createSelector } from 'reselect'
import moment from 'moment'
export const TRIAL_DURATION = 14
export const getSettings = state => state.settings.data
export const hasTrial = createSelector(
getSettings,
(settings = {}) => {
const trialExpiration = moment(settings.installed).add(TRIAL_DURATION, 'days... |
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip()
auto_suggest_class()
auto_suggest_predicate()
$(".attr").each(function() {
var ths = $(this)
var attr = ths.attr("id")
$.ajax({
method: "GET",
url: "https://lov.linkeddata.es/dataset/lov/api/v2/term/search",
data: { q: attr },
d... |
// Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array.
// Input: nums = [3,0,1]
// Output: 2
// Explanation: n = 3 since there are 3 numbers, so all numbers are in the range [0,3]. 2 is the missing number in the range since it does ... |
/**
* Allows you to remove the QUOTA_BYTES_PER_ITEM restriction, leaving only BYTES_PER_ITEM
*/
export default class Storage {
_data = {};
/**
* The maximum total amount (in bytes) of data that can be stored in sync storage
* https://developer.chrome.com/extensions/storage#properties
* @type {number}
... |
/*赛事*/
let NormalGameView = require("../normalgame/NormalGameView");
cc.Class({
extends: NormalGameView,
properties: {
TAG: {
override: true,
default: "EventGameView",
},
},
init(parameters) {
this._super(parameters);
this.btn_task.active = fal... |
const Parser = require('../parser');
const choice = parsers => new Parser(state => {
if (state.isError) return state;
for (let parser of parsers) {
let nextState = parser.parserStateTransformer(state);
if (!nextState.isError) return nextState;
}
return state.updateError(`choice: Unabl... |
import React, {Component} from 'react';
import {
View,
Text,
ImageBackground,
Image,
TouchableOpacity,
StyleSheet,
Dimensions
}
from 'react-native';
import mainStyle from '../src/styles/mainStyle';
export default class Home extends Component{
render() {
return (
<ImageBackground source = {requir... |
import React, { useEffect, useRef } from 'react';
import Skills from '../skills/Skills';
const SkillsPage = () => {
const pageRef = useRef(null)
useEffect(() => {
if(pageRef.current.getBoundingClientRect().top <= 0) {
pageRef.current.scrollIntoView({ behavior: "smooth" });
}
}, []);
return (
... |
import React from 'react';
import './style.sass';
const Footer = () => (
<div className="ui inverted vertical footer segment footer-style">
<div className="ui container">
<div className="ui stackable inverted divided equal height stackable grid">
<div className="three wide column">
<h4 cl... |
const mongoose = require("mongoose"),
UserSchema = require('./schemas/user'),
GuildSchema = require('./schemas/guild'),
config = require('./config.json');
mongoose.connect(config.url);
var User = mongoose.model("users", UserSchema);
var Guild = mongoose.model("guilds", GuildSchema);
class npc {
constructor(name, ... |
const statTable = {
0: [0,0],
1: [1,4],
2: [1,6],
3: [1,8],
4: [1,10],
5: [2,6],
6: [2,8],
7: [2,10],
8: [3,8],
9: [3,10],
10: [4,8]
}
const rollFromStat = (stat, mods) => {
if( stat < 0 || stat > 10 ) return ('invalid stat!')
if( !mods ){ mods = 0 }
//convert undefined mods to 0
let [nu... |
function f(property, object) {
for (var key in object) {
if ( key === property ) {
if ( object.hasOwnProperty(property) ) {
return false;
} else {
return true;
}
}
}
}
var obj1 = {
job: "waiter",
salary: 1000
};
var obj2 = Object.create... |
export const Fonts = {
"Ogg": "Ogg-Roman",
"OggItalic": "Ogg-Italic",
"Maison": "MaisonNeue-Book",
"MaisonLight": "MaisonNeue-Light"
} |
import React, { Component } from 'react';
import axios from 'axios';
import Boss from './Boss/Boss';
import Grid from 'material-ui/Grid';
import { CircularProgress } from 'material-ui/Progress';
class Bosses extends Component {
state = {
data: []
}
componentDidMount = () => {
axios.get('ht... |
import PropTypes from 'prop-types'
import { Button as AntButton } from 'antd-styled'
import styled from 'styled-components'
import { variant } from 'styled-system'
const getPrimaryStyles = (theme) => ({
color: theme.color.white.default,
backgroundColor: theme.color.primary.default,
borderColor: 'transparent'
})
... |
function tracking(map, lineCoords) {
var trackingUAV = new Promise((resolve, reject) => {
var token = "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJsaW5oLm5uMjgwMzk5QGdtYWlsLmNvbSIsInNjb3BlcyI6WyJURU5BTlRfQURNSU4iXSwidXNlcklkIjoiYmJhYTFlNTAtZDY1My0xMWViLTkzODEtYWIyYTFhOGRhYWYwIiwiZmlyc3ROYW1lIjoiTmd1eWVuIiwibGFzdE5hbWUi... |
import React from "react";
import {
Payment,
ModalCardUpdated,
} from "../../../components/dashboard/parent/payment";
import { useSelector } from "react-redux";
import { getCardInfo } from "../../../redux/actions/parent";
function PaymentPage(props) {
const [openModalCardUpdated, setOpenModalCardUpdated] = React... |
import React from 'react';
import {
View,
StatusBar,
Image,
Text,
StyleSheet,
TextInput,
TouchableOpacity,
ScrollView,
Alert
} from 'react-native';
import { connect } from 'react-redux';
// import { Ionicons } from '@expo/vector-icons';
import { Ionicons } from 'react-native-vector-icons';
//
impor... |
'use strict';
module.exports = function (grunt, data) {
if (grunt.cli.options.debug) {
console.log('Loading `karma.js`');
}
return {
unit: {
configFile: data.appConfigPath + '/karma.conf.js',
singleRun: false
}
};
};
|
import React from "react";
import img3 from "../images/solar.jpg";
export default function Home() {
return (
<div>
<br />
<div className="row">
<div className="col col-lg-5 col-md-12 col-xs-12">
<div className="card">
<div className="card-body">
<h4 classNam... |
class Reservation {
//Add if available
constructor(reservationId, reservationTicketId, reservationRoomId, reservationTravelPlanId,reservationPrice,ticketDateOfPurchase,departureDate,ticketCustomerId) {
this.reservationId = reservationId;
this.reservationTicketId = reservationTicketId;... |
import styled from 'styled-components';
const Input = styled.input`
padding: 15px;
border: solid 1px #d3d4d5;
border-radius: 4px;
::placeholder {
color: #8a8a8a;
opacity: 1;
}
:focus {
outline: none;
border: 1px solid #009fd9;
}
`;
export default Input;
|
const React = require("react")
exports.onRenderBody = ({ setHeadComponents, setPostBodyComponents }) => {
setHeadComponents([
<link
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/themes/prism-coy.min.css"
rel="stylesheet"
/>,
<script src="https://d3js.org/d3.v5.min.js"></script>,
... |
import React, { Component } from 'react';
import PropTypes from 'prop-types'
import styled from 'styled-components'
import {
Route,
NavLink,
} from 'react-router-dom'
import {connect} from 'react-redux'
import {ConnectedRouter} from 'react-router-redux'
import About from './_About/'
import View from './_View/'
imp... |
import makeInspectable from 'mobx-devtools-mst';
import RootStore from "./models/RootStore";
const store = RootStore.create({
todos: {
'todo-1': {id: 'todo-1', content: 'Todo content_1'},
'todo-2': {id: 'todo-2', content: 'Todo content_2'},
'todo-3': {id: 'todo-3', content: 'Todo content_3'... |
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.set('view engine', 'pug')
app.set('view options', { pretty: true });
if (app.get('env') === 'development') {
app.locals.pretty = true;
}... |
const fs = require("fs");
describe('Tests to verify the file .txt', ()=>{
test('Verify if exist employes.txt', () => {
expect(fs.existsSync('./employes.txt')).toBe(true);
});
test('Verify if dont exist employesdata.txt', () => {
expect(fs.existsSync('./employesdata.txt')).toBe(false)... |
function taskOne() {
return new Promise((resolve,reject)=>{
setTimeout(function () {
console.log("this is task 1");
resolve()
}, 500);
})
}
function taskTwo() {
return new Promise((resolve,reject)=>{
setTimeout(function () {
console.log("this is t... |
/* global QUnit */
/**
* Before doing the test, import test-removeparam-rules.txt to AdGuard
*/
const request = async (url, header) => {
const headers = header || { Accept: 'text/html' };
// eslint-disable-next-line compat/compat
const response = await fetch(url, {
headers,
});
return re... |
var greeting = "Welcome to my intro site. This greeting was saved as a variable in javascript and wrote to the page using \"document.write(greeting)\"";
document.write(greeting);
alert("Hello!");
console.log("%cIt Worked","color:green;")
console.warn("%cThis is a warning. Please check.","background:gold;");
console.err... |
import 'react-dates/initialize';
import React from 'react'
import {DateRangePicker} from 'react-dates'
import '../../../datepicker.css'
import {bindActionCreators} from "redux";
import * as actions from "../../../redux/actions";
import {connect} from "react-redux";
import moment from 'moment'
moment.locale('tr-TR')
cla... |
import React from "react";
import "./App.css";
import { applyMiddleware } from "redux";
import thunk from "redux-thunk";
import { Router, Route, Switch } from "react-router-dom";
import { createBrowserHistory } from "history";
import { Provider } from "react-redux";
import { createStore } from "redux";
import { reducer... |
// -------------------------------------------------------------------------------------------------------
// init at local, upgrade me as dispatcher node of n4c cluster
// Author: [email protected]
// Copyright (c) 2015.09
//
// assign right of dispatcher node
// --------------------------------------------------... |
import expect, { spyOnRewired } from '../index'
/*eslint-disable no-unused-vars, import/named */
import { foo, barCalledByFoo, __RewireAPI__ as rewiredModule } from './spyOnRewired-module'
/*eslint-enable no-unused-vars, import/named */
describe('A rewired function that was spied on', () => {
let spy
beforeEach((... |
#!/usr/bin/env node
"use strict";
const fsp = require('fs-promise');
const path = require('path');
const mkdirp = require('mkdirp-promise');
const rimraf = require('rimraf-promise');
const minimist = require('minimist');
const NODE_MODULES_ROOT = 'node_modules/';
// Given a package.json location, return the value of... |
import React, { Component } from 'react';
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
import { incrementCounter, decrementCounter } from '../actions/counter';
import { connect } from 'react-redux';
class Counter extends Component {
incrementCounter = () => {
this.props.dispatch(incre... |
import {
getHorseInfo,
performHorseUpdate,
getHorseStatisticsResultsInfo,
getHorseStatisticsResultsDetailsInfo,
getHorseStatisticsFutureDetailsInfo,
updateHorseData
} from 'api/Services'
import { UPDATED_HORSE_DATA } from 'texts/successmessages'
import { addToastSuccess, addToastError } from 'actions/toas... |
import axios from "axios";
const API_KEY="d5b44a7ead7a29ad2b779d6fefb1b5cf";
const API_KEY_GOOGLE='AIzaSyAaReInr43kcsS2-TM6WffA1F8_3fQhrCU';
const ROOT_URL=`https://api.openweathermap.org/data/2.5/forecast?`
//convension
//our Actions needs to be same type as Reducers
export const FETCH_WEATHER="FEATCH_WEATHER"
... |
/**
* Created by Administrator on 2017/6/2.
*/
Ext.define('Admin.store.brand.Brand', {
extend: 'Admin.store.Base',
requires: [
'Admin.model.brand.Brand'
],
model: 'Admin.model.brand.Brand',
storeId: 'brand.Brand',
proxy: {
type: 'ajax',
api:{
read: Commo... |
import sha1 from 'sha1'
import superagent from 'superagent'
class UploadImageService {
uploadFile(file) {
const cloudName = process.env.REACT_APP_CLOUDINARY_CLOUD_NAME;
const apiKey = process.env.REACT_APP_CLOUDINARY_API_KEY;
const apiSecret = process.env.REACT_APP_CLOUDINARY_API_SEC... |
import React from 'react';
const RegistroPrueba = () => {
return (
<React.Fragment>
<div>formato de registro </div>
</React.Fragment>
)
}
export default RegistroPrueba; |
const log = console.log;
var obj = require("readline-sync")
var chalkobj = require("chalk")
var user = obj.question("what is your name ")
log("Welcome "+chalkobj.red(user));
var age = obj.question("How many levels of stars do you want ")
function star(age) {
//increamenting
for(i=0;i<age;i++){
g = ""
for(j=... |
class objectBase {
obj;
scene;
color;
constructor(url, scene, scale, color) {
this.scene = scene;
this.color = color;
//Create cube as a place holder
const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
this.obj = new THREE.Mesh(geo... |
const https = require('https')
const fs = require('fs')
const fsp = fs.promises
const colors = require('colors')
const LOG = {
download: ' Download > '.bgBlue.yellow,
saved : ' Saved √ '.bgGreen.white,
exists : ' Existed ♪ '.bgWhite.red,
failed : ' Failed × '.bgWhite.red,
fetching: ' Fetching > '.b... |
import React from 'react';
import { Link } from "react-router-dom";
export class ViewTodo extends React.Component {
render() {
const { todo, changeStatus, removeTodo, changeMode } = this.props;
const { id , isDone, title } = todo;
return (
<React.Fragment>
... |
import React, { Component } from 'react';
import './AddNew.css';
import { Button, Modal, Form, Input, TextArea, Dropdown, Label, Icon, Grid } from 'semantic-ui-react'
export default class AddNew extends Component{
state = {
openFunc: false,
activeAddBox: false,
activeFileBox: false,
... |
import React, { Component } from 'react';
import GameContainer from './game/GameContainer';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, combineReducers, compose } from 'redux'
import thunkMiddleware from 'redux-thunk'
import createLogger from 'redux-logger'
import playersReducer fro... |
const webpack = require('webpack');
const StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const builds = require('../builds');
const lodash = require('lodash');
const flatten = require('lodash/flatten');
const args = require(... |
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
const Categories = sequelize.define('Categories', {
id: {
type: DataTypes.INTEGER(11),
allowNull: false,
primaryKey: true,
autoIncrement: true
},
title: {
type: DataTypes.STRING,
allowNull: false
},
description: {
... |
function reverseAndNot(i) {
let str = "";
let num = i;
while(num >= 1){
let rem = Math.floor(num%10);
str += rem;
num = Math.floor(num/10);
}
return (str+`${i}`);
}
console.log(reverseAndNot(123));
console.log(reverseAndNot(152));
console.log(reverseAndNot(123456789)); |
P.models.programs.Clone = P.Model.extend({
urlRoot: '/api/program-clone',
toJSON: function() {
var userID = this.get('user_id') || '',
programID = this.get('program_id') || '';
return {
'user_id': String(userID),
'program_id': String(programID)
};
}
}); |
angular.module('cnnxtMobile.services', [])
.factory('Departments', function($q, Restangular) {
return {
getByCategoryId: function (categoryId) {
//URL is action=get_departments_by_floor_id&floor=1
var queryObj = {
action: 'get_departments_by_floor_id',
floor: categoryId
};
... |
//Create variables here
var dog,dogImg,happydog,database,food,foodstock;
function preload()
{
//load images here
dogImg=loadImage("images/dogImg.png");
happydog=loadImage("images/dogImg1.png");
}
function setup() {
createCanvas(500, 500);
database=firebase.database();
dog=createSprite(250,300,150,150);
d... |
import React, { Component } from 'react';
import { Link } from 'react-router';
class Item extends Component {
render(){
return (
<div className="item">
<li>
<Link to={{ pathname: '/dashboard'+this.props.path }}>
<i className={this.props.icon} aria-hidden="true"/>
{ this.props.text }
</... |
exports.up = function(knex, Promise) {
return Promise.all([
knex.schema.createTable('events', (table) => {
table.increments('id').primary();
table.string('title').notNullable();
table.date('startDate').notNullable();
table.date('endDate').notNullable();
table.string('link').... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.