This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@version=3 | |
study("Multi SMA", overlay=true) | |
sma1 = input(title="SMA 1", type=integer, defval=5) | |
sma2 = input(title="SMA 2", type=integer, defval=10) | |
sma3 = input(title="SMA 3", type=integer, defval=50) | |
sma4 = input(title="SMA 4", type=integer, defval=200) | |
SMA1 = sma(close, sma1) | |
SMA2 = sma(close, sma2) | |
SMA3 = sma(close, sma3) | |
SMA4 = sma(close, sma4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<style> | |
html, body { | |
width: 100%; | |
height: 100%; | |
overflow: hidden; | |
background-color: #ffffff; | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sharpen(ctx, w, h, mix) { | |
var x, sx, sy, r, g, b, a, dstOff, srcOff, wt, cx, cy, scy, scx, | |
weights = [0, -1, 0, -1, 5, -1, 0, -1, 0], | |
katet = Math.round(Math.sqrt(weights.length)), | |
half = (katet * 0.5) | 0, | |
dstData = ctx.createImageData(w, h), | |
dstBuff = dstData.data, | |
srcBuff = ctx.getImageData(0, 0, w, h).data, | |
y = h; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simple JavaScript Inheritance for ES 5.1 | |
* based on http://ejohn.org/blog/simple-javascript-inheritance/ | |
* (inspired by base2 and Prototype) | |
* MIT Licensed. | |
*/ | |
(function() { | |
"use strict"; | |
var fnTest = /\b_super\b/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function md5(str) { | |
var i, j, | |
bytes = [], | |
words = [], | |
hex = []; | |
var Y = [7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21]; | |
var Z = [0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, | |
0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps -eo size,pmem,pid,user,comm | sort -rn | head -10 | awk '{ hr[1024**2]="GB"; hr[1024]="MB"; for (x=1024**3; x>=1024; x/=1024) { if ($1>=x) { printf ("%6.2f %s ", $1/x, hr[x]); break } } } { printf ("%5s%% %-8s %-10s ", $2, $3, $4) } { for ( x=5 ; x<=NF ; x++ ) { printf ("%s ",$x) } print (" ") }' |