text stringlengths 7 3.69M |
|---|
console.log("#S clothTab.js!!!!!!");
function openModal(id) {
console.log("#S openModal(): ", id);
var url = "/viewClothDetail";
var clothId = id;
showLoader();
$.get(url, function(result) {
$('body').append(result);
$("#myModal").modal();
$.ajax({
type: "GET",
contentType: "application/json",
d... |
var socket;
var map;
var layer;
var player;
var enemies;
var cursors;
var platforms;
var collector = false;
var height = 560;
var width = 1008;
var game = new Phaser.Game(
width, height,
Phaser.AUTO,
'phaser',
{ preload: preload, create: create, update: update }
);
$(window).resize(
function() {
window.res... |
OC.L10N.register(
"settings",
{
"No user supplied" : "Nijedan korisnik nije dostavljen",
"Authentication error" : "Grešna autentifikacije",
"Wrong admin recovery password. Please check the password and try again." : "Pogrešna admin lozinka za povratak. Molim provjerite lozinku i pokušajte ponovno.",... |
import React from 'react';
import Card from '../Card/Card.js';
import PropTypes from 'prop-types';
import './CardContainer.css';
const CardContainer = ({ repo, addCompareCard, removeCompareCard }) => {
const cardList = repo.map((district, index) => {
const title = Object.keys(district)[0];
const listOfData =... |
'use strict';
const Card = require('./card');
class Deck {
constructor() {
const suits = ['D', 'S', 'H', 'C'];
const ranks = ['A', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'J', 'Q', 'K'];
this.deck = [];
for (let i = 0; i < suits.length; i++) {
for (let j = 0; j < ranks.length; j++) {
var card = ne... |
import axios from 'axios'
// import utils from '@/utils/utils';
const TIME_OUT = 50000 // 请求超时时间
// const LOADING_START = 600; // loading开始时间
// const LOADING_END = 30000; // 动画结束时间
let requestInstanceStack = new Map() // 请球拦截栈
let responseInstanceStack = new Map() // 响应拦截栈
let cancelFetch = new Map() // 取消请求的拦截栈
//... |
import React from 'react';
import ToyCard from './ToyCard'
class ToyContainer extends React.Component{
render(){
let toys = this.props.toys.map(toys => <ToyCard toys={toys} likes={toys.likes} donateGoodWillClick={this.props.donateGoodWillClick} likeClickHandler={this.props.likeClickHandler}/>)
return(
... |
import React, {
Component,
} from 'react'
import PropTypes from 'prop-types';
import {
View,
} from 'react-native'
export default class AndroidFloatSectionHeader extends Component {
static propTypes = {
...View.propTypes,
floatSectionHeaderWidth: PropTypes.number.isRequired,
render... |
"use strict";
function PageNavigation(classDefinitions, isTouch) {
// Prototype variables
if (! classDefinitions) {
classDefinitions = {};
}
classDefinitions.hidden = classDefinitions.hidden || "hidden";
classDefinitions.page = classDefinitions.page || "vubn-page";
classDefinitions.startpage = classDefiniti... |
/**
* Created by Navit
*/
/**
* Please use appLogger for logging in this file try to abstain from console
* levels of logging:
* - TRACE - ‘blue’
* - DEBUG - ‘cyan’
* - INFO - ‘green’
* - WARN - ‘yellow’
* - ERROR - ‘red’
* - FATAL - ‘magenta’
*/
var Service = require("../../services");
var UniversalFuncti... |
import React from 'react';
import { describe, add } from '@sparkpost/libby-react';
import { Autorenew, Search } from '@sparkpost/matchbox-icons';
import { TextField, Button, Tooltip, Stack, Select } from '@sparkpost/matchbox';
describe('TextField', () => {
add('basic usage', () => <TextField id="id" label="Name" pla... |
// example data format
// tournament and bettingGround
const initialState = {
};
export default function tournamentReducer(state = initalState, action) {
switch(action.type) {
default:
return state;
};
}; |
const fs = require('fs');
// global functions that can be imported if needed
module.exports.isEmptyObject = (obj) => {
return !Object.keys(obj).length;
};
// logWrapper function in which to wrap all global.logWrapper messages. Found idea here: https://stackoverflow.com/questions/32025766/listen-for-message-written-... |
import PostDetails from "../PostDetails";
import PostExcerpt from "../PostExcerpt";
import PostPreviewTitle from "../PostPreviewTitle";
export default function PostPreview({ post }) {
return (
<div className="flex flex-col my-4 space-y-3">
<PostPreviewTitle slug={post.slug} title={post.title} /... |
import firebase from "firebase/app";
import "firebase/auth";
// import "firebase/database";
import "firebase/firestore";
import firebaseConfig from "./firebase-config.json";
firebase.initializeApp(firebaseConfig);
// firebase.firestore().settings({ timestampsInSnapshots: true });
export const auth = firebase.auth();
... |
APP.controller('sidebarController', function sidebarController($scope, ngProgressFactory, $location, $window) {
$scope.progressbar = ngProgressFactory.createInstance();
var ngProgressChannel = $scope.$bus().channel('ngProgressChannel')
$scope.loading = true;
ngProgressChannel.subscribe('ngProgressChann... |
import React from "react";
import {
StyleSheet,
View,
Image,
TouchableOpacity,
Dimensions,
TouchableWithoutFeedback,
Animated,
Text,
BackHandler
} from "react-native";
import Store from "../store";
import { Icon } from "react-native-elements";
import Tutorial from "../Tutorial/Tutorial";
const { widt... |
const setDocuments = (documents, state) => {
return {
...state,
documents: documents,
};
};
const sendingRequest = (state) => {
return {
...state,
loading: true,
};
};
const requestFinished = (state) => {
return {
...state,
loading: false,
};
};
... |
import React, {Component} from 'react'
import cn from 'classnames'
import Carousel from '../../../carousel'
import Mobile from '../../../mobile'
import styles from './styles.styl'
class Body extends Component {
render() {
return (
<div
className={cn(
styles['header-area'],
styles['overlay'],
... |
const questionDescription = JSON.stringify({
document: {
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
leaves: [
{
text: 'Default question for testing?',
},
],
},
],
},
],
},
});
const optionADesc = JSON.stringify... |
/* ADD FUNCTION
function add(x,y){
console.log(x+y);
}
add(4,5)
*/
function work(job){
switch(job){
case 'teacher':
console.log("he is a teacher");
break;
case 'doctor':
console.log("he is a doctor");
break;
default:
... |
import { tools } from "./../../../tools/index.js";
import { UserInputError } from "apollo-server";
import models from "../../models/index.js";
import obj from "lodash";
export const resolvers = {
Query: {
getAppointments: async () => {
return await models.Appointments.find();
},
getAppointment: asy... |
function emailInfo(sender, recipient, subject, booleanCheck, date, message){
this.sender = sender,
this.recipient = recipient,
this.subject = subject,
this.booleanCheck = booleanCheck,
this.date = date;
this.message = message;
}
var NDate = new Date(2020, 00, 02);
var selectorDate = null; //beg... |
import React, { Component } from "react";
class CommentDeleter extends Component {
render() {
return (
<div>
<button
onClick={() => {
this.props.delete(this.props.commentId);
}}
>
Delete
</button>
</div>
);
}
}
export default Co... |
import { useQuery } from 'react-query';
import api from '../services/api';
const getPost = async (id) => {
const { data } = await api.get(`posts/${id}`);
return data;
};
export default function usePost(id) {
return useQuery(['post', id], () => getPost(id));
}
|
///////////////app版本管理/////////////
$(function(){
$('#dg').datagrid({
onLoadSuccess: function(data){
if (data.total == 0 && data.ERROR == 'No Login!') {
//relogin();
var user_id = localStorage.getItem('user_id');
var user_pwd = localStorage.getItem('user_pwd');
if(user_id==''||!user_id||us... |
import ChatList from "../components/ChatList";
import ChatArea from "../components/ChatArea";
import UserChatInformation from "../components/UserChatInformation";
import styles from "../styles/Chat.module.scss";
export default function Chat () {
return (
<div className={styles.chatBody}>
<Cha... |
module.exports = require('./relation.factory');
|
import React from "react";
import { Icon } from "semantic-ui-react";
function Header() {
return (
<div className="ui stackable grid margin-no">
<div className="middle aligned column padding-vs-vertical" style={{ width: 104 }}>
<img
className="ui medium circular image"
src="/asse... |
atom.declare("Game.Part", App.Element,
{
configure: function()
{
this.localPosition = this.settings.get("localPosition");
this.parent = this.settings.get("parent");
this.angle = this.settings.get("angle");
this.quads = this.settings.get("quads");
this.killed = false;
this.shape = new Rectangle({
cen... |
'use strict';
import ArrayItem from './ArrayItem'
const ComponentsWithProps = (props) => {
const values = props.arrayProp.map((item) => <li key={item}>{item}</li>);
//print an object
const objectPropsDisplay = [];
for(let[k,v] of Object.entries(props.objProp)) {
objectPropsDisplay.push(<li k... |
var obj = module.exports = function(){
this.count = 0;
};
obj.prototype.touch = function(){
this.count++;
}; |
import React from 'react';
import './index.scss';
import Agenda from '../../Components/Agenda';
import Points from '../../Components/Points';
import Schedule from '../../Components/Schedule';
const Home = () => (
<main className="Home">
<section className="Home__wp">
<div className="Home__wp__grid">
... |
//Potion for the player
// with name, and health it heals ah
function Potion (name, healing){
this.name = name;
this.healing = healing;
//is it responsability of the potion eliminate itself from the list or not
this.consume = function(character){
character.health += this.healing;
}
console.log(this);
}
|
import profileReducer, { addPostActionCreator, deletePost } from "./profile-reducer";
let state = {
postData: [
{id: 1, message: 'Hi, how are u', likesCount: 15},
{id: 2, message: 'I am trololo', likesCount: 2},
{id: 3, message: 'azaza', likesCount: 101}
]}
test('length of posts should be incremented', () => ... |
const showdown = require('showdown')
// var babel = require("babel-core");
module.exports = function(content,map) {
this.cacheable && this.cacheable()
/*
1. content -> html
2. html -> jsx
3. jsx -> js
*/
const converter = new showdown.Converter()
converter.setOption('tables', true)
content = converter.... |
{
const DOC = document;
const WIN = window;
if( navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
|| navigator.userAgent.mat... |
const prod1 = {}
// {} representa um objeto
// pode-se criar um objeto dentro do outro
prod1.nome = 'Iphone 11'
prod1.preco = 4999.90
prod1['Desconto Legal'] = 0.40
// não entendi os []
console.log(prod1)
const prod2 = {
nome: 'Camisa polo',
preco: 79.90 }
console.log(prod2)
/*obj: {
blabla: 1, ... |
function booking(mode)
{
if(mode)
{
if (document.getElementById("name").value=="")
document.getElementById("status_booking").innerHTML = "Заполните поле Имя.";
else if (document.getElementById("firstName").value=="")
document.getElementById("status_booking").inner... |
let table = [];
let mult1 = [];
let mult2 = [];
let mult3 = [];
let mult4 = [];
let mult5 = [];
let mult6 = [];
let mult7 = [];
let mult8 = [];
let mult9 = [];
for(let i = 1; i < 10; i++) {
for(let j = 1; j < 10; j++) {
if(i == 1) {
mult1.push(i * j);
} else if(i == 2) {
mul... |
import _extends from "@babel/runtime/helpers/esm/extends";
import { isDefined } from "../../../../core/utils/type";
import domAdapter from "../../../../core/dom_adapter";
import { normalizeEnum } from "../../../../viz/core/utils";
var KEY_FONT_SIZE = "font-size";
var DEFAULT_FONT_SIZE = 12;
var SHARPING_CORRECTION = 0.... |
import React from 'react';
import PropTypes from 'prop-types';
const Debug = ({label, data}) => (<div style={{padding: '2rem', border: '1px solid red', margin: '2rem'}}>
<small>{label}</small>
<code>
<pre style={{fontSize: '0.75rem'}}>
{JSON.stringify(data, null, ' ')}
</pre>
<... |
import React, { Component } from 'react';
import './App.css';
import Article from './components/Article'
import axios from 'axios';
class App extends Component {
constructor(){
super()
this.state = {
articles: []
}
// this.getData = this.getData.bind(this)
}
componentWillMount(){
axi... |
//need to sort out the cloning ids problem
//TODO : remove renderBibleLookUp
var renderBibleLookUp = function (aBible, book, chapter, verse)
{
aBible = new Hash(aBible);
if ($('bookReading').options.length < 2)
{
$('bookReading').empty();
aBible.each(function(aChapters, sBook)
{
var myEl = new ... |
/**
* UserController
*
* @description :: Server-side logic for managing Users
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
view_login : function(req, res) {
return res.view('user/login');
},
view_profile : function(req, res) {
return res.view('user... |
const db = require("../database/config.js");
const Data_Sensor = require("../models/data_sensor");
const List_Alat = require("../models/list_alat");
const Report = require("../models/report");
List_Alat.hasMany(Data_Sensor, {
as: "Data_Sensor2",
foreignKey: "listAlatId",
});
Data_Sensor.belongsTo(List_Alat, {
as... |
import {Random} from 'mockjs'
let employeeList = [];
for(let j = 0 ; j < 100; j++){
employeeList.push({
id:Random.increment(),
name: Random.cname(),
phone: Random.float(),
state: Random.float(0,1,0,0),
education: Random.ctitle(3, 5),
idCard: Random.id(),
sex: Random.float(0,1,0,0)
}... |
import React, { useContext } from "react";
import Settings from './context/settingsContext.js';
import ToDo from './components/todo/todo.js';
import Header from './components/header.js';
import 'normalize.css';
import '@blueprintjs/core/lib/css/blueprint.css'
import '@blueprintjs/icons/lib/css/blueprint-icons.css'
impo... |
import React from 'react'
const PreloadedWithDelay = () => (
<div className="PreloadedWithDelay">
<h1>Hello, PreloadedWithDelay!</h1>
</div>
)
export default PreloadedWithDelay
|
class NesefComponents{
constructor() {
console.log('constructor')
this.el = {}
// ************ BOTOES E LINKS *******************
this.el.btnShowAboutNesef = document.getElementById('btn-show-nesef')
this.el.btnShowLines = document.getElementById('btn-lines')
this.el.... |
var $cegla="rgb(255, 102, 0)";
var $biezacy="rgb(255, 204, 102)";
$(document).ready(function() {
$('a').on( "click", function(){
$text=$(this).text();
$params="option="+$(this).attr('id');
// $params+="&NIP="+$('input[name=NIP]').val();
// $params+="&NAZWA="+$('input[name=NAZWA]').val().replace('&',' and ');
... |
function charCount(str) {
let obj = {}
for (let char of str) {
char = char.toLowerCase()
if (/[a-z0-9]/.test(char)) {
obj[char] = ++obj[char] || 1
}
}
return obj
}
console.log(charCount('aaa')) //{a:3}
console.log(charCount('Hi hello!')) //{h:2, i:1, e:1, l:2, o:1}
|
/**
* Created by Adam on 2016-04-05.
*/
(function (){
"use strict";
angular.module('blog')
.controller('OtherBloggersController', OtherBloggersController);
function OtherBloggersController($http,$scope, $routeParams, $log, $timeout,$location){
var obc = this;
obc.getUsers = func... |
import React from 'react';
import { mount } from 'enzyme';
import withHistoryActions from './withHistoryActions';
const mockedAction = jest.fn();
jest.mock('react-redux', () => ({
connect: () => Component => props => (
<Component
historyPush={(...args) => mockedAction('historyPush', ...args)}
history... |
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as formActions from '../actions/form';
import HostSignup from '../components/HostSignup';
import Header from './Header';
import AudienceSignup from '../components/AudienceSignup';
import './Si... |
var searchInsert = function(nums, target) {
let mid = Math.floor((nums.length / 2));
let mid_num = nums[mid];
if (nums.length <= 2) {
if (target <= nums[0]) {
return 0;
} else if (target <= nums[1]) {
return 1;
} else {
return nums.length;
... |
import React from 'react';
import PropTypes from 'prop-types';
const SearchForm = ({ onChange }) => {
return (
<div className="row">
<div className="col-4">
<form action="" onSubmit={e => e.preventDefault()}>
<input onChange={onChange} type="text" className="form-control" placeholder="Sea... |
var chai = require('chai');
var expect = chai.expect;
var React = require('react');
var sd = require('../skin-deep');
var $ = React.createElement;
describe("skin-deep", function() {
it("should render a ReactElement", function() {
var tree = sd.shallowRender($('h1', { title: "blah" }, "Heading!"));
var vd... |
import React from 'react';
import StarRatingComponent from 'react-star-rating-component';
export default React.createClass({
getInitialState: function(){
return ({
rating: 1;
})
},
onStarClick: function(name, value) {
this.setState({rating: value});
},
render: f... |
import React from 'react';
import BlogListItem from './BlogListItem';
import { List } from '@material-ui/core';
const BlogList = ({ user, blogs, handleLike, handleDelete }) => (
<div>
<List>
{blogs && blogs.map((b) => (
<BlogListItem user={user} blog={b} key={b.title} handleLike={handleLike... |
angular.module('AdSales').controller('NewSlsInvceStatusController', function ($scope, $location, locationParser, SlsInvceStatusResource ) {
$scope.disabled = false;
$scope.$location = $location;
$scope.slsInvceStatus = $scope.slsInvceStatus || {};
$scope.save = function() {
var successCal... |
import api from 'api/api';
import store from 'store';
api.new('https://evening-citadel-85778.herokuapp.com/');
// api.new('http://10.68.0.45:8000/');
export function login(user, pass) {
return api.login(user, pass);
}
export function logout() {
return api.logout();
}
export function getUsers() {
return api.get... |
'use strict';
var config = require('config');
var shield = require('bookshelf-shield');
var shieldConfig = config.get('shieldConfig');
function shieldsUp(server) {
var models = {
Study: server.plugins.bookshelf.model('Study'),
Scan: server.plugins.bookshelf.model('Scan')
};
return shield({... |
class Character {
constructor(sprite, position) {
this.sprite = sprite;
this.position = position;
// this.image = imageSource;
// this.x = positionX;
// this.y = ((positionY - variationY)-imgHeight);
// this.width = imgWidth;
... |
var ProDevFactory = angular.module("ProDevFactory", ['ui.bootstrap']);
ProDevFactory.value('$calenderSelectedDate', { value: new Date() }) |
import React from 'react';
const Highlights = () => {
return (
<React.Fragment>
<h1>Highlights</h1>
</React.Fragment>
);
}
export default Highlights; |
import React from 'react';
import { configure, shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import NavigationItems from './NavigationItems';
import NavigationItem from './NavigationItem/NavigationItem';
import { wrap } from 'module';
configure({ adapter: new Adapter() });
describe('<Naviga... |
const http = require('http');
const PORT = 5000;
const ip = 'localhost';
const server = http.createServer((request, response) => {
// const { method, url } = request;
let headers = defaultCorsHeader;
if(request.method === 'OPTIONS'){
response.writeHead(200, headers);
response.end();
}
if(request.m... |
/**
* @file san-xui/x/forms/ComboForm.js
* @author leeight
*/
import _ from 'lodash';
import {DataTypes, defineComponent} from 'san';
import {create} from '../components/util';
import {asInput} from '../components/asInput';
import Button from '../components/Button';
import {asForm} from './asForm';
import StaticIt... |
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image,
TouchableOpacity
} from 'react-native';
export default class BuninessNav extends Component {
render() {
return (
<View style={styles.container}>
<TouchableOpacity activeOpacity={0.5}>
... |
import React from 'react';
import './Nav.scss';
import {Link as LinkRoute} from 'react-router-dom';
import { HashLink as Link } from 'react-router-hash-link';
export default function Nav() {
return (
<>
<div className="header-login">
<LinkRoute className="link-item" to='/logowanie'>Zaloguj</Li... |
const test = require('tape');
const orderBy = require('./orderBy.js');
test('Testing orderBy', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof orderBy === 'function', 'orderBy is a Function');
const users = [{ name: 'fred', age:... |
function jpage (data, callback) {
console.log('jpage');
var indexPage = data.index,
totalPages = data.total,
paginationNumbers = 0,
jpageResponse = [];
console.log(indexPage, totalPages);
function paginationObj (start, end) {
var pagination = [];
if (start > 10) {... |
import React from 'react';
import { Container, Table, Header, Input, Message } from 'semantic-ui-react';
import swal from 'sweetalert';
import TreatmentLogItem from '../components/TreatmentLogItem';
import TreatmentLogPlan from '../components/TreatmentLogPlan';
/** Renders a table containing all of the Notification do... |
/*
* @Author: xr
* @Date: 2021-03-20 12:22:32
* @LastEditors: xr
* @LastEditTime: 2021-03-20 22:08:15
* @version: v1.0.0
* @Descripttion: 功能说明
* @FilePath: \ui\src\libs\store\index.js
*/
import { useStore, mapState, mapActions } from 'vuex'
export const myMapStates = (...args) => {
const store = useStore(... |
$(document).ready(function() {
$('#accpengajuan').DataTable();
} ); |
// copy from ember-cli
(function() {
/* global define, Ember */
define('ember', [], function() {
"use strict";
require('ember-metal');
require('ember-runtime');
require('ember-handlebars-compiler');
require('ember-handlebars');
require('ember-views');
require('ember-routing');
require('ember-applicatio... |
import { HttpStatusCode } from "solid-start/server";
import { A } from "solid-start";
import ErrorMessage from "~/components/ErrorMessage";
export default () => (
<>
<HttpStatusCode code={404} />
<ErrorMessage
message={
<>
404 Page Not Found
<br />
<A href="/">Go B... |
'use strict';
var React = require('react-native');
var {StyleSheet} = React;
var colors = StyleSheet.create({
white: {
color: '#fff',
},
blue: {
color: '#09c',
},
grey: {
color: '#ccc',
},
});
module.exports = colors;
|
import React from 'react'
import ProjectsContext from '../contexts/ProjectsContext'
import { Player } from 'video-react';
import './ArchiveList.scss'
export default class ArchiveList extends React.Component {
static contextType = ProjectsContext
state = {
previewAsset: null
}
componentDidMount() {
win... |
import React from 'react';
import {
Text,
ListView,
TouchableHighlight,
} from 'react-native';
import {
PComponent,
} from 'rnplus';
import {
STYLE_ITEM,
STYLE_SCROLL_VIEW,
} from './styles.js';
class List extends PComponent {
styles = {
list: STYLE_SCROLL_VIEW,
};
render() {
return (
<... |
/* eslint-disable no-alert */
/* eslint-disable no-restricted-syntax */
/* eslint-disable no-nested-ternary */
import React, { useState } from 'react';
import {
Container,
Row,
Col,
DropdownButton,
Dropdown,
Button,
Modal,
Alert,
} from 'react-bootstrap';
const ShoppingCart = ({
styleSkus,
productN... |
import axios from 'axios'
import AuthService from '@/services/auth.service'
class ApiService {
constructor () {
let service = axios.create({})
service.interceptors.request.use((config) => {
if (!config.headers.hasOwnProperty('token')) {
return AuthService.requestToken().then((data) => {
... |
import React, { Component } from "react";
import axios from "axios";
export default class CreateJob extends Component {
constructor(props) {
super(props);
this.state = {
jobs: [],
flag: false,
searchedJobs: [],
apiLoaded: false,
jobTitle: ["Software Engineer", "Computer Science... |
const express = require('express');
const http = require('http');
const io = require('socket.io');
const path = require('path');
var serialPort = require("serialport");
if (process.argv.length != 3) {
//console.log("usage: \"node app.js <serial_port>\"");
console.log("usage: "+ process.argv[2]);
process.e... |
window.onload = function () {
showAvailableSurveys();
showLogoutAndProfile();
getUser();
showUnavailableSurveys();
};
var json;
function showAvailableSurveys() {
var xhr = new XMLHttpRequest();
var token = $.cookie("token");
xhr.onreadystatechange = function () {
if (xhr.readyStat... |
import React, { useState } from 'react';
import axios from 'axios';
import Loader from "react-loader-spinner";
export default function Weather(props) {
let [temperature, setTemperature] = useState(null);
function handleResponse(response) {
setTemperature(response.data.main.temp);
}
if (t... |
'use strict';
angular.module('instangularApp', [])
.config(function ($routeProvider) {
$routeProvider
.when('/', { templateUrl: 'views/partials/phone-list.html', controller:'MainCtrl'})
.when('/about', { templateUrl: 'views/partials/about.html' })
.when('/phone/:phoneId', { templateUrl: 'views/... |
'use strict'
/** @typedef { import('./types').CliArguments } CliArguments */
const meow = require('meow')
const pkg = require('../package.json')
const DEFAULT_CONFIG = 'config'
const DEFAULT_MINUTES = 10
const DEFAULT_PERCENT_FIRING = 0
const ENV_CONFIG_NAME = `${pkg.name.toUpperCase().replace(/-/g, '_')}_CONFIG`
c... |
const svg = d3.select('svg');
svg.style('background-color', 'red');
svg.style('box-shadow', '10px 10px 3px lightgray');
|
require('./config-bench-factory')('heavydeps')
|
// Запрос за данными
request.get('/index/json', function(error, JSON) {
// JSON => BEMJSON ( Database Data => View data)
BEMTREE
.apply(JSON)
.then(function(BEMJSON) {
// View data => Browser code (HTML)
var html = BEMHTML.apply(BEMJSON);
response.send(html);
});
});
|
var todoList= (function(){
var values = [];
return {
Item: function (title) {
this.title = title;
this.date = new Date();
this.asText = function () {
return title + ", " + this.date;
}
},
add: function (item) {
... |
'use strict';
var browseServices = angular.module('browseServices', ['ngResource']);
browseServices.factory('Users', ['$resource', 'API_SERVER', function($resource, API_SERVER) {
return $resource('http://:url/users/:id/:query.:format', {url: API_SERVER, format: 'json'}, {
query: {method: 'GET', params: {}, isAr... |
const express = require('express')
const bodyParser = require('body-parser')
const server = express()
server.use(bodyParser.json())
server.use(bodyParser.urlencoded({ extended: true }))
server.get('/', (req, res) => {
res.send('<h1>Home</h1>')
})
server.get('/contato', (req, res) => {
res.send(`
... |
import React from 'react';
import PropTypes from 'prop-types';
import { Card, CardText, CardBody, CardTitle, CardSubtitle } from 'reactstrap';
import Spinner from '../../common/Spinner';
import Button from '../../common/Button';
const MembershipCard = ({ isMember, imageUrl, toggleModal, title, subtitle, body, loading... |
/*******************************************************************************************************
sertal.ch user management twitter-bootstrap and Live HTML template for the following features
- controller file for 'users' template views
Date: 15-June-2013
Author:
************************************... |
let pictureButton = document.querySelector("#picture")
let apiKey = "DIhfuwgrEZQzwxenOdDsfVfVHQL01UMn7U0FP5ms"
pictureButton.addEventListener("click", () => {
getApiData()
})
async function getApiData() {
let response = await fetch(`https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos?sol=1000&cam... |
import { Col, Row } from 'Components/UI-Library'
import React from 'react'
import './index.less'
import usePayment from './Payment.Hook'
import PaymentForm from './PaymentForm.Component'
const Payment = () => {
usePayment()
return (
<Row justify="center" className="payment-wrapper">
<Col xs={24} xl={16}>... |
''.endsWith || (String.prototype.endsWith = function (suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
});
(function ($) {
/**
*
* @param options = {
* appendTo,
* html,
* js,
* css,
* dependencies: [
* http://.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.