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')
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ | |
// © tradingcube | |
//@version=5 | |
indicator(title='TradingCube : Moving Average : Data table', shorttitle='Moving Average : Data table', overlay=true, precision=1) | |
htf_tf = input.string('Auto', 'Table Timeframe', options=['Auto', '5 Min','10 Min', '15 Min', '1 Hour', '4 Hour', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Yearly']) | |
htf = htf_tf == '5 Min' ? '5' : htf_tf == '10 Min' ? '10' : htf_tf == '15 Min' ? '15' : htf_tf == '1 Hour' ? '60' : htf_tf == '4 Hour' ? '240' : htf_tf == 'Daily' ? 'D' : htf_tf == 'Weekly' ? 'W' : htf_tf == 'Monthly' ? 'M' : htf_tf == 'Quarterly' ? '3M' : htf_tf == 'Yearly' ? '12M' : | |
timeframe.isintraday and (timeframe.period == '1' or timeframe.period == '3' or timeframe.period == '5' or timeframe.period == '15') ? 'D' : | |
timeframe.isintraday and (timeframe.period == '30' or timeframe.period == '45' or timeframe.period == '60' or timeframe.period == |
# !pip install python-docx Pillow | |
import os | |
from docx import Document | |
from docx.shared import Inches | |
from docx.enum.text import WD_ALIGN_PARAGRAPH | |
from PIL import Image | |
def build_document(images_folder_path, output_path, columns, rows, add_text): | |
# List all files in the folder |
#!/bin/bash | |
# download and install latest geckodriver for linux or mac. | |
# required for selenium to drive a firefox browser. | |
install_dir="/usr/local/bin" | |
json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest) | |
if [[ $(uname) == "Darwin" ]]; then | |
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))') | |
elif [[ $(uname) == "Linux" ]]; then | |
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))') |
class Foo { | |
constructor(x) { this.foo = x; } | |
hello() { console.log(this.foo); } | |
} | |
class Bar extends Foo { | |
constructor(x) { super(x); this.bar = x * 100; } | |
world() { console.log(this.bar); } | |
} |
import findspark | |
findspark.init() | |
from pyspark.sql import SparkSession | |
# Connect to Remote Spark Deployment | |
# spark = SparkSession \ | |
# .builder.master('spark://master-node:7077') \ | |
# .appName("read-csv") \ | |
# .getOrCreate() |
const { watch, dest, series, parallel } = require('gulp'); | |
const sourcemaps = require('gulp-sourcemaps'); | |
const terser = require('gulp-terser-js'); | |
const browserify = require('browserify'); | |
const watchify = require('watchify'); | |
const babelify = require('babelify'); | |
const source = require('vinyl-source-stream'); | |
const buffer = require('vinyl-buffer'); | |
function Task() { |
#Nginx Ghost Config | |
server { | |
listen 80; | |
server_name somedomain.com; | |
rewrite ^(.*) https://$host$1 permanent; | |
} | |
# the secure nginx server instance | |
server { | |
listen 443 ssl; |
rabbitmqctl add_user username password | |
rabbitmqctl set_user_tags username administrator | |
rabbitmqctl set_permissions -p / username ".*" ".*" ".*" |
/* | |
* MIT License | |
* | |
* Copyright (c) 2017-2018 Bannerets <save14@protonmail.com> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |