text stringlengths 7 3.69M |
|---|
export { Range } from './Range'
|
//悬浮框
$(".floatBox li").hover(function(){
$(this).find('img').show();
},function(){
$(this).find('img').hide();
}); |
import React from "react";
class Images extends React.Component {
render() {
const props = this.props;
let imgClassName = (props.isCenter ? "block" : "");
return (
<li className={imgClassName}>
<img src={props.url} alt={props.filename} />
</li>
);
}
}
export default Images; |
var $ = prop => document.querySelector(prop);
var fRand = num => Math.floor(Math.random() * num);
var fR = (min, max) => min + Math.floor(Math.random() * (max - min));
var Rand = (min, max) => min + Math.random() * (max - min);
var randP = num => Math.floor(Math.random() * num) ... |
// Build a function my_max() which takes an array and returns the maximum number.
var array = [1,4,7,3,8,3,5,0,1,2];
function my_max(arr) {
var max = 0;
for (var i = 0; i < arr.length; i++) {
if (arr[i] > max) {
max = arr[i];
}
}
console.log(max);
}
my_max(array);
// Build a function vowel_cou... |
//存储了actionCreator的type, 保证调用正确 不因为字符错误出错
export const DYNAMIC_CHANGE_TIME = 'header/dynamicChangeTime';
export const GET_WEATHER = 'header/getWeather';
export const LOGIN_OUT = 'header/loginOut'; |
const mongoose = require("mongoose");
const productModel = require("../models/product.model");
const createProduct = (req, res) => {
const { name, category, isActive, details } = req.body;
const product = new productModel({
name,
category,
isActive,
details,
});
product.save((error, result) =... |
import React from 'react'
import st from './index.css'
const Page = (props) => {
return (
<div className={st.subRoot}>
<props.header />
<props.content />
</div>
)
}
export default Page
|
// Simple date selector
// Component API:
// Pass in any (all optional) of the following props to affect certain aspects
// @initDay - sets the initial value of the day picker (value should be [1-31]). Default is 1
// @initMonth - sets the initial value of the month picker (value should be [1-12]). Default is 1
// @ini... |
'use strict';
const myApp = require('../app/Oop');
describe('Laptop Class Test', function () {
describe('Verify Laptop is an Object and is a Constructor Object', function () {
it("Should be an Object", function () {
let Dell = new myApp.Laptop('Dell', 'Inspiron', 'windows', 'Black');
... |
// interaction/communication with database
const connection = require("./connection");
class DB {
constructor(connection) {
this.connection = connection;
}
findAllEmployees() {
return this.connection.query(
"SELECT * FROM Employee"
);
}
createEmployee(employee... |
var socket = io();
let username;
let busy = false;
var incallwith = "";
const localVideoEl = $('#localVideo');
const remoteVideosEl = $('#remoteVideos');
const chatlist = $('.chatlist');
let remoteVideosCount = 0;
let webrtc;
const chatTemplate = Handlebars.compile($('#chat-template').html());
const chatContentTemplat... |
$(document).ready(function() {
var topics = ["LA Dodgers", "LA Clippers", "LA Kings", "Pittsburgh Steelers"];
function renderButtons() {
$('#buttons').empty();
for (var i = 0; i < topics.length; i++) {
var teamBtn = $('<button>');
teamBtn.addClass('team-button team-button-color');
teamBtn.attr('data-t... |
angular.module('entraide').controller('FooterCtrl', function ($scope, $meteor) {
console.log("footer-view Ctrl");
});
|
import React from "react";
import { useHistory } from "react-router-dom";
import logo from "./logo.png";
import back from "./back.png";
function AddressKYC() {
const history = useHistory();
const handleRoute3 = () => {
history.push("/otp");
};
return (
<div className="AddressPage">
<div className="topbar">... |
import React from 'react';
import {
StyleSheet,
Text,
View,
Image,
TextInput,
TouchableOpacity,
} from 'react-native';
import { LinearGradient } from 'expo-linear-gradient';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
num: ' ',
... |
var URL = require('url'),
http = require('http'),
util = require('util');
var cityArray = ['suzhou', 'changshu', 'kunshan', 'nantong', 'zhongshan', 'shaoxing', 'wujiang'],
mapUrls = ['http://www.subicycle.com/map.asp','http://www.csbike01.com/map.asp', 'http://www.ksbike01.com/map2.asp', 'http://www.ntbike.com/map... |
export const SET_CURRENT_WEEK = 'SET_CURRENT_WEEK';
export const setCurrentWeek = data => ({
type: SET_CURRENT_WEEK,
payload: { data }
});
export const SET_OVERALL_TOTAL_MINUTES = 'SET_OVERALL_TOTAL_MINUTES';
export const setOverallTotalMinutes = data => ({
type: SET_OVERALL_TOTAL_MINUTES,
payload: { data }
})... |
if (!Object.values) {
Object.values = function (o) {
return Object.keys(o).map(function (k) {
return o[k];
});
};
}
|
import React from 'react';
import Dash from './Dashboard.css';
export default function Dashboard() {
return (
<div className="container">
<div className="dashboard">
<div className="search">
<div>
<label>Name</label>
<input name="Search Name"/><br/>
... |
const express = require('express');
const app = express();
app.set('port', process.env.PORT || 3000);
// Homepage:
app.get('', function(req, res) {
res.type('text/plain');
res.send('Meadwork Travel');
});
// About page:
app.get('/about', function(req, res) {
res.type('text/plain');
res.send('About Me... |
let vieuxBtn = document.getElementById("vieux");
let multipleBtn = document.getElementById("multiple");
let tableauBtn = document.getElementById("tableau");
let commandeBtn = document.getElementById("commande");
// calcul nombre de jeune et de vieux
const vieux = () => {
window.alert("Cette fonction classe les â... |
import styled from 'styled-components';
const StyledNav = styled.div`
font-family: 'Gilroy', 'Nunito', sans-serif;
a {
color: white;
text-decoration: none;
}
a:hover {
color: #d0d0d0;
}
.fas {
font-family: 'Font Awesome 5 Free';
}
* {
margin: 0;
padding: 0;
box-sizing: bor... |
//[COMMENTS]
/*
Instructions
Add the equality operator to the indicated line so that the function will return "Equal" when val is equivalent to 12
testEqual(10) should return "Not Equal"
testEqual(12) should return "Equal"
testEqual("12") should return "Equal"
You should use the == operator
*/
//[COMMENTS]
// Setup
f... |
module.exports.run = async (bot, message, args) => {
let xp = require("./xp.json");
let xpAdd = Math.floor(Math.random() * 7) + 8
console.log(xpAdd);
if(!xp[message.author.id]){
xp[message.author.id] = {
xp:0,
level:1
};
}
let curXp =... |
let T = {}
T.locale = null
T.locales = {}
// T.langCode=['zh', 'en']
// let index = 1
T.registerLocale = function (locales) {
T.locales = locales;
}
T.setLocale = function (code) {
T.locale = code
}
// T.setLocaleByIndex = function (index) {
// lastLangIndex = index;
// T.setLocale(T.langCode[index]);
/... |
$(function() {
Filterometry.Photo = Backbone.Model.extend({
idAttribute: 'id'
});
Filterometry.PhotoStrip = Backbone.Collection.extend({
model: Filterometry.Photo,
fetchNewItems: function () {
var that = this;
var id = 1944086551;
this.fetch({dat... |
const path= require('path');
const express= require('express');
const socketIO= require('socket.io');
const http= require('http');
const moment= require ('moment');
const {Users}=require('./users');
const app= express(); //server side..(on cmd)
const port= process.env.PORT || 800... |
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
* @jest-environment node
*/
runPlaceholderTests('ReactSuspensePlaceholder (mutation)', () =>
require('react-noo... |
//per site tinyMCE_config
if(typeof($) === "undefined" && typeof(django.jQuery) != "undefined"){var $ = django.jQuery; var jQuery = $;}
if (typeof(site_mce_config) == 'undefined'){
var site_mce_config = {}
}
var extra_styles = site_mce_config.extra_styles || "Grey text=grey"; // TODO make configurable
var ext... |
import React from 'react'
const TopSearch = () => (
<div className="ui grid">
<div className="eight wide column">
<form className="ui form network-form" action="#" id="networkForm">
<div className="fields">
<div className="fourteen wide field">
... |
__resources__["/explode.js"] = {meta: {mimetype: "application/javascript"}, data: function(exports, require, module, __filename, __dirname) {
var h = require("helper");
var m = require("model");
var p = require("particle")
var Particle = p.Particle;
var Emitter = p.Emitter;
var CircleModel = require("model").CircleMod... |
/** @jsx React.DOM */
var React = require('react');
var AppActions = require('../actions/AppActions.jsx');
var AppStore = require('../stores/AppStore.jsx');
var getItemsFromStore = function () {
return {
items: AppStore.getItems()
};
}
var App = React.createClass({
getInitialState: function() {
return g... |
let utils = require('./utils')
let webpack = require('webpack')
let config = require('../config')
let merge = require('webpack-merge')
let baseWebpackConfig = require('./webpack.base.conf')
let HtmlWebpackPlugin = require('html-webpack-plugin')
let FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
let Vu... |
/* global G7 */
$(function() {
'use strict';
(function($, window, undefined) {
/**
* @name Utils
* @memberof G7
* @namespace Utils
* @description Utilities and Methods for the App
*/
G7.Utils = (function() {
/**
* @scope G7.Utils
* @description Exposed met... |
import React, { useEffect, useRef } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import {
BrowserRouter as Router,
Switch, Route, Link
} from 'react-router-dom';
import './App.css';
import Login from './components/Login';
import NameDisplay from './components/NameDisplay';
import B... |
const express = require('express');
const router = express.Router();
const { Posts, Likes,Comments,Users } = require("../models");
const { validateToken } = require("../middlewares/auth");
const multer = require("../middlewares/multer-config");
// recuperer tous les posts non signaller
router.get("/", validateToken... |
var users = [
{ id: 1, name: 'ID', age: 36 },
{ id: 2, name: 'BJ', age: 32 },
{ id: 3, name: 'JM', age: 32 },
{ id: 4, name: 'PJ', age: 27 },
{ id: 5, name: 'HA', age: 25 },
{ id: 6, name: 'JE', age: 26 },
{ id: 7, name: 'JI', age: 31 },
{ id: 8, name: 'MP', age: 23 },
]
// 1. 명령형 코드
//... |
/**
* Definition for a binary tree node.
* function TreeNode(val) {
* this.val = val;
* this.left = this.right = null;
* }
*/
/**
* @param {TreeNode} root
* @return {boolean}
*/
var isSymmetric = function(root) {
if(!root)
return false;
if(!root.left && !root.right)
return true... |
"use strict"
//var setUpConnection = require('./utils/utils.js');
import setUpConnection from './utils/utils.js';
//var express = require('express');
import express from 'express';
//var cookieParser = require('cookie-parser');
import cookieParser from 'cookie-parser';
//var bodyParser = require('body-parser');
import ... |
import { useState } from 'react';
import { useSignIn } from 'react-auth-kit'
import axios from 'axios';
const SignIn = () => {
const signIn = useSignIn();
const [formData, setFormData] = useState({username: '', password: ''});
const onSubmit = async (e) => {
e.preventDefault();
try {
... |
import React from 'react';
import { FormGroup , Col,Row, ControlLabel} from 'react-bootstrap';
import DatePicker2 from 'react-bootstrap-datetimepicker';
let moment = require('moment');
export default class InputFecha extends React.Component{
constructor(){
super()
this.state={
min:momen... |
var user = {
name: "Spongebob Squarepants",
tweetCount: "50",
followerCount: "100",
followingCount: "120"
};
var discoverTweets = [
{
uname: "Patrick",
tweet: "Have you guys seen #TheWalkingDead finale yet?"
},
{
uname: "Squidward",
tweet: "#GossipGirl was great tonight"
},
{
uname: "Mr. Krabs",
tweet: "More... |
const scrapper = require('./scrapper.js');
(async () => {
const items = await scrapper.scrapItems('https://www.milanuncios.com/gatos-en-barcelona/adopcion.htm');
const filtered = items.filter(item => item !== undefined);
console.log('\n\n');
console.warn(JSON.stringify(filtered));
console.log('\n\n... |
App.HomeBooktabSingleitemRoute = Ember.Route.extend({
model: function(obj) {
var store = this.store;
return Ember.RSVP.hash({
bookingitem: store.find('bookingitem', obj.id), /// pass filter here to get correct data
booking: store.find('booking')/// pass filter here to get correct data ID HERE ONLY ... |
import React, { lazy, Suspense } from 'react';
import LoadElement from "../../UI/LoadElement/ImageLoadElement"
const LazyImage = lazy(() => import("./LazyImage"));
const LazyItem = (props) => {
return (<>
<Suspense fallback={<LoadElement />}>
<LazyImage src={props.src} alt={props.alt} />
... |
/**
* Root Sagas
*/
import { all } from 'redux-saga/effects';
// sagas
import authSagas from './Auth';
import emailSagas from './Email';
import todoSagas from './Todo';
import feedbacksSagas from './Feedbacks';
export default function* rootSaga(getState) {
yield all([
authSagas(),
emailSagas(),
... |
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
import nodejsCustomInspectSymbol from './nodejsCustomInspectSymbol';
/**
* Used to print values in error messages.
... |
//connecting to Sequelize
const Sequelize = require("sequelize");
// Option 1: Passing parameters separately
const sequelize = new Sequelize(
"heroku_3cead47d1b8797d",
"bb97fada1d29f8",
"7472d044",
{
host: "us-cdbr-iron-east-02.cleardb.net",
dialect: "mysql" /* one of 'mysql' | 'mariadb' | 'postgres' ... |
const fs = require('fs');
const path = require('path');
const STATE_CONST = {
man: "чоловіча",
woman: "жіноча"
}
const AGE_CONST = {
stage1: "15-17",
stage2: "18-21",
stage3: "22-25",
stage4: "26-30",
stage5: "31-35",
stage6: "36-40",
stage7: "41-45",
stage8: "46-50"
}
const ALCOHOL_CONST = {
stage1: "al... |
import Configer from '../config/Configer';
import ShareUi from '../Gui/ShareUi';
class Share extends Phaser.State {
constructor () {
super();
}
init (obj) {
this.overlay = obj.overlay;
this.addMainBg();
this.resize();
this.hideOverlay();
}
create () {
... |
// @flow
import React, { Component, Fragment } from "react";
import { connect } from "react-redux";
import {
type AsyncStatusType,
type NotificationType,
} from "shared/types/General";
import Loader from "components/loader";
import UpdateEmployeeForm from "./component/updateEmployeeForm";
import { ASYNC_STATUS } ... |
define(['jquery', 'underscore', 'backbone', 'fetchPolyfil'], function () {
var VehicleView = Backbone.View.extend({
tagName: 'li',
id: function () {
return 'vehicle-' + this.model.get('id');
},
events: {
'click .delete-btn': 'deleteElement',
'click... |
function solve(input) {
let text = input.shift().split(' ');
for (let i = 0; i < input.length; i++) {
let tokens = input[i].split(' ');
let command = tokens[0];
if (command === 'Stop') {
break;
}else if (command === 'Swap') {
let firstWord = tokens[1];
... |
'use strict'
angular
.module('service.matter', [
'ngSanitize',
'ui.bootstrap',
'ui.tms',
'http.ui.xxt',
])
.provider('srvSite', function () {
var _siteId, _oSite, _aSns, _aMemberSchemas, _oTag
this.config = function (siteId) {
_siteId = siteId
}
this.$get = [
'$q',
... |
window.onhashchange = function (ev) {
HashMapper.MapInfo.invokeByHashCode();
};
/**
* @version 1.0.0.0
* @copyright Copyright © 2017
* @compiler Bridge.NET 15.7.0
*/
Bridge.assembly("HashMapper", function ($asm, globals) {
"use strict";
Bridge.define("HashMapper.MapInfo", {
statics: {... |
import React from 'react';
import { Redirect } from 'react-router-dom';
export const withPermission = (Component, requiredPermission) => {
const WithPermission = (props) => {
const currentRole = JSON.parse(localStorage.getItem('currentUserRole'));
// Check if the user has the required permission
const h... |
var mongoose = require('mongoose'),
PermissionSchema = require('./permission').schema,
Schema = mongoose.Schema;
var roleSchema = new Schema({
name: { type:String, required: true, index:{ unique:true, dropDups: true }},
permissions: [ PermissionSchema ]
});
roleSchema.virtual('created').get(function (... |
angular.module("logout", [])
// Logout controller
.controller("LogoutCtrl", function ($scope, $state, auth) {
// get all posts from services
auth.logout();
$state.go("login", {}, { location: "replace" });
});
|
class HomeController {
constructor($scope) {
$scope.items = [
{ title: 'Lorem' },
{ title: 'Ipsum' },
{ title: 'Dolor' },
{ title: 'Sit' },
{ title: 'Amet' }
];
$scope.addItem = function(title) {
$scope.items.push({ tit... |
import React, { Component } from 'react';
import { View, Text, StyleSheet, Image, TouchableOpacity } from 'react-native';
import { Icon } from 'react-native-elements';
export class PlaceDetail extends Component {
constructor(props) {
super(props);
this.state = {
};
this.goToPlace = this.goToPlace.bi... |
export function setLang(lang) {
return { type: "SET_LANG", lang }
}; |
import { Debug } from '../../core/debug.js';
import { TRACEID_VRAM_VB } from '../../core/constants.js';
import { BUFFER_STATIC } from './constants.js';
let id = 0;
/**
* A vertex buffer is the mechanism via which the application specifies vertex data to the graphics
* hardware.
*
* @category Graphics
*/
class Ve... |
var select = document.getElementById("sampleSelect");
async function ret(){
try{
await $.post('/post',
{
processing: 'Upload',
firstname: document.getElementById("firstname").value,
lastname: document.getElementById("lastname").value,
mailaddress: document.getElementById("mailaddress"... |
export default class BootScene extends Phaser.Scene {
constructor() {
super({
key: 'BootScene'
});
}
preload() {
this.load.tilemapTiledJSON('Home', 'assets/maps/home.json');
this.load.tilemapTiledJSON('Level1', 'assets/maps/level1.json');
this.load.image('tiles', 'assets/tiles... |
/* jshint esversion: 6 */
const builder = require('botbuilder');
const { Provider, ConversationState } = require('./provider');
// dispatch messages between agent and user
function Router(bot, isAgent) {
'use strict';
const provider = new Provider();
const middleware = () => {
return {
... |
//******************************** VARIABLES / REQUIRE ********************************/
//*************************************************************************************/
const knexConfig = require('../knexfile');
const ENV = process.env.ENV || "development";
const knex = require('knex... |
/* global it, expect, describe */
// @flow
import React from 'react'
import { mount } from 'enzyme'
import renderer from 'react-test-renderer'
import Input from '../index'
describe('Input', () => {
it('Input with className', () => {
const input = mount(
<Input theme={{ input: 'is-small' }} />,
)
... |
function myMenuButton() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
};
$('#title').fadeOut(5000);
function randColor(tag) {
rand = Math.random();
if ($(tag).hasClass('fa fa-squ... |
$(function(){
var Name = JSON.parse(localStorage.getItem("loginName"))
if(Name!=null){
$(".header_top .top ul>li:nth-child(2)").text(Name);
$(".header_top .top ul>li:nth-child(4)").text("安全退出");
if($(".header_top .top ul>li:nth-child(2)").text()==Name){
$(".header_top .top ul>li:nth-child(2)")... |
import React from 'react';
import { Auth, I18n } from 'aws-amplify';
import { Header } from '../fsc/Header';
import { Button } from '../fsc/Button';
export class Options extends React.Component {
signOut() {
Auth.signOut()
.then(() => window.location.reload())
.catch(err => console.log(err));
}
... |
import {
FETCH_STARTED_ORDER_LIST,
FETCH_SECCESS_ORDER_LIST,
FETCH_FAILURI_ORDER_LIST,
COMMENT_ADD,
COMMENT_CANCEL,
COMMENT_UPDATA
} from './actionTypes'
export const fetchStarted = () => ({
type: FETCH_STARTED_ORDER_LIST
});
export const fetchSuccess = (data) => ({
type: FETCH_SECCESS... |
import * as linkInsert from './linkinsert.js'
let backgroundPagePort;
chrome.runtime.onConnect.addListener(function connectListener(port) {
backgroundPagePort = port;
backgroundPagePort.onDisconnect.addListener(function disconnectListener() {
linkInsert.removeLinks();
backgroundPagePort.onDisco... |
"use strict";
function SpeechService(roomService) {
// Fields
let me = this;
this.speechSynthesis = null;
this.voices = null;
this.selectedVoice = null;
// Methods
this.speakCurrentLocation = function (room) {
return roomService.getBuilding(room.building).then((building) => {
return ne... |
/*eslint-env browser*/
var btnMenu = document.getElementById('btnmenu');
var nav = document.getElementById('nave');
document.getElementById('btnmenu').addEventListener('click', function () {
"use strict";
document.getElementById('nave').classList.toggle('mostrar');
}); |
/**
* @author YuBing
*/
/*
* 根据不同的浏览器,获取Ajax对象
*/
function getAjaxObject() {
var xmlHttpRequest;
// 判断是否把XMLHttpRequest实现为一个本地javascript对象
if(window.XMLHttpRequest){
xmlHttpRequest = new XMLHttpRequest();
}else if(window.ActiveXObject){ // 判断是否支持ActiveX控件
try{
// 通过实例化ActiveXObject的一个新实例来创建XMLHttpReques... |
import React, { Component } from 'react';
import moment from 'moment';
import PropTypes from 'prop-types';
const defaultStyles = {
clockStyle: {
height: '8rem',
margin: 0,
padding: 0,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
fontSize: '61p... |
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const WebpackBar = require('webpackbar')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const ESLintPlugin = require('eslint-webpack-plugin')
module.expor... |
//-------------
// GLOBAL VAR
//-------------
//-- IMPORT MODULES
var app = require('express')(),
http = require('http').Server(app),
Gpio = require('onoff').Gpio;
//-- DEFINE LEDS
var led_red = new Gpio(17, 'out'), // Red light
led_green = new Gpio(18, 'out'); // Green light
//-- MAKE ARRAY LEDS
var led... |
// Get Current Date
let today = new Date(); // new Date object
// now concatenate formatted output
let date = (today.getMonth() + 1) + " / " + today.getDate() + " / " + today.getFullYear();
document.getElementById('currentdate').innerHTML = date;
// Defining Table
// INPUT: Get first name from input box
// PROCESSING:... |
import React, { Component } from "react";
import "../Style/contact.css";
import axios from "axios";
class Contact extends Component {
state = {
social: [
{ name: "Git", src: "social-git.png" },
{ name: "Facebook", src: "social-fb.png" },
{ name: "Twitter", src: "social-tw.png" },
{ name: ... |
import React, { useContext } from 'react'
import { Link } from 'react-router-dom'
import IngredientContext from '../../context/ingredient/ingredientContext'
import IngredientItem from './IngredientItem'
const Ingredients = () => {
const ingredientContext = useContext(IngredientContext)
const { ingredients } = ingr... |
import React, { Component } from 'react';
import Track from './Track';
class Playlist extends Component {
constructor(props) {
super(props);
this.state = {
tracks: []
}
this.playDisabled = false;
this.pollID = null;
}
getData = () => {
if (this.props.playlist_id === '' || this.pr... |
/*
* Checkout page object
*
* @package: Blueacorn Checkout.js
* @version: 1.0
* @Author: Luke Fitzgerald
* @Copyright: Copyright 2015-09-04 13:14:33 Blue Acorn, Inc.
*/
'use strict';
function Checkout() {
var url = 'checkout/onepage';
var checkoutHeading = 'body > div.wrapper > div > div.main-container.col2-right-... |
ymaps.ready(function () {
var myMap = new ymaps.Map('map', {
center: [55.648447, 37.540186],
zoom: 16,
controls: ['zoomControl']
}, {
searchControlProvider: 'yandex#search'
}),
// Создаём макет содержимого.
MyIconContentLayout = ymaps.... |
// User inputs the numbers/digits of Fahrenheit temperature
var inputBox = document.getElementById('numbersInputF');
var calculateC = document.getElementById("calculateC");
calculateC.onclick = function(){
if (inputBox.value ==+ "")
{ window.alert("Please input a valid temperature");
}
else {
var calcul... |
var vm = new Vue({
el: '#app',
data: {
userName: "",
password: "",
},
methods: {
getCommodityList: function () {
console.log(vm.userName)
console.log(vm.password)
$.ajax({
type: "post",
url: "/loginapi",
... |
var searchData=
[
['pagedarray_0',['PagedArray',['../class_paged_array.html',1,'']]],
['parray_1',['pArray',['../class_file_scanner.html#aa133ef6bf6e3120235efc64573404aba',1,'FileScanner']]],
['partition_2',['partition',['../class_to_quick_sort.html#a94c64b1385f47bd3d874a5f75e24798f',1,'ToQuickSort']]],
['print... |
import React, { Component } from 'react';
import MainLayout from "../components/layouts/mainLayout";
import Message from "../components/includes/message";
import Router from "next/router";
class About extends Component {
handleRouterStart = url => {
console.log('App is changing to : ', url);
}
ha... |
function InitPage(module) {
InitDatepicker();
//var module = '@Model.result.tbActive';
//if ('@string.IsNullOrEmpty(Model.result.tbActive)' == "True") {
// module = "product";
//}
var liID = "li-" + module;
var tabID = module + "-tab";
$("#" + liID).addClass("active");
$("#" +... |
import React from "react";
import {Circle, Popup} from 'react-leaflet';
import numeral from 'numeral'
const caseTypeColor = {
cases: {
hex: "#cc1034",
multiplier: 800
},
recovered: {
hex: "#7dd71d",
multiplier: 1200
},
deaths: {
hex: "fb4443",
multipl... |
import React,{ Component } from 'react';
import { Layout, Menu, Icon } from 'antd';
import { NavLink } from 'react-router-dom';
const { SubMenu } = Menu;
const { Sider } = Layout;
import './index.css';
class AdminSider extends Component {
render(){
return (
<div className="AdminSider">
<Sider width={200} s... |
$(document).ready(function () {
$('input[type=checkbox]').css('margin-right', '10px');
$('input[type=checkbox]').on('click', function () {
var amenId = [];
$('input:checked').each(function () {
amenId[$(this).attr('data-id')] = $(this).attr('data-name');
});
$('input:disabled').each(function (... |
import { logout } from '../actions/auth';
import { CLEAR_DATA } from '../actions';
export const getLocalStorageJWT = () => {
try {
return JSON.parse(localStorage.getItem('state.auth.tokens')) || undefined;
} catch (e) {
return undefined;
}
};
export const saveJWT = (state) => {
if (!state.auth || !sta... |
import React, { Component } from "react";
import propTypes from "prop-types";
import { FlipGameCard, FlipGameOptions } from "components";
import GamePage from "containers/GamePage";
import UserContext from "containers/App/UserContext";
import coinFlipBet from "lib/api/coinFlip";
import Cache from "../../lib/cache/cache... |
import React from 'react';
import './dashboard.css'
import {withRouter} from 'react-router-dom'
class Dashboard extends React.Component {
constructor(props){
super(props);
this.state={
selectedCategory:'',
buttonclicked:true
}
}
onchangeSelcet=(e)=>{
// ... |
document.addEventListener("DOMContentLoaded", function() {
var mouse = {
click: false,
move: false,
pos: {x:0, y:0},
pos_prev: false
};
var canvas = document.getElementById('doodle');
var context = canvas.getContext('2d');
//Establish the WebSocket connection and set up event hand... |
'use strict';
angular.module('myShoppinglistApp')
.controller
(
'ShoppinglistCtrl'
, function ($scope, $location, $http, $mdDialog)
{
var vm = this;
vm.queryString = $location.search();
vm.thisShoppinglist = '';
vm.iconMap = {"true":"maps:beenhere", "false":"action:done"};
$... |
// want to test firebase app out. Want to have app that interacts
//with the user,and uses in app messaging with FireBase
//will need a main function with the ability to add users to an object
//or an array to document and leave open the ability to communicate with
//each user.
//within the function I will ne... |
(function (ko, $p, toastr) {
ko.components.register('ticket-editor', {
viewModel: function (params) {
$p.guard(params.eventId, 'eventId');
var me = this,
adDesignService = new $p.AdDesignService(params.adId),
eventService = new $p.EventService(),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.