Some notes on React Server Components (specifically the streaming wire format), Next.js v13+ (specifically __next_f
), and Webpack.
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
var socket = null; | |
function bootstrap() { | |
// 適当な図形を描画 | |
var c = document.getElementById('mycanvas'); | |
var ctx = c.getContext('2d'); | |
ctx.globalalpha = 0.3; | |
for(var i=0; i<1000; i++) { | |
ctx.beginPath(); |
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
var page = new WebPage(), | |
address, output, size; | |
if (phantom.args.length != 2) { | |
console.log('Give me URL and filename'); | |
phantom.exit(); | |
} else { | |
address = phantom.args[0]; | |
output = phantom.args[1]; | |
page.viewportSize = { width: 1024, height: 768 }; |
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
<?php | |
function json_response($code = 200, $message = null) | |
{ | |
// clear the old headers | |
header_remove(); | |
// set the actual code | |
http_response_code($code); | |
// set the header to make sure cache is forced | |
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900"); |
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
# https://www.quantopian.com/posts/technical-analysis-indicators-without-talib-code | |
import numpy | |
import pandas as pd | |
import math as m | |
#Moving Average | |
def MA(df, n): | |
MA = pd.Series(pd.rolling_mean(df['Close'], n), name = 'MA_' + str(n)) | |
df = df.join(MA) |
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
<p>To send command into some widget we use PostMessage (https://developer.mozilla.org/ru/docs/Web/API/Window/postMessage)<br> | |
Way to find required <iframe> is option "id" passed for initialization</p> | |
<p>Javascript and further HTML is Exapmle</p> | |
<p>NOTE: We use this tricky way because we need to handle all widgets the same. Both initialized with tv.js (https://www.tradingview.com/widget/advanced-chart/) and initialized self-replaced script (https://www.tradingview.com/widget/technical-analysis/)</p> | |
<!-- Example start --> | |
<!-- Advanced chart widget initialization --> | |
<div id="advanced-chart-widget-container"></div> | |
<script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script> |