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')
/* | |
* Example of `adapter' design pattern | |
* Copyright (C) 2011 Radek Pazdera | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* This program is distributed in the hope that it will be useful, |
<!DOCTYPE html> | |
<head> | |
<script> | |
var db; | |
// until we won't need this prefix mess | |
var indexedDB = window.indexedDB || window.webkitIndexedDB | |
|| window.mozIndexedDB || window.msIndexedDB; | |
var IDBTransaction = window.IDBTransaction || | |
window.webkitIDBTransaction; |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
#include <math.h> | |
#include <complex> | |
#include <ctime> | |
#include <stdio.h> | |
#include <cstdlib> | |
#include <random> | |
struct result | |
{ | |
double snr[20]; | |
double ber[20]; |
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
echo "Usage: MediaPlayer2-cmd { PlayPause | Next | Previous | Stop | ... }" | |
exit 1 | |
fi | |
tried_starting_something=false |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
''' | |
620031587 | |
Net-Centric Computing Assignment | |
Part A - RSA Encryption | |
''' | |
import random | |
''' |