The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
function RemoveAccents(strAccents) { | |
var strAccents = strAccents.split(''); | |
var strAccentsOut = new Array(); | |
var strAccentsLen = strAccents.length; | |
var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž'; | |
var accentsOut = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz"; | |
for (var y = 0; y < strAccentsLen; y++) { | |
if (accents.indexOf(strAccents[y]) != -1) { | |
strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1); | |
} else |
//App build.gradle | |
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin' | |
android { | |
compileSdkVersion 27 |
<?php | |
/* | |
* Converts CSV to JSON | |
* Example uses Google Spreadsheet CSV feed | |
* csvToArray function I think I found on php.net | |
*/ | |
header('Content-type: application/json'); | |
// Set your CSV feed |
<?php | |
//https://github.com/laravel/framework/issues/2093#issuecomment-39154456 | |
use Illuminate\Database\Eloquent\Model as Eloquent; | |
use Illuminate\Database\Eloquent\Relations\Pivot; | |
class User extends Eloquent { | |
public function groups() { | |
return $this->belongsToMany('Group'); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 | |
(http://www.wtfpl.net/about/) | |
Copyright (C) 2015 Ivan Fraixedes (https://ivan.fraixed.es) | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
Nota: primero generar las ssh keys en el servidor ssh-keygen -t rsa
y luego agregarlas a mi cuenta de bitbucket https://bitbucket.org/account/user/HFranco_/ssh-keys/
<?php namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Contracts\Routing\Middleware; | |
use Illuminate\Http\Response; | |
class CORS implements Middleware { | |
/** | |
* Handle an incoming request. |
/* euclidean GCD (feel free to use any other) */ | |
function gcd(a,b) {if(b>a) {temp = a; a = b; b = temp} while(b!=0) {m=a%b; a=b; b=m;} return a;} | |
/* ratio is to get the gcd and divide each component by the gcd, then return a string with the typical colon-separated value */ | |
function ratio(x,y) {c=gcd(x,y); return ""+(x/c)+":"+(y/c)} | |
/* eg: | |
> ratio(320,240) | |
"4:3" | |
> ratio(360,240) |
/* | |
var Trait1 = { | |
method1() {} | |
}; | |
var Trait2 = { | |
method2() {} | |
}; | |
var Trait3 = mixin({ |