This file contains hidden or 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
import streamlit as st | |
from persist import persist, load_widget_state | |
def main(): | |
if "page" not in st.session_state: | |
# Initialize session state. | |
st.session_state.update({ | |
# Default page. | |
"page": "home", |
This file contains hidden or 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
delegate dynamic RecursiveFunction(params int[] args); | |
static RecursiveFunction f (int x) | |
{ | |
int sum = x; | |
RecursiveFunction inner = null; | |
inner = n => | |
{ | |
if (n.Length > 0) | |
{ |
This file contains hidden or 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
for (int i = 0; i < 1000000000; i++) | |
{ | |
var memoryCache = new MemoryCache("sdf"); // leads to memory leak!!! | |
// WHILE THIS ONE DOES NOT | |
// var memoryStream = new MemoryStream(new byte[100000]); |