Данная пошаговая инструкция поможет освоить основы на простом примере
Для справки
Сервер поднимался на Debian 8
c характеристиками:
CPU - 1 ядро x 500 МГц
import * as models from "models"; | |
import Sequelize from "sequelize"; | |
import fs from "fs"; | |
delete models.default; | |
const sequelize = new Sequelize( | |
'', | |
'', | |
'', { |
<?php | |
// Include the SDK using the Composer autoloader | |
date_default_timezone_set('America/Los_Angeles'); | |
require 'vendor/autoload.php'; | |
$s3 = new Aws\S3\S3Client([ | |
'version' => 'latest', | |
'region' => 'us-east-1', | |
'endpoint' => 'http://localhost:9000' | |
]); |
button{ | |
position: relative; | |
overflow: hidden; | |
border: none; | |
cursor: pointer; | |
color: white; | |
padding: 15px 40px; | |
border-radius: 2px; | |
font-size: 22px; | |
box-shadow: 2px 2px 4px rgba(0, 0, 0, .4); |
/*jslint continue:true*/ | |
/** | |
* Adapted from {@link http://www.bulgaria-web-developers.com/projects/javascript/serialize/} | |
* Changes: | |
* Ensures proper URL encoding of name as well as value | |
* Preserves element order | |
* XHTML and JSLint-friendly | |
* Disallows disabled form elements and reset buttons as per HTML4 [successful controls]{@link http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2} | |
* (as used in jQuery). Note: This does not serialize <object> | |
* elements (even those without a declare attribute) or |
// [START initialize_firebase_in_sw] | |
// Give the service worker access to Firebase Messaging. | |
// Note that you can only use Firebase Messaging here, other Firebase libraries | |
// are not available in the service worker. | |
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-app.js'); | |
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-messaging.js'); | |
// Initialize the Firebase app in the service worker by passing in the | |
// messagingSenderId. | |
firebase.initializeApp({ |
function rus_to_latin ( str ) { | |
var ru = { | |
'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', | |
'е': 'e', 'ё': 'e', 'ж': 'j', 'з': 'z', 'и': 'i', | |
'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o', | |
'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u', | |
'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', 'ш': 'sh', | |
'щ': 'shch', 'ы': 'y', 'э': 'e', 'ю': 'u', 'я': 'ya' | |
}, n_str = []; |
http://qaru.site/questions/335391/angular-2-easy-way-to-make-a-confirmation-dialog | |
public closeDialog(): void { | |
this.dialogRef = this.dialog.open(ConfirmComponent, { | |
disableClose: false | |
}); | |
this.dialogRef.beforeClosed().subscribe(result => { | |
if (result) { | |
this.dialogRefHeaderClose.close(); |
position relative | |
top 50% | |
margin-top -180px | |
Выравнивание по вертикали. | |
сдивигаем на 50%, и добавляем отрицательный отструп в половину размера центрируемого объекта |