text stringlengths 7 3.69M |
|---|
import React from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
const TopbarVilla = ()=> {
return(
<div className="villa-header">
<p>Header</p>
</div>
)
}
TopbarVilla.propTypes = {
}
const mapStateToProps = state=> ({
})
export default connect(m... |
import React, { Component } from 'react';
import Row from './Row'
import Wrapper from './Wrapper'
class DefectTable extends Component {
constructor(props){
super(props);
this.state={
data:[],
}
this.getRows = this.getRows.bind(this);
this.toggleStatus = this.toggleStatus.bind(this)... |
var google = require('googleapis');
var auth = require('./googleauth');
module.exports = {
getClient: auth(google.calendar, 'v3', ['https://www.googleapis.com/auth/calendar',
'https://mail.google.com/',
'https://www.googleapis.com/auth/gmail.modify',
'https://www.googleapis.com/auth/gmail.compose',
... |
$(function () {
initPage(0, 10);
$('.finish').bind('click', function () {
// var result = $('#deal').find('select[name=result]').val();
// var resultDeal = $('#deal').find('select[name=resultDeal]').val();
// var description = $('#deal').find('select[name=description]').val();
va... |
import React, { Component } from 'react'
function Erreur() {
return (
<>
<h1>Erreur 404 : </h1>
<p>L'url n'est pas valide</p>
</>
)
}
export default Erreur; |
/* global $,window, jQuery, dkBreve, KbOSD */
window.dkBreve = (function (window, $, undefined) {
'use strict';
var DkBreve = function () {
};
DkBreve.prototype = {
/**
* Get current page in ocr pane
*/
getOcrCurrentPage: function () {
var ocrElem = $('.ocr... |
import moment from 'moment/moment';
const _ = require('lodash');
const aws = require('aws-sdk');
const Promise = require('bluebird');
aws.config.setPromisesDependency(Promise);
export default class DynamoHelper {
constructor() {
this.dynamo = new aws.DynamoDB({
region: process.env.REGION,
endpoint:... |
angular.module('lisaApp')
.controller('foodReplacementCtrl', ['$scope', '$stateParams', '$rootScope', 'AlimentoService',
function ($scope, $stateParams, $rootScope, AlimentoService) {
$scope.$on('$ionicView.beforeEnter', function (event, viewData) {
viewData.enableBack = true;
});
var sc = $scope;
var rs =... |
import {createStore,combineReducers,applyMiddleware} from 'redux'
import {createForms} from 'react-redux-form'
import {com} from './comments'
import {Dish} from './dish'
import {lead} from './lead'
import {prom} from './prom'
import thunk from 'redux-thunk'
import logger from 'redux-logger'
import { Initialfeedback } f... |
import CartContainer from './CartContainer'
import reducer from './reducer'
export {
CartContainer,
reducer
}
|
$('button').on('click', function () {
$.getJSON('https://akademia108.pl/kurs-front-end/ajax/1-pobierz-dane-programisty.php', function (data) {
var divNew = document.createElement('div');
$(divNew).attr('id', 'dane-programisty');
$('body').append(divNew);
... |
import "./WorkSectionOne.css";
function WorkSectionOne() {
return(
<>
<section className="Work-SectionOne">
<div className="Work-SectionOne-content-wrapper">
<div className="Work-SectionOne-content-Fitter">
<div className="Work-SectionOne-content-Fitter-Titel">
<h4>Work</h4>
</div>
... |
const tableRanking = document.getElementById("tableRanking");
const tbody = document.getElementById("ranking");
const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null;
const emojis = [-30, -5, 3... |
const request = require('request');
const base = 'http://localhost:3000';
const server = require('../../src/server');
describe('routes : index', () => {
describe('GET /', () => {
it('should render a landing page containing "News Your Own Adventure"', (done) => {
request.get(base, (err, res, body) => {
... |
var express = require('express');
var app = express();
var router = express.Router();
var mongoose = require('mongoose');
var db = 'mongodb://ayondot:mathematics223@ds127878.mlab.com:27878/rocky-bayou-89314';
mongoose.connect(db);
var linkSchema = mongoose.Schema({
link: {
type: String,
unique: true
}
});
var... |
function mathIt()
{
var num1 = parseInt(document.getElementById("txtNum1").value)
var num2 = parseInt(document.getElementById("txtNum2").value)
var sum = num1 + num2
var diff = num1- num2
var prod = num1 * num2
var quo = num1 / num2
var buildStringArr = ["{num1} + {num2} = {sum}",
... |
import {TargetSummary} from '../models';
import APIError from '../lib/APIError';
import httpStatus from 'http-status';
import Constants from '../lib/constants';
/**
* Load targetSummary and append to req.
*/
function load(req, res, next, id) {
TargetSummary.get(id)
.then((targetSummary) => {
req.targetS... |
import React from 'react'
export const ProgressBar = ({progress}) => {
return (
<div class=" w-3/5 pt-1 ">
<div class="overflow-hidden h-3 mb-4 text-xs flex rounded bg-amber-100">
<div style={{ width: `${progress}%` }} class="bg-gradient-to-r shadow-none flex flex-col text-cen... |
import FormInput from './FormInput.component.jsx';
export default FormInput; |
const Router = require('koa-router');
const mongoose = require('mongoose');
const ChatModel = require('../../models/chat');
const UserModel = require('../../models/user');
const MessageModel = require('../../models/message');
const router = new Router();
router.post('/api/chat/chat-rooms', async ctx => {
await Cha... |
import React from 'react';
import PropTypes from 'prop-types';
const ACTIVE_STYLE = {
color: '#5380F7'
};
function DropdownItem({
isActive,
value,
onSelect
}) {
const handleClick = event => {
onSelect(value);
event.preventDefault();
};
return (
<li style={Object.assign({}, isActive && ACTIV... |
import React from 'react';
import { createGlobalStyle } from 'styled-components';
import { useAuthState } from 'react-firebase-hooks/auth';
import { Router, Link } from "@reach/router"
import { SignIn } from './components'
import { Story, Stories, Home, Scene, Character } from './Pages'
import { auth } from './firebas... |
import styled from 'styled-components'
const TableCell = styled.div`
flex: ${({ size }) => size};
padding: 8px;
border: 1px solid black;
${({ heading }) => heading && `
font-size: 25px;
text-align: center;
`};
`;
export default TableCell |
import { createScript } from '../../src/framework/script/script.js';
import { Color } from '../../src/core/math/color.js';
import { AnimComponent } from '../../src/framework/components/anim/component.js';
import { AnimationComponent } from '../../src/framework/components/animation/component.js';
import { Application }... |
(function(){
function Player(initPlayer){
if(!(Player.prototype.attack instanceof Function)){
Player.prototype.attack=function(mob){
mob.health-=(this.mode>0) ? (this.mode*5>Math.floor(Math.random()*100)?this.dmg*2:this.dmg) : (this.mode*5>Math.floor(Math.random()*100)?0:this.dmg);
return !!mob.health;
... |
Application = {
Forms: {
validateFormApplication: function(){
$("#q-form-application").validate({
rules: {
"q-form-application-name": {
required: true,
},
"q-form-application-email": {
required: true,
email: true
},
"q-form-application-mobile": {
required: ... |
// require express
const express = require('express')
const passport = require('passport')
// require Mongoose model of collectionSchema
const Collection = require('../models/collection')
// const Movie = require('./../models/movie')
// require customErrors to detect when to throw error
const customErrors = require... |
import {Record} from './record'
export class Schema{
_records = [] //Array of Record
constructor(){
}
create(recordObject){
let record = new Record(recordObject, this)
this._records.push(record)
return record
}
registerRecord(record){
this._records.push(rec... |
app.controller("addActionController",['$scope','$modalInstance','$http','$timeout','checkUniqueService',"permItemId","aData",function($scope,$modalInstance,$http,$timeout,checkUniqueService,permItemId,aData){
$scope.formData = {};
if(aData){
$scope.formData = aData ;
}else{
$scope.formData.fType = 0;
... |
"use strict";
const express = require("express");
const app = express();
const port = process.env.PORT || 8080;
app.use(express.static(`${__dirname}/dist`));
app.all("*", (req, res) => {
console.log(`[TRACE] Server 404 request: ${req.originalUrl}`);
res.status(200).sendFile(`${__dirname}/dist/index.html`);
});
... |
import React, { useState, useEffect } from "react";
import { makeStyles } from "@material-ui/core/styles";
import Modal from "@material-ui/core/Modal";
import Backdrop from "@material-ui/core/Backdrop";
import "./SaveFlow.css";
import CrossButtonIcon from "../../Assets/message_card/crossbutton1.svg";
const useStyles =... |
//jshint esversion:6
//API requests
const express = require("express");
const bodyParser = require("body-parser");
const ejs = require("ejs");
const mongoose = require('mongoose');
const { Double } = require("mongodb");
const app = express();
app.set('view engine', 'ejs');
app.use(bodyParser.urlencoded({
exten... |
isEven = x => x%2 == 0 ? true : false;
find = function (x,fun) {
for(let i of x) {
if(fun(i)) {
return i;
}
}
}
console.log(find([1, 3, 5, 4, 2], isEven)); |
YUI.add("yuidoc-meta", function(Y) {
Y.YUIDoc = { meta: {
"classes": [
"Cycle",
"EventDispatcher",
"Fps",
"Polling"
],
"modules": [
"Gasane"
],
"allModules": [
{
"displayName": "Gasane",
"name": "Gasane",
"descrip... |
const express = require('express')
const router = express.Router();
const Task = require('../models/task')
const Folder = require('../models/folders')
//ruta de obtencion de folders
router.get('/api/folders', async (req, res) => {
const folders = await Folder.find()
console.log(folders)
res.send... |
export default {
getName(state) {
return state.name
}
} |
function sum(a, b) {
if (typeof a !== 'number' || typeof b !== 'number') {
throw new Error('parameters must be numbers');
}
return a + b;
}
// implemente seus testes aqui
test('sum', () => {
expect(sum(5, 4)).toEqual(9);
}) |
/*
* @Author: cash
* @Date: 2021-08-30 15:59:35
* @LastEditors: cash
* @LastEditTime: 2021-11-05 11:32:53
* @Description: file content
* @FilePath: \hdl-try\vite.config.js
*/
import { defineConfig, loadEnv } from 'vite';
import vue from '@vitejs/plugin-vue';
import { resolve } from 'path';
import autoprefixer fr... |
// for: content/api-streamer/examples.textile
/* eslint-disable no-undef */
const nouns = [
'people',
'history',
'way',
'art',
'world',
'information',
'map',
'two',
'family',
'government',
'health',
'system',
'computer',
'meat',
'year',
'thanks',
'music',
'person',
'reading',
'm... |
/*
* top2TopComponent.js
*
* Copyright (c) 2019 H-E-B
* All rights reserved.
*
* This software is the confidential and proprietary information
* of HEB.
*/
'use strict';
/**
* Component to support the page that allows users to manage top 2 top.
*
* @author vn73545
* @since 2.41.0
*/
(function () {
v... |
import { combineReducers } from 'redux'
import tagsReducer from './tags';
export default combineReducers({
tagsReducer,
}) |
$(document).ready(function(){
// Кешируем объект окна
$window = $(window);
$('section[data-type="background"]').each(function(){
var $bgobj = $(this); // Назначаем объект
$(window).scroll(function() {
// Прокручиваем фон со скоростью var.
//... |
'use strict';
import DetectController from './detect.controller';
/**
* @const {Object} DetectComponent
*/
const DetectComponent = {
controller: DetectController,
template: require('./detect.component.html')
};
export default DetectComponent;
|
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import Center from 'react-center';
import Button from '@material-ui/core/Button';
function Square(props) {
return (
<button className="square" onClick={props.onClick}>
{props.value}
</button>
);
}
function ... |
"use strict";
exports.pathCombine = exports.getEscapedFileName = exports.getPathParts = exports.getParentPath = exports.getName = exports.getFileExtension = exports.PATH_SEPARATOR = void 0;
var _iterator = require("../core/utils/iterator");
var PATH_SEPARATOR = '/';
exports.PATH_SEPARATOR = PATH_SEPARATOR;
var getF... |
import React, { Component } from 'react';
import { Container } from 'react-bootstrap';
class PageTitle extends Component {
render() {
return (
<div className="page-title">
<Container><h2>{this.props.title}</h2></Container>
</div>
)
}
}
export default PageTitle; |
FlowRouter.route('/', {
action: function() {
BlazeLayout.render('layout', { main: 'home', navbar: 'menu' });
},
name: 'home'
});
FlowRouter.route('/logs', {
action: function() {
BlazeLayout.render('logs', { log: 'login' });
},
name: 'logs'
});
// ##### USERS #####
// User route
FlowRouter.route('/... |
(function(){
var ReportController = function($scope,ReportFactory){
$scope.reports=[];
$scope.isOpen = false;
$scope.matchDate;
var alertSuccessClasses="alert alert-success alert-dismissible";
var alertErorrClasses="alert alert-danger alert-dismissible";
$scope.appliedClasses="alert alert-dismissible ... |
var gulp = require('gulp'),
watch = require('gulp-watch'),
browserSync = require('browser-sync').create();
var SCRIPTS_PATH = './_src/js/**/*.js',
STYLES_PATH = './_src/less/**/*.less',
HTML_PATH = './index.html';
gulp.task('watch', function() {
browserSync.init({
notify: fal... |
var rainRecurringBuildObject = function(controls) {
var obj = {
"enabled":controls.hasClass('rain-recurring-on')
};
if(obj.enabled) {
obj.frequency = controls.find('.rain-recurring-freq option:selected').val();
} else {
controls.find('input[name="recurring"]').val(JSON.str... |
/* since we want to use return and console.log in this case,
I want to use return for the first two and console.log in
the next two. Last will need a conditional workflow management system*/
//1) receives one argument and returns it in all caps1
function shout (input) {
return input.toUpperCase();
}
//2) receives one... |
/*******************************************
* Author: Jonathan Perry
* Date: 12/03/17
* Assignment: CS 340 - Project
*******************************************/
function updateBook(isbn){
$.ajax({
url: '/books/' + isbn,
type: 'PUT',
data: $('#update-book').serialize(), // #update-... |
import styled from 'styled-components';
export const Container = styled.div`
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 15px;
`;
export const BoxId = styled.div`
width: 120px;
height: 50px;
font-size: 20px;
font-weight: bold;
display: grid;
place... |
import { compareNumbers } from './utils.js';
// import functions and grab DOM elements
const btn = document.getElementById('btn');
// initialize state
let targetNumber = Math.floor(Math.random() * 20) + 1;
const userGuess = document.getElementById('input');
const message = document.getElementById('message');
const r... |
// Esse é um comentário de linha
console.log('Olá Mundo') // Aqui tem outro comentário
// Todo comentário é ignorado pelo motor do JS
/*
Esse é um comentario de bloco de código
Nele podemos comentar várias linhas
*/ |
const env = process.env
const Sequelize = require('sequelize')
const sequelize = new Sequelize(
env.DB_NAME,
env.DB_USER,
env.DB_PASSWORD,
{
host: env.DB_HOST,
port: env.DB_PORT,
dialect: 'mysql',
define: {
underscored: true
},
logging: false
... |
/***************************************************
* 时间: 7/17/16 10:33
* 作者: zhongxia
* 说明: 数值加减器
***************************************************/
//加载依赖的脚本和样式
(function () {
/**
* 获取当前脚本的目录
* @returns {string}
*/
function getBasePath() {
//兼容Chrome 和 FF
var currentPath = document.curren... |
function ChangeToTest(){
location.href = "Preguntas/Introduccion.html";
}
function ChangeToConcentrate(){
location.href = "Concentrate/Introduccion.html";
}
|
const baseURL = "https://api.mtb-connect.com:8080";
// const baseURL = "http://127.0.0.1:8000";
export default {
getUsersWithTrails(trailId) {
return fetch(
`${baseURL}/trailusers?trailId=${trailId}`
).then(resp => resp.json());
},
addUserWithTrail(newUser) {
return fetch(`${baseURL}/trailusers... |
import * as firebase from "firebase/app";
import React, { useEffect, useState } from "react";
import "./App.css";
export default function App() {
const [user, setUser] = useState();
useEffect(() => {
firebase.auth().onAuthStateChanged(userData => {
if (userData) {
setUser(userData);
} else ... |
function countChar(str) {
var output = {
};
var x = 0
for(i = 1; i < str.length; i++) {
if (str[0] === str[i]) {
x++
} else {}
}
output.push(x);
str.spice(0,1);
}
console.log(countChar("test"))
|
function CheckIE()
{
var Browser;
Browser = navigator.userAgent;
if (Browser.indexOf("Trident") == -1)
{
}
else
{
window.alert("It looks like you're using Internet Explorer! The tool will only work in Mozilla Firefox or Google Chrome.")
}
}
window.onload = CheckIE() |
var express=require('express');
var router=express.Router();
var User=require('../models/userModel');
var Ques=require('../models/quesModel');
var bodyParser=require('body-parser');
router.use(bodyParser.json());
//post question into database
router.route('/question')
.post(function(req,res,next){
req.body.userna... |
// Example of Splash, Login and Sign Up in React Native
// https://aboutreact.com/react-native-login-and-signup/
// Import React and Component
import React from 'react';
import {View, Text, StyleSheet} from 'react-native';
import {Thumbnail, ListItem, List, Left} from 'native-base';
import {
DrawerContentScrollView,... |
var bookshelf = require('../config/bookshelf'),
Joi = require('joi'),
AJSValidationError = require('./errors'),
Setting,
Settings;
Setting = bookshelf.Model.extend({
tableName: 'settings',
validate: {
name: Joi.string()
.error(new Error('name', 'name is required'))
.req... |
//console.log(5 <= 5)
// AND
// x and y | result
// true and true | true
// true and false | false
// false and false | false
// false and true | false
var age = 11;
var gender = "m";
// if (age >= 18 && gender == 'm')
// console.log("you can join the game cos you are " +age + " years old")
// else
// ... |
$(document).ready(function(){
$.cookie.json = true;
$.getJSON("api/menu", function(menu) {
var menu = menu.menu;
$.cookie("menu", menu);
console.log("The menu is" + $.cookie("menu"));
var keys = Object.keys(menu);
console.log(keys);
for(var key in menu){
if(key === "sauces"){
$("#tacoMe... |
import axios from 'axios';
import translate from '../Translate';
import * as flash from './flashActions';
import * as projectPanel from './projectPanelActions';
export function getAllProjects() {
return function (dispatch) {
axios.get('/projects')
.then(response => dispatch({
t... |
/* This is a comment */
function askQuestions() {
var firstName = prompt ('What is your first name');
var lastName = prompt ('What is your last name');
var fullName = firstName + ' ' + lastName;
console.log('User is called ' + fullName);
var userAge = prompt('How old are you?')
userAge = parseInt(userAge);
if (user... |
angular.module('speakEasy', [
'ngMaterial',
'ui.router',
'starter.home' //should need as a separate module
])
.config( function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/home');
$stateProvider
.state('/', {
redirectTo: '/landing'
})
.state('home', {
url: '/... |
import Link from "next/link";
import Image from "next/image";
//export default function Nav() {
//return (
const Navbar = () => {
return (
<div className="py-12">
<nav className="bg-red-200 shadow-md z-10 py-4 fixed top-0 inset-x-0 rounded-b-xl">
<div className="max-w-5xl px-4 mx-auto">
<... |
import React from 'react';
import Header from './Header'
import Deathmatch from './Deathmatch'
export default () => (
<>
<Header />
<Deathmatch />
</>
)
|
var age = parseInt(prompt("¿Cuál es tu edad?")); //23
// convirtiendo edad a segundos
var ageInSeconds = age*365*24*60*60;
//mostrando edad en la red
document.write("Tu edad es "+ age + " y en segundos sería " + ageInSeconds); |
export default class ProductoHorarioItem {
IdHorario;
IdProducto;
dia;
horaIni;
horaFin;
fechaIni;
fechaFin;
dias_mes_venta;
activo;
//calculados
tipo;
//CONSTANTES
static POR_DIA_SEMANA = 1;
static TODOS_LOS_DIAS = 3;
static POR_DIA_MES = 2;
static DIAS =... |
var express = require('express');
var router = express.Router();
var axios = require("axios");
//require request and cheerio to scrape
// var request = require('request');
var cheerio = require('cheerio');
//Require models
var db = require("../models");
// var Article = require('../models/scrape.js');
console.log("in... |
import React, { Component } from 'react';
import { product } from '../product';
export default class ShowShop extends Component {
constructor(props) {
super(props);
this.state = {
items: [],
};
}
// handles form submission
componentDidMount() {
let inventoryUrl = `http://localhost:3030... |
function mainButton(){
var newUrl = "../index.html"
document.location.href = newUrl
console.log('Received Event:');
}
function searchButton(){
var newUrl = "../html/test.html"
document.location.href = newUrl
console.log('Received Event:');
}
function messageButton(){
var newUrl = "../html/panel.html"
... |
import Vue from 'vue'
import VueResource from 'vue-resource'
import {API_ROOT} from '../config'
var auth = require("../utils/auth");
Vue.use(VueResource)
// HTTP相关
Vue.http.options.crossOrigin = true
Vue.http.options.xhr = {withCredentials: true}
Vue.http.interceptors.push(function(request,next){
// 这里对请求体进行处理
... |
var trex,gamestate="play";
var obsGroup;
var cloudGroup;
var score=0;
var touches=[];
function preload(){
trex1=loadAnimation("trex1.png","trex3.png","trex4.png");
ground1=loadImage("ground2.png");
cloud1=loadImage("cloud.png");
obstacle=loadImage("obstacle1.png");
obstacle2=loadImage("obstacle2.png");
obstacle3=loadIm... |
"use strict";
function loadHeader() {
var headerHTML = "<div class=\"brand mr-md\">\n <a href=\"#\">Gull Vue!</a>\n <small>v1.0.0</small>\n</div>\n<button type=\"button\" class=\"sidebar-toggle btn rounded-circle btn-raised btn-raised-default btn-icon\"\n aria-label=\"Close\">\n <i class=\"ti-menu\"></i>\n <i c... |
'use strict';
angular.module('webappV2App')
.provider('Phased', function PhasedProvider() {
// private
var $rootScope,
$http,
$location,
$window,
StatusFactory,
_FBRef,
_FURL,
_appConfig,
_INIT_EVENTS = {
SET_UP : 'Phased:setup',
META_SET_UP : 'Phased:meta',
PROFILE_SET_UP : 'Phased:profile... |
'use strict';
/**
* Adds the passed amount of months to the date and writes the new date and time into the to fields
*
* @requires moment.js
*
* @param months the number of months to add to the from date
* @param pattern the pattern to use for outputting the new date
* @param formName the name of the form to sea... |
export default class Keno {
constructor({ n, d, x, y }) {
this.n = n;
this.d = d;
this.x = x;
this.y = y;
this.r = x - y;
}
factorial(num) {
var array = [];
for (var i = 1, res = 1; i < num; array[i - 1] = i, res *= ++i);
return res;
... |
export default {
label: 'Universe',
id: 'universe',
list: [
{
id: 'reading',
type: 'passage',
label: 'Universe - Notes',
data: {
title: 'Universe',
text: `The Universe is a vast expansion of space. The Universe consists of billions of galaxies, stars, planets, dwarf pla... |
/**
* https://www.devbridge.com/articles/tonejs-coding-music-production-guide/
* https://tonejs.github.io/docs/13.8.25/PolySynth
* https://www.guitarland.com/MusicTheoryWithToneJS/PlayChords.html
*/
const addOctaveNumbers = (scale, octaveNumber) => scale.map(note => {
const firstOctaveNoteIndex = scale.indexO... |
const nameGirl = 'Mẹ';
const giftUrl = 'http://nodemy.vn';
const eventName = 'Chúc mẹ iu 20-10';
const titleCard = 'Tặng Mẹ';
const contentCard = 'Chúc mẹ của con 20-10 luôn trẻ đẹp và luôn vui vẻ hạnh phúc bên người thương :v';
const giftImage = 'hot-girl.png';
const base64 = '';
const giftImageBase64 = "data:image/pn... |
const mongoose = require('mongoose');
const schema = mongoose.Schema;
const schmaName = require('../constants').schemas;
const status = require('../constants').status;
const level=require('../constants/index').level;
var sportSchema = new schema({
name:{type:String},
image:{type:String},
status:{type:String,en... |
const users = require('./users')
const tickets = require('./tickets')
module.exports = {
users,
tickets
}
|
OC.L10N.register(
"lib",
{
"Unknown filetype" : "غیر معرروف قسم کی فائل",
"Invalid image" : "غلط تصویر",
"today" : "آج",
"yesterday" : "کل",
"last month" : "پچھلے مہنیے",
"last year" : "پچھلے سال",
"seconds ago" : "سیکنڈز پہلے",
"Username" : "اسم صارف",
"Password" : "پاسورڈ",... |
'use strict';
let num = 10;
function showFirstMessage(text) {
console.log(text);
//функция может перезаписывать переменные из самой функции
num = 20;
}
showFirstMessage("Hello World!");
console.log(num);
function calc(a,b) {
return (a + b);
}
console.log(calc(10, 12));
//return возвращает результ... |
"use strict";
var text = "Mensagem";
var age = 29;
var classCampoGrande = true;
var listProgram = ['PHP', 'Java', 'HTML', 'ASP.NET'];
var listNumbers = [20, 30, 40, 40, 10];
// ERROS -> tIPAGEM
//text = 20;
//age = true;
//classCampoGrande = [20,29];
// corretos
text = 'Mensagem 2';
age = 20;
listNumbers = [100, 200, ... |
'use strict';
import mongoose from 'mongoose';
var UsersSchema = new mongoose.Schema({
firstname: String,
lastname: String,
emailid: String,
employeeid : Number,
password: String,
active: String,
usertype: String,
lastlogin: Date,
dob: Date,
bloodgroup: String,
phone: Number,
experience: Numbe... |
'use strict';
var electron = require('electron');
var app = electron.app;
var BrowserWindow = electron.BrowserWindow;
var ipc = require('electron').ipcMain;
var mainWindow = null;
app.on('ready', function() {
mainWindow = new BrowserWindow({
height: 600,
width: 800,
frame: false,
... |
import React, { useState }from "react";
import "../App.css";
function SearchBar(props) {
const [inputValue, setInputValue] = useState({
query: "",
results: {},
loading: false,
message: ""
});
const handleChange = event => {
const query = event.target.value;
setInputValue({ query, loadi... |
import React from "react"
import Link from "gatsby-link"
import Helmet from "react-helmet"
export default class Blog extends React.Component {
render() {
return (
<div>
<h1>Blog Posts</h1>
<p>Welcome to blog post 1</p>
<Link to="/">About Hassan A. Elmi</Link>
</div>
)
}
... |
Promise.delay = function(ms, value){
return new Promise((resolve, reject) => {
if(value && typeof value.then === 'function'){
value.catch(e => reject(e)).then(res => setTimeout(resolve.bind(this, res), ms));
} else setTimeout(resolve.bind(this, value), ms)
})
}
Promise.corou... |
import BlogLayout from './components/BlogLayout';
import BlogDate from './components/BlogDate';
import BlogTitle from './components/BlogTitle';
import BlogBlock from './components/BlogBlock';
const Index = () => (
<div>
<BlogLayout>
<BlogDate>04/02 — 20</BlogDate>
<BlogTitle>OniVim ... |
import {ComponentMetadata as Component, ViewMetadata as View, bootstrap} from 'angular2/angular2';
import {ProjectTree} from 'project-tree';
@Component({
selector: 'app'
})
@View({
directives: [ProjectTree],
template: `
<project-tree></project-tree>
`
})
class App {
}
bootstrap(App);
|
const fs = require('fs');
//동기예제
//const data = fs.readFileSync('file.md');
//console.log(data);
//비동기예제
fs.readFile('file.md',(err, data)=>{
if(err)throw err;
console.log(data);
}); |
/*global describe: true, expect: true, it: true, jasmine: true */
describe("jsdoc/src/handlers", function() {
var handlers = require('jsdoc/src/handlers');
var runtime = require('jsdoc/util/runtime');
var testParser = jasmine.createParser();
handlers.attachTo(testParser);
it("should exist", functi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.