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
=== Сравнение массивов ============================================================== | |
let mas1 = ["some1", "some2", "some3", "some4"], | |
mas2 = ["some1", "some5", "some3"]; | |
Array.prototype.diff = Array.prototype.diff || function(a2) { | |
return this.filter(i => a2.indexOf(i) < 0); | |
}; | |
console.log(mas1.diff(mas2)); |
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'; | |
// including plugins | |
var gulp = require('gulp'), | |
concat = require("gulp-concat"), | |
minifyCss = require("gulp-minify-css"), | |
uglify = require("gulp-uglify"), | |
watch = require('gulp-watch'), | |
sass = require('gulp-sass'), | |
autoprefixer = require('gulp-autoprefixer'); |
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
// Example object | |
Cars = new Mongo.Collection('cars'); | |
Cars.attachSchema(new SimpleSchema({ | |
make: { | |
type: String, | |
label: "Make", | |
max: 20, | |
}, | |
model: { |
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 this construction | |
{{ " | |
... Handlebars here ... | |
" }} | |
<script id="saleTemplate" type="text/x-handlebars-template"> |
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
moment(dateStart, "DD.MM.YYYY").format('YYYY.MM.DD') |
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
lclDBName="value" | |
lclDBUser="value" | |
lclDBPass="value" | |
RemoteDBName="value" | |
RemoteDBUser="value" | |
RemoteDBPass="value" | |
RemoteHost="localhost" | |
lclHost="localhost" |
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
<div style="text-align: center"> | |
<?php | |
// 45934290 - ID группы | |
$d = file_get_contents("https://api.vk.com/method/groups.getMembers?group_id=45934290&v=5.16&offset=0&count=1000&fields=photo_50"); | |
$us= json_decode($d,true); | |
foreach($us['response']['items'] as $u){ | |
echo sprintf('<img src="%s"/>',$u['photo_50']); |
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
jQuery.noConflict(); | |
(function ($) { | |
$(document).ready(function () { | |
// Code here | |
}); | |
})(jQuery); |
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
.fll, .fl { float: left; } | |
.flr, .fr { float: right; } | |
.mr0 { margin-right: 0px; } | |
.mr5 { margin-right: 5px; } | |
.mr10 { margin-right: 10px; } | |
.mr15 { margin-right: 15px; } | |
.mr20 { margin-right: 20px; } | |
.mr25 { margin-right: 25px; } | |
.mr30 { margin-right: 30px; } |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<ul> |