Skip to content

Instantly share code, notes, and snippets.

@unreal79
unreal79 / README.md_displayed_in_About_window.pas
Last active October 9, 2020 12:00
Include file README.md into About window (Delphi) -- README.md will be compiled inside .exe file and displayed on About window
uses
ActiveX, MSHTML, SHDocVw, MarkdownCommonMark, MarkdownProcessor; // uses https://github.com/grahamegrieve/delphi-markdown
procedure TForm1.Button1Click(Sender: TObject);
var
ResStream: TResourceStream;
StringStream: TStringStream;
FormAbout: TForm;
WebBrowser1: TWebBrowser;
commonmark : TMarkdownProcessor;
@unreal79
unreal79 / Finviz portfolios backtester.ipynb
Last active February 7, 2021 02:05
The backtester calculates Finviz portfolio's performance, compares it to SnP500 and plots graph
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@unreal79
unreal79 / string-conversion.rs
Created April 24, 2022 20:00 — forked from jimmychu0807/string-conversion.rs
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte