text stringlengths 7 3.69M |
|---|
jQuery( document ).ready( function( $ )
{
//Variables
var idregistro = 0;
var ideliminar = 0;
var subio = false;
selectSociedades();
selectEditSociedades();
$("#loader").show();
setTimeout(function(){ $("#loader").fadeOut(); }, 1000);
// Propiedades
$('.enabled').css( "cursor" , "pointer" );
$('.disa... |
function printBottomMenu() {
var strHtml = '<table border="1px"><tbody><tr>';
var elMenu = document.querySelector('.bottomMenu');
var leftClick = `onclick="hintClicked(this)"`;
for (var i = 0; i < 3; i++) {
var className = 'menuCell life';
strHtml += '<td ' + ' class="' + class... |
/*
Noble stickNfind scan example
This example uses Sandeep Mistry's noble library for node.js to
create a central server that finds stickNfind peripherals.
created 26 Jan 2015
by Maria Paula Saba
*/
var noble = require('noble'); //noble library
// here we start scanning. we check if Bluetooth is on
... |
// package: chat
// file: chat.proto
var chat_pb = require("./chat_pb");
var api_pb = require("./api_pb");
var grpc = require("@improbable-eng/grpc-web").grpc;
var ChatService = (function () {
function ChatService() {}
ChatService.serviceName = "chat.ChatService";
return ChatService;
}());
ChatService.GetConne... |
import { useState, useEffect } from "react";
import useMoveCursorSound from "../configuration/useMoveCursorSound.hook";
export default function useCharacterAILevel(input, initialLevel = 0) {
const moveCursorSound = useMoveCursorSound();
const [level, setLevel] = useState(initialLevel);
useEffect(() => {
con... |
var express = require('express');
var app = express();
// basic GET request route
app.get('/', function (req, res) {
console.log('Simple GET request');
res.send('Hello GET');
});
// basic POST request route
app.post('/', function (req, res) {
console.log('Simple POST request');
res.send('Hello POST');
});... |
import { Row, Col } from 'reactstrap';
import PropTypes from 'prop-types';
import cx from 'classnames';
import styles from './cartAddon.scss';
const getPriceClasses = (props) => {
if (props.showDetails) {
return 'price';
} else {
return 'price price--large';
}
}
const CartAddon = (props) => {
const qu... |
const ConnectDb = require("../class/ConnectDb");
module.exports = {
getAll: function (req, res) {
// connection database
try {
const db = ConnectDb.getInstance();
db.connected();
db.makeQuery("SELECT * FROM users", (results, fields) => {
return r... |
let arr = [new Date(), new Date(), new Date()];
arr[0].setMinutes(arr[0].getMinutes() + 5);
arr[1].setMinutes(arr[1].getMinutes() + 30);
arr[2].setHours(arr[2].getHours() + 1);
let initialState = {
add: false,
tasks : [
{id: 1, time: arr[0].toLocaleString("ru",{hour:"numeric", minute:"numeric"}), task : 'Some text... |
// Auth
export const SET_TOKEN = 'SET_TOKEN';
export const LOGOUT = 'LOGOUT';
export const SET_AUTH_REDIRECT_PATH = 'SET_AUTH_REDIRECT_PATH';
// Cart
export const SET_CART = 'SET_CART';
export const ADD_TO_CART = 'ADD_TO_CART';
export const DELETE_FROM_CART = 'DELETE_FROM_CART'; // Reduce quantity of a single product
... |
const axios = require("axios").default;
const FormData = require("form-data");
const { Like, User } = require("../models/index");
const { sequelize } = require("../sequelize");
const { QueryTypes } = require("sequelize");
const httpClient = axios.create({
baseURL: "http://172.20.0.3:5000/api/",
});
const getGenres ... |
/**
* Created by marno on 2017/4/6
* Function:存放常用颜色值
* Desc:
*/
const colors = {
//通用颜色
white_fff: '#fff',
black_000:'#000',
gray_e9e9e9:'#e9e9e9',
//App 主色调
green_00C853: '#67D5B5',
red_E53935:'#EE7785',
blue_009688:'#C89EC4',
yellow_ffc962: '#ffc962',
blue_00B0FF: '#84B1E... |
import {
Button,
Fade,
Grid,
Modal,
Paper,
Backdrop,
TextField,
FormControlLabel,
Switch,
} from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
import { ArrowDropDown, Close } from "@material-ui/icons";
import AccountCircle from "@material-ui/icons/AccountCircle";
import S... |
var Tamagotchi = {
initialize: function(inputName) {
this.name = inputName;
this.foodLevel = 10;
this.sleepLevel = 10;
this.activityLevel = 10;
},
timePasses: function(){
this.foodLevel-= 1;
this.sleepLevel-= 1;
this.activityLevel-= 1;
},
isAlive: function(){
if (this.foodLevel >= 1){
... |
/**
* Copyright 2020 Viero, Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ... |
var inicio = true;
var cont=0;
$(document).ready(function(){
$('#actividadCamino').css("height", ($( window ).height()));
$('#actividadCamino2').css("height", ($( window ).height()));
$('#contenedorFlechas').css("height", ($( window ).height()-83));
$('#objetosHabitacion').css("height", ($(window).height()-70));
$... |
import React from "react";
export const useHttpHook = () => {
const [isLoading, setLoading] = React.useState(false);
const [error, seterror] = React.useState(null);
const activeHttpRequests=React.useRef([]);
const senRequest = React.useCallback(async (url, method = "GET", body = null, headers = {}) => {
... |
window.$ = window.jQuery = require('jquery')
$(document).ready(function(){
console.log('Vamos testar um pouco?')
})
|
import React from 'react';
import Dom from 'react-dom';
import Heading from './tags/heading/heading.jsx';
const mountPoint = document.getElementById('mount-point')
if (mountPoint) {
Dom.render(<Heading>Hello World</Heading>, mountPoint);
}
console.log('MAIN_BUNDLE!') |
var pageSize = 25;
var info_type = "order_payment_hitrust";
var secret_info = "id;pan;bankname";
/**********************************************************************網際威信銀行使用信息**************************************************************************************/
//站臺管理Model
Ext.define('gigade.Status', {
extend... |
import Http from "./http.js";
import {ServerLink} from "./serverLink.js";
export class RenderTaskList {
renderTasks(user) {
const serverLink = new ServerLink();
const http = new Http(serverLink.link);
const tasks = user.tasks;
const tasksInner = document.querySelector('#tasksInner... |
var express = require('express');
var router = express.Router();
const multer = require('multer');
const multerS3 = require('multer-s3');
const aws = require('aws-sdk');
aws.config.update({
secretAccessKey: process.env.SECRET_ACCESS_KEY,
accessKeyId: process.env.ACCESS_KEY_ID,
region: 'us-east-1' // region... |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Introduce from './Introduce';
import Main from './Main';
import Tech from './Tech';
import Life from './Life';
import './App.css';
import './index.css';
import './bootstrap.css';
class Nav extends Component{
handleClick1(){
... |
const questionList = [
{
subtitle: '产品经理是……?',
questions: ['我所在公司对产品经理的定义', '国内产品经理眼花缭乱的职位之间到底有什么区别?'],
},
{
subtitle: '产品经理的工作日常',
questions:[
'产品经理的一天都在做什么?花在每类事情上的时间分布是?每天总工作时长为多久?', '产品经理最重要的工作技能是什么?', '产品经理最经常使用的工具是什么?']
},
{
subtitle: '产品经理的酸甜苦... |
import React, { useState } from 'react';
import { connect } from 'react-redux';
import Button from 'react-bootstrap/Button';
import Form from 'react-bootstrap/Form';
import Alerts from './Alerts';
import { AlertAction, UserAccount } from '../redux/actionTypes';
function UserSettingsPage({ clearAlerts, user, updatePas... |
import React, { Component } from 'react';
import "./Welcome.css"
export default class LessonPlan extends Component {
render() {
return (
<div>
<div style ={{marginTop: "120px"}}>
<h4> Add a new lesson</h4>
<div style = {{paddingLeft: "20px", paddingTop... |
import 'babel/polyfill';
import express from 'express';
import http from 'http';
import debug from 'debug';
import mongoose from 'mongoose';
import morgan from 'morgan';
import bodyParser from 'body-parser';
import {initAuthentication} from './authenticate';
import {initMessages} from './messages';
import {initSearch} ... |
/**
* HyperCities mapList Object
*
* @author HyperCities Tech Team
* @copyright Copyright 2008, The Regents of the University of California
* @date 2008-12-22
* @version 0.7
*
*/
HyperCities.mapList = function() {
// do NOT access javascript generated DOM from here; elements don't exist yet
// Pri... |
var tokki = angular.module("directives").directive("productosLineList", ["confirm",
function(confirm){
return {
restrict: "E",
templateUrl: "pages/admin/productos/productosLineList/productosLineList.html",
}
}
])
|
import React, { Component } from 'react';
import Table from './Table'
import Form from './Form'
import './App.css';
class App extends Component {
state = {
characters : [
{
'name':'源氏',
'type':'突击'
},{
'name':'莫伊拉',
'type':'支援'
},{
'name':'查莉娅',
... |
(function($) {
$.fn.randomEnough = function(options) {
var settings = $.extend({
number: 5,
includeClass: "",
excludeClass: ""
}, options);
var $this = $(this);
return this.each( function() {
var randomItem,
randomItemArray = [];
$this.addClass(setti... |
"use strict"
const https = require("https")
/**
* Faz o download do html do endereço passado como parâmetro.
* OBS: O código assume que o endereço é HTTPS
* @param {*} endereco
*/
function downloadHTML(endereco)
{
var allData = ""
return new Promise(function(resolve, reject)
{
https.get(end... |
/*
Ejercicio 29
Crear un documento con el nombre ej29.js
Calcular y mostrar en consola el perímetro de un cuadrado (el perímetro es simplemente cuatro veces la longitud del lado)
La longitud del lado es de 10
*/
let longitudDelLado = 10;
let perimetroDeUnCuadrado = longitudDelLado * 4;
console.log(perimetroDeUnCuadr... |
angular.module('sxroApp')
.controller('UsersCtrl', ['$scope', '$rootScope', '$mdDialog', 'utils', 'users',
function( $scope, $rootScope, $mdDialog, utils, users) {
$scope.users = users;
//users search query
$scope.search = {
query:... |
/**
* Controller
*/
angular.module('ngApp.carrier').controller('CarrierAddEditController', function ($scope, $location,$translate, $filter, LogonService, SessionService, CarrierService, $uibModal, $uibModalInstance, carriers, mode, carrier, $log, toaster) {
//Set Multilingual for Modal Popup
var setModalOpt... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { IoIosTrash, IoIosWarning } from 'react-icons/io'
import { toggleAdminUserView, updateSearch, toggleAdmin, deleteUser } from '../actions/appActions'
import { Link } from 'react-router-dom'
export class User extends Component {
c... |
import React from "react";
import '../../../src/assets/css/index.css';
import '../../../src/assets/css/base.css';
// reactstrap components
import { Card, CardBody, CardTitle, Container, Row, Col } from "reactstrap";
const FrontHeaders = () => {
return (
<Row className="m-4">
<Col md="4" >
... |
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import CandleSVG from '../../svg/candle.svg';
import WeightSVG from '../../svg/weight.svg';
import HeightSVG from '../../svg/height.svg';
import {
isMinMaxFilterApplied,
getFilterMinMaxString,
isAgeOrWeightOrHe... |
var e5= {
typeEnum : []
};
// e5.typeEnum["11"]="花式学习";
// e5.typeEnum["12"]="花式表演";
// e5.typeEnum["13"]="花式疯狂";
// e5.typeEnum["14"]="花式双板";
// e5.typeEnum["15"]="花式情侣";
// e5.typeEnum["16"]="花式混音";
e5.typeEnum["21"]="竞速疯狂";
e5.typeEnum["22"]="竞速双板";
// e5.typeEnum["23"]="竞速情侣";
// e5.typeEnum["24"]="竞速混音";
|
import React, { useState } from "react"
import { Card, InputField, Stack, Button, Alert } from "bumbag"
import { createUser } from "./api"
export default function UserForm() {
const [loading, setLoading] = useState(false)
const [error, setError] = useState(null)
const [firstName, setFirstName] = useState("")
c... |
import Race from './Race';
import Dwarf from './Dwarf';
export default class HillDwarf extends Dwarf {
constructor() {
super('hillDwarf');
this.statMods.wisdom = 1;
}
} |
angular.module('app.component1')
.service('CrudService', ['$http', function($http) {
'use strict';
this.post = function(book) {
$http({
method: 'POST',
url: '/books',
data: book
}).then(function successCallback(response) {
... |
import React from 'react'
import { mount, shallow } from 'enzyme'
import { expect } from 'chai'
import sinon from 'sinon'
import configureMockStore from 'redux-mock-store'
import thunk from 'redux-thunk'
const middlewares = [ thunk ]
const mockStore = configureMockStore(middlewares)
const store = mockStore({ weather: ... |
(() => {
this.name = "michel";
const getNameArrowFn = () => this.name;
const user = {
name: 'Nome do objeto',
getNameArrowFn
}
testes(user.getNameArrowFn());
})(); |
/**
* WordPress dependencies
*/
const { __ } = wp.i18n;
const { applyFilters } = wp.hooks;
const getInspectorOptions = ( key, args ) => {
let options = [];
switch( key ) {
case 'imageFit':
options = [
{ label: __( 'Contain', 'cgb' ), value: 'contain' },
{ label: __( 'Cover', 'cgb' ), value: 'cover' },... |
//map
function initMap() {
if($('#map_inlocat').length != 0){
var lat = $('#sh-lat-tik').val();
var lon = $('#sh-lng-tik').val();
latlon = new google.maps.LatLng(lat, lon)
var map = new google.maps.Map(document.getElementById('map_inlocat'), {
zoom: 4,
center: latl... |
import styled from 'styled-components';
export const commonButton = styled.div`
text-decoration: none;
color: black;
padding: 10px;
border: 1px solid black;
cursor: pointer;
-webkit-transition: all 0.15s ease-in;
transition: all 0.15s ease-in;
&:hover {
background-color: gray;
color: white;
... |
// Details view for patient data.
prDemo.views.PatientDetailsView = Ext.extend(Ext.Panel, {
fullscreen: true,
baseCls: 'details',
dockedItems: [
{
dock: 'top',
xtype: 'toolbar',
title: 'Patient Details'
},
{
dock: 'bottom',
... |
function setOnMethods(socket){
socket.on('connect', function(){
//username = prompt("What's your name?");
//socket.emit('adduser', getRoom(), getUsername());
//console.log("username " + getUsername);
console.log("on connect");
});
// On a essayé de rejoindre une salle qui es... |
(function(window) {
var dialogBuilder = {};
var axisType = [{
value: "rotary",
text: "Rotary"
}, {
value: "linear",
text: "Linear"
}, {
value: "rotaryUnlim",
text: "Rotary Unlimited"
}, {
value: "spindle",
text: "Spidle"
}];
va... |
'use strict'
/**
* Test dependencies
*/
const chai = require('chai')
const chaiAsPromised = require('chai-as-promised')
/**
* Assertions
*/
chai.should()
chai.use(chaiAsPromised)
let expect = chai.expect
/**
* Code under test
*/
const crypto = require('@trust/webcrypto')
const { NotSupportedError } = require('... |
const express = require("express");
const app = express();
app.get("/", (req, res) => {
// res.send("Hello World!");
//Sending the status code
//res.status(404).send("Hello World!");
res.status(404).send({
error: "Page not found.",
nane: "Todo app v1.0"
});
} );
app.get("/users", (req, res) => {
... |
import React from 'react';
import {Link, Redirect} from 'react-router-dom';
import LoginRegistrationService from '../services/LoginRegisterService.js';
import NavBar from './NavBar';
class Update extends React.Component {
constructor(props) {
super(props);
this.state = {
user: {},
... |
import Vue from 'vue'
import vuex from 'vuex'
import Customer from '../../models/BusinessAssociate'
import axios from 'axios'
import Constants from '../../Utility/constants'
const BASE_URL=Constants.BASE_URL
const MODEL_URL='customers/'
const URL=BASE_URL+MODEL_URL
Vue.use(vuex)
export default{
state:{
cus... |
/*TMODJS:{"version":5,"md5":"d96ee8b9212e47d88cb79ccc382ef3a8"}*/
define(function(require) {
return require("../template")("nav/level3", function($data, $id) {
var $helpers = this, $escape = $helpers.$escape, data = $data.data, $out = "";
$out += '<ul class="level3"> <li class="back_btn"> <a href="j... |
angular
.module('Mobilot')
.controller('HeaderController', HeaderController);
HeaderController.$inject = [
'$log', '$scope', '$rootScope', '$timeout',
'$state', '$stateParams', 'StateManager',
'$mdSidenav', '$mdMedia', '$translate',
'UtilityService', 'UserService', 'GeoLocationService',
'MobidulService'... |
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map... |
/*!
* HTML5 editor - 0.0.1
*
* Copyright (c) 2011 Evgeni Gordejev
*/
function htmlspecialchars(str){
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
}
function getFirstTextNode(node){
if(node.nodeType == 3){
return node;
}else{
var iter = node.firstChild;
while(iter... |
// approveDeploy.js
var app = angular.module('app',
[
'ui.grid',
'ui.grid.resizeColumns',
'ui.grid.grouping',
'ui.grid.selection',
'ui.bootstrap',
'angular-loading-bar',
'ngStorage',
'emguo.poller',
'ds.objectDiff'
]);
//Poller Configur... |
import router from './router'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css'// progress bar style
import auth from '@/utils/auth' // auth base on sessionStorage
NProgress.configure({ showSpinner: false })// NProgress Configuration
const allowlist = ['/loading', '/noAccess', '/err',... |
const mongoose = require('mongoose');
const { DB } = require('../config');
console.log('URI', DB.uri);
module.exports = mongoose
.connect(DB.uri, DB.options)
.then((res) => {
// console.log(mongoose.connections.length);
console.log('DB connected..');
console.log('Connections:', mongoose.connections.le... |
import {component} from '@reduct/component';
const isSelected = (domNode, selectedState) => {
const filters = JSON.parse(domNode.getAttribute('data-filters'));
return (filters.indexOf(selectedState) !== -1);
};
/**
* Randomize array element order in-place.
* Using Durstenfeld shuffle algorithm.
*/
function shuff... |
import { Button } from "reactstrap";
export const BtnRound = ({ onClick, children }) => {
return (
<Button block className="btn-round " color="danger" onClick={onClick}>
{children}
</Button>
);
};
|
/**
classe para criar Section. Estende Div.
[arg] Array _structureContainer - Label da opção onde o textArea é inserido.
sendo [0] - atributos da seção / [1] - opções da seção
**/
function Section(_structureContainer)
{ Div.call(this, "section", "Section", "section"); //Extends DIV
this.attributesData = _struc... |
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var html_1 = require('./html');
var Cell = (function (_super) ... |
// pages/ad/ad.js
const request_01 = require('../../utils/request/request_01.js');
const request_05 = require('../../utils/request/request_05.js');
const router = require('../../utils/tool/router.js');
const tool = require('../../utils/tool/tool.js');
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data:... |
var React = require('react-native');
var { StyleSheet } = React;
module.exports = StyleSheet.create({
"container": {
"flex": 1,
"backgroundColor": "#efefef",
"flexDirection": "column",
"justifyContent": "center",
"alignItems": "center",
width: null,
width: nul... |
var axios = require('axios');
var express = require('express');
var parseString = require('xml2js').parseString;
var app = express();
const mysql = require('mysql');
const htmlRoutes = require("./Routes/html_routes");
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = false
const config = {
headers: {
'Content... |
var searchData=
[
['template_3a_20template_20control_20functions',['TEMPLATE: template control functions',['../group___t_e_m_p_l_a_t_e___o_l_e_d___a_p_i.html',1,'']]]
];
|
import PouchDB from 'pouchdb';
import newId from '../util/idGenerator';
import axios from 'axios';
import { hashHistory } from 'react-router';
const fetcher = axios.create({
baseURL: process.env.REACT_APP_ENDPOINT,
headers: {
'Content-Type': 'application/json',
'Authentication': localStorage.session
},
... |
import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import { Provider } from 'react-redux';
import Navigator from './client/components/Navigator';
import store from './client/store';
export default class HungerMatch extends Component {
render() {
return (
<Provider store={... |
import React, {Component} from 'react';
import {
StyleSheet,
Text,
View,
AppRegistry,
Image,
TouchableHighlight
} from 'react-native';
import Carousel from 'react-native-carousel-view';
import styles from './Styles/ProductPagesStyles';
import { navigate } from 'react-navigation';
import Header from './hea... |
module.exports = (price) => `R$ ${price.replace('.', ',')}`;
|
const fs=require('fs');
// fs.writeFileSync("Read.pdf","My name is Md Adil Alam");
// fs.appendFileSync("Read.pdf", "Hello how are you I am fine thank you What about you");
fs.renameSync("ReadWrite.txt","ReadWrite1.pdf"); |
const http = require('http');
const fs = require('fs');
const url = require('url');
const qs = require('querystring');
const path = require('path');
const sanitize = require('sanitize-html');
const template = require('./lib/template');
const app = http.createServer((req, res) => {
let _url = req.url;
let query... |
module.exports = {
// Setup port
port: process.env.PORT || 9000,
// Setup the secret keys for jwt
jwt_secret_key_admin: process.env.SECRET_KEY_ADMIN || "kdsj4e323iko45589oijfdsnkljmld",
jwt_secret_key_user: process.env.SECRET_KEY_USER || "dkasf23sdafjoisdajfiosajdfoj",
jwt_secret_key_location: ... |
angular.module('Factories')
.factory('DatabaseFactory', ['$rootScope', '$q', '$resource', function ($rootScope, $q, $resource) {
return {
updateQuestions: function (Title, Body, Rating, Datetime, Categories) {
var updateQuestions = $resource('/main/update_questions/... |
/**
*
* Next.js uses the _app component to initialize pages.
* Overriding this component allows you to do amazing things like:
* - Persisting layout between page changes (header/footer)
* - Keeping state when navigating pages
* - Custom error handling
* - Injecting additional data into pages
* - Adding gl... |
var ContextModule = require('webpack/lib/ContextModule');
var HardContextModule = require('./hard-context-module-4');
var pluginCompat = require('./util/plugin-compat');
var relateContext = require('./util/relate-context');
function freezeHashContent(module) {
var content = [];
module.updateHash({
update: fun... |
const fs = require('fs');
const net = require('net');
const port = 8124;
var i = 0; //уникальный идентификатор для клиента
var formJSON = fs.readFileSync('qa.json', 'utf8');
let arrQuestion = JSON.parse(formJSON);
max = arrQuestion.length;
function shuffleArray(array) {
for (let i = array.length - 1; ... |
const equileader = array => {
let guess, count = 0;
for(let c of array) {
if(count == 0)
guess = c;
if(c == guess)
count++;
else
count--;
}
const leaders = array.reduce((sum, c) => c == guess ? sum + 1 : sum, 0);
if(leaders <= array.length / 2) return 0;
let lCount = 0;
l... |
/* Treehouse FSJS Techdegree
* Project 4 - OOP Game App
* Game.js */
class Game {
constructor() {
this.missed = 0;
this.phrases = this.createPhrases();
this.activePhrase = null;
}
/**
* Creates phrases for use in game
* @return {array} An array of phrases that could be used in the game
*/... |
/**
* This backbone model cares about folder actions within /files in the backend.
*/
var Folders = Backbone.Model.extend({
defaults: {
},
initialize: function () {
},
/**
* Create a folder.
*
* @param {string} promptQuestionString Translated version of "What's the new filename?"... |
import React, { Component } from 'react';
import Selectbox from '../Selectbox';
import { Button } from 'react-bootstrap';
const optionsRopa = [
{ value: 'Remeras', label: 'Remeras' },
{ value: 'Jeans', label: 'Jeans' }
];
class Header extends Component {
render() {
return (
<n... |
//Variable para cambiar la ip de la maquina que esta ejecutando el servidor
const IP_DB = '192.168.0.16';
export default IP_DB; |
var express = require('express');
var router = express.Router();
var passport = require('passport')
var {
getMyNotifications,
deleteNotification,
readAllMyNotication
} = require('../controllers/notification')
router.get('/get', passport.authenticate('jwt'), getMyNotifications);
// router.post('/mark-one... |
// the "main" code begins here
var ASSET_MANAGER = new AssetManager();
ASSET_MANAGER.queueDownload("./img/bg.jpg");
ASSET_MANAGER.queueDownload("./img/hill.png");
ASSET_MANAGER.queueDownload("./img/cheese.png");
ASSET_MANAGER.queueDownload("./img/Ant.png");
ASSET_MANAGER.queueDownload("./img/breadcrumb.png");
ASSET_M... |
// Peers manager is activated on only one machine at a time
// uniqueness = true
var Service = require('../classes/service.js');
var Route = require('../classes/route.js');
Peers_Manager.prototype = new Service();
// Constructor
function Peers_Manager() {
Service.apply(this);
function get_peers_db() {
return {
... |
openSection = 'today';
//js specific to the projects page.
$(document).ready(function(){
$('table.sticky tr td, table.nonsticky tr td').click( function(e) {
if ( $(e.target).is('td') ) {
if ( $(this).parent().find('input[type=checkbox]').is(':checked') ) {
$(this).parent().find('input[type=checkbox]').... |
//var dfwLabRescueApp = angular.module('dfwLabRescueApp', [
// 'ngRoute',
// 'dfwLabRescueControllers'
//]);
//dfwLabRescueApp.config(['$routeProvider',
// function ($routeProvider) {
// $routeProvider.
// when('/', {
// templateUrl: '/app/views/home.html',
// ... |
/**
* @class Ext.ux.grid.GridFilterTrigger
* @author 刘渝
* @contact 372289475@qq.com
*
*
*
*/
Ext.define('Ext.ux.form.filter.Grid', {
extend: 'Ext.form.field.Trigger',
trigger1Cls: Ext.baseCSSPrefix + 'form-clear-trigger',
//trigger2Cls: Ext.baseCSSPrefix + 'form-search-trigger',
c... |
var express = require('express'),
app = express(),
socketio = require('socket.io'),
swig = require('swig'),
routes = require('./routes'),
bodyParser = require('body-parser'),
morgan = require('morgan'),
pg = require('pg'),
conString = 'postgres://localhost:5432/twitterdb',
client = n... |
import h from 'mithril/hyperscript'
import input from './newItem.js'
import list from './list.js'
import footer from './footer.js'
export default function main () {
return [
h('h1', 'TODOS'),
h('div.todo-container',
input,
list(),
footer()
)
]
}
|
import CONSTANT from "../src/constants.js";
export default class ScrollTopArrow {
constructor(container) {
this.container = container;
this.isMyChild = this.isMyChild.bind(this);
}
isMyChild(child) {
return this.container.contains(child);
}
showScrollBtn() {
const arrow = document.querySele... |
import { createMuiTheme } from '@material-ui/core/styles';
const breakpointValues = {
lr: 1100,
md: 800,
};
const theme = createMuiTheme({
typography: {
fontFamily: [
'Maven Pro',
].join(',')
},
palette: {
primary: {
main: "#41B3A3",
contrastText: "#fff"
... |
var referrer = "";//登录后返回页面
referrer = document.referrer;
if (!referrer) {
try {
if (window.opener) {
// IE下如果跨域则抛出权限异常,Safari和Chrome下window.opener.location没有任何属性
referrer = window.opener.location.href;
}
} catch (e) {
}
}
//按键盘Enter键即可登录
$(document).keyup(func... |
window.DateTransform = {
from: function(serialized) {
var type = typeof serialized;
if (type === "string" || type === "number") {
return Date.parse(serialized);
} else if (serialized === null || serialized === undefined) {
// if the value is not present in the data,
// return undefined, not null.
re... |
export const MOCK_DATA = [
{
gid: '44841dec-10ad-43f3-8327-d623613388c0',
group_name: '我想成为影之强者!',
data: [
{
book_title: '我想成为影之强者! 01',
book_path:
'content://com.android.externalstorage.documents/tree/primary%3A%E8%BD%BB%E5%B0%8F%E8%AF%B4/document/primary%3A%E8%BD%BB%E5%B0... |
const axios = require('axios').default;
const fs = require('fs');
const path = require('path');
const Throttle = require('throttle');
const file = require('./file');
module.exports = {
async get(url, headers) {
const res = await axios.get(url, {
headers,
// headers: Object.assign({
// "User-A... |
/**
* 函数参数的默认值
*/
{
function log(x, y) {
y = y || 'World';
console.log(x, y);
}
log('Hello'); // Hello World
log('Hello', 'China'); // Hello China
log('Hello', ''); // Hello World
}
{
function log(x, y) {
if (typeof y === 'undefined') {
y = 'World';
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.