This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var monthNames = ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь']; | |
/** | |
* количество дней в месяце | |
* @param date | |
* @returns {number} | |
*/ | |
var getMonthCountDays = function (date) { | |
var here = new Date(date.getTime()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
__name: 'name', | |
name: 'car2', | |
type: 'base', | |
ready: true, | |
flow: { | |
0: [[-100, 537, -39]], | |
10: [ | |
[0, 537, -39], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function (require) { | |
//DOCS: http://javascript.tutorialhorizon.com/2014/09/13/execution-sequence-of-a-react-components-lifecycle-methods/ | |
var React = require('react'); | |
var EventsListener = require('extensions/events-listener'); | |
var Preloader = require('jsx!componentsCommon/PreloaderIndicator--React/PreloaderIndicator'); | |
var Styles = require('text!componentsPages/Example/Example.css'); | |
var BaseComponent = require('jsx!core/ComponentReact'); | |
return BaseComponent.createClass({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Сделает вложенный объект | |
* in: [a,b,c,d] | |
* value out:{a:{b:{c:{d:value}}}} | |
* !value out:{a:{b:{c:{d:{}}}}} | |
* @param arr | |
* @returns {{}} | |
*/ | |
makeEmbeddedObject:function(arr, value){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function webpackUniversalModuleDefinition(root, factory) { | |
if(typeof exports === 'object' && typeof module === 'object') | |
module.exports = factory(require("react")); | |
else if(typeof define === 'function' && define.amd) | |
define(["react"], factory); | |
else if(typeof exports === 'object') | |
exports["ReactDraggable"] = factory(require("react")); | |
else | |
root["ReactDraggable"] = factory(root["react"]); | |
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
#1 slice | |
что будет в console.log | |
--> | |
<script> | |
var arr3 = [1,2,3,4]; | |
console.log('arr3', arr3); | |
var a3 = arr3.slice(1); | |
console.log('a3', a3); | |
console.log('arr3', arr3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MegaOffice { | |
public $page; | |
protected $dirParts = './parts/'; | |
protected $dirPages = './pages/'; | |
function __construct(){ | |
$this->page = ($_GET['page'])? $_GET['page'] : 'index'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var itemIdFieldName = 'id'; // поле в котором хранится id одного элемента | |
var numberGroupPrefix = '_'; // разделитель для числовых групп | |
var maxNumberGroupItemsLength = 3; // максимальное количество уникальных элементов в числовой группе | |
// создает числовую группу по значениям | |
var createGroupByValue = function(start, end, index, type){ | |
if(!index[start + numberGroupPrefix + end]){ | |
index[start + numberGroupPrefix + end] = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
autoprefixer: { | |
target: { | |
files: [{ | |
expand: true, | |
cwd: '../5tourists/web/frontend/css', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// url: /premer-otel/standart-premium-3/booking/2015-07-16/2015-07-25/5.... | |
// url: /premer-otel/nomera/standart-64/#booking.... | |
// transfer to : /premer-otel/nomera/standart-premium-3/ | |
getRoomUrl:function(str){ | |
var options = _.compact(str.split('/')); | |
return (options.indexOf('nomera') >= 0) | |
? str.substr(0, str.indexOf(options[options.indexOf('nomera') + 2])) | |
: options.slice(0, 2).join('/nomera/'); |