The infinite series formula for calculating π is the following, according to Leibniz:
π/4 = 1/1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + 1/13 ...
/* | |
* Stock buy and sell sensor simulation | |
* | |
* Author: Julian Murillo | |
* Date: May 2022 | |
* | |
* simul(File, Format, What, StockPrice, InvestmentHorizon, LC, TotC): simulation predicate | |
* | |
* File = 'console' or a filename (suffix '.csv' or '.txt' is added if none present) | |
* Format = 'txt' or 'csv' (format of the output) |
/** Functional If Then Else **/ | |
const condition = ({ If, Then, Else }) => If ? Then : Else | |
condition({ | |
If: true, | |
Then: () => { | |
console.log(`That is true`) | |
}, | |
Else: () => { | |
console.log(`That is NOT true`) |
<video class="azuremediaplayer amp-default-skin" preload="auto" type="video/mp4" data-setup='{ "techOrder": ["azureHtml5JS", "flashSS", "html5FairPlayHLS","silverlightSS", "html5"], "hotKeys": { "enableVolumeScroll": false }, "logo": { "enabled": false }, "nativeControlsForTouch": false, "autoplay": true}' playsinline controls autoplay> | |
<source src="https://thevideo.streaming.media.azure.net/dbaa79ad688e-bce3-43b8-bce3-dbaa79ad688e/the-video.ism/manifest" type="application/vnd.ms-sstr+xml"/> | |
<p class="amp-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video</p> | |
</video> | |
<script src= "//amp.azure.net/libs/amp/latest/azuremediaplayer.min.js"></script> |
docker pull ubuntu | |
docker run -ti --entrypoint /bin/sh ubuntu |
docker pull postgres | |
docker run -p 5432:5432 --name some-postgres -e POSTGRES_PASSWORD=postgres -d postgres |
/*! | |
* Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker) | |
* | |
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) | |
*/ | |
(function(factory){ | |
if (typeof define === 'function' && define.amd) { | |
define(['jquery'], factory); | |
} else if (typeof exports === 'object') { |
import http.server | |
import socketserver | |
import sys | |
class Server: | |
""" | |
Server class to serve simple html objects. | |
""" | |
DEFAULT_PORT = 8000 | |
<body> | |
<canvas id="can" width="1200" height="600"> | |
</canvas> | |
<script> | |
ctx = can.getContext("2d"); | |
size = 2; | |
space = 1; | |
lines = 1000; |
<body> | |
<canvas id="can" style="height:100%; width: 100%;" | |
style="border:1px solid #c3c3c3;"> | |
</canvas> | |
<script> | |
var canvas = document.getElementById("can"); | |
var ctx = canvas.getContext("2d"); | |
num = 0; | |
colornum = 0; |