Install the OpenSSL on Debian based systems
sudo apt-get install openssl| #nullable enable | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| public class BinarySearchTree : IEnumerable<int> | |
| { | |
| public BinarySearchTree(int value) => Value = value; | |
| public BinarySearchTree(IEnumerable<int> values) |
| use std::cell::{Ref, RefCell}; | |
| pub struct BinaryTree<T> where T: Clone + PartialEq + PartialOrd { | |
| data: T, | |
| left: RefCell<Option<Box<BinaryTree<T>>>>, | |
| right: RefCell<Option<Box<BinaryTree<T>>>>, | |
| } | |
| impl<T> BinaryTree<T> where T: Clone + PartialEq + PartialOrd { | |
| pub fn new(root: T) -> Self { |
| const std = @import("std"); | |
| const c = @cImport({ | |
| @cInclude("stdlib.h"); | |
| @cInclude("stdio.h"); | |
| @cInclude("png.h"); | |
| }); | |
| const WIDTH = 800; | |
| const HEIGHT = 600; |
| import csv | |
| with open('input.txt', 'r', encoding='iso-8859-1') as csvfile: | |
| reader = csv.reader(csvfile, delimiter=' ') | |
| with open('output.txt', 'w', newline='', encoding='iso-8859-1') as outfile: | |
| writer = csv.writer(outfile, delimiter=' ') | |
| writer.writerow(next(reader)) | |
| for row in reader: | |
| # 1000, 5, 28, 2 | |
| if float(row[1]) > 1000 or float(row[2]) > 5 or float(row[3]) > 28 or float(row[4]) > 2: |
| open System | |
| open Npgsql.FSharp | |
| let connectionString : string = | |
| Sql.host "xxx.com" | |
| |> Sql.database "xxx" | |
| |> Sql.username "xxx" | |
| |> Sql.password "xxx" | |
| |> Sql.port 12345 | |
| |> Sql.requireSslMode |
| // See https://aka.ms/new-console-template for more information | |
| namespace ConsoleAppGameOfLife { | |
| public class GoLRule { | |
| public GoLRule() { | |
| Birth = new[] { 3 }; | |
| Stay = new[] { 2, 3 }; | |
| } | |
| public GoLRule(int[] birth, int[] stay) { |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Windows; | |
| using System.Windows.Controls; | |
| using System.Windows.Media; | |
| using System.Windows.Shapes; | |
| using System.Windows.Threading; | |
| import functools | |
| import logging | |
| import pika | |
| from pika.adapters.asyncio_connection import AsyncioConnection | |
| from pika.exchange_type import ExchangeType | |
| LOGGER = logging.getLogger('ipsum.publisher') | |
| class IpsumPublisher: |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Tue Dec 7 19:23:24 2021 | |
| @author: feder | |
| """ | |
| import numpy as np | |
| file = open('input3.txt') |