All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- engage
| // uncomment if you are transpiling with Babel + Webpack | |
| // const { window, document } = global; | |
| /** | |
| * Lightweight script to detect whether the browser is running in Private mode. | |
| * @returns {Promise} | |
| * | |
| * Live demo: | |
| * @see http://live.datatables.net/piduzelo/1 | |
| * | |
| * This snippet uses ES2015 syntax. If you want to run it in old browsers, transpile it with Babel: |
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
This article describes an implementation of multi-tenancy using Yii and MySQL. “Multi-tenancy” is but one (yet crucial) aspect of SaaS applications; refer to the IBM document Convert your web application to a multi-tenant SaaS solution for more information on what else makes a webapp a SaaS application.
Moreover, there are three main architectures for multi-tenant databases: separate database, separate schemas and a single database. Refer to the Microsoft document Multi-Tenant Data Architecture for more information.
As MySQL doesn’t have schemas (at least the same way MS SQL Server and Oracle do) the only choices are a separate database for each tenant and single database with “commingled” tenant data. SaaS applications with a relatively small number of tenants can be easily managed with a database for each one, but for large numbers of tenants its
| // Stylus | |
| fullhd() | |
| @media all and (min-width 1480px) | |
| {block} | |
| widescreen() | |
| @media all and (min-width 1280px) and (max-width 1479px) | |
| {block} |
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| //CSS | |
| <?php | |
| /** | |
| * simple method to encrypt or decrypt a plain text string | |
| * initialization vector(IV) has to be the same when encrypting and decrypting | |
| * | |
| * @param string $action: can be 'encrypt' or 'decrypt' | |
| * @param string $string: string to encrypt or decrypt | |
| * | |
| * @return string | |
| */ |
| require('isomorphic-fetch'); | |
| fetch('https://1jzxrj179.lp.gql.zone/graphql', { | |
| method: 'POST', | |
| headers: { 'Content-Type': 'application/json' }, | |
| body: JSON.stringify({ query: '{ posts { title } }' }), | |
| }) | |
| .then(res => res.json()) | |
| .then(res => console.log(res.data)); |
| // Resuelve correctamente Promise.all y devuelve un arreglo de informes | |
| Promise.all(request_promises.map(request => request | |
| .then(r => ({ success: true, request: r })) | |
| .catch(err => ({ success:false, error: err }) | |
| )) |
| const fetch = require('node-fetch') | |
| /********************************************************************************** | |
| OPCION TRADICIONAL | |
| **********************************************************************************/ | |
| function getNombre(username){ | |
| const url = `https://api.github.com/users/${username}` | |
| fetch(url) | |
| .then( res => res.json() ) | |
| .then( json => { console.log(json.name) }) |
| import pluginify from 'pluginify'; | |
| class Plugin { | |
| constructor() { | |
| /* ... */ | |
| } | |
| } | |
| /* | |
| Convert plugin class into a jQuery plugin |