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://github.com/libressl-portable/portable/blob/master/include/compat/sys/stat.h | |
// Dont forget place file "portable_endian.h" from https://gist.github.com/panzi/6856583 in /md5 directory | |
// This make fdupes compile, but it still dosen't work on windows (I think trouble in file API or something like) | |
// https://msdn.microsoft.com/en-us/library/14h5k7ff.aspx | |
// https://arrayfire.com/cross-compile-to-windows-from-linux/ | |
diff --git a/Makefile b/Makefile | |
index bc5ff54..1cb3925 100644 | |
--- a/Makefile |
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
-- Int : 1,2,3,.. | |
data Qwe = Non1 | Non2 deriving( Show ) | |
data As = AA Int | SS Qwe deriving( Show ) | |
----data As2 a = AAA (Just Int) | SSS (Just Qwe) | |
data As2 = AAA (Maybe Int) | SSS (Maybe Qwe) deriving( Show ) | |
----f :: Int of Qwe -> (Maybe Int or Maybe Qwe) | |
f :: As -> As2 | |
f (AA a) = AAA (Just a) |
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
f :: p -> p | |
f z = z | |
data MyT = O Int | T Char deriving(Show) | |
data MyT2 = O2 Int | T2 Char deriving(Show) | |
g :: MyT -> MyT | |
g z = z | |
-- f O 3 |
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
{-# LANGUAGE DeriveFunctor #-} | |
import Data.Functor | |
data SomeThingElse a = Some a | Thing | |
deriving (Functor, Show) | |
-- 5 <$ Just () == Just 5 | |
-- 5 <$ Some () == Some 5 |
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
using System; | |
using System.Runtime.InteropServices; //Guid | |
namespace CSharp_COMObject | |
{ | |
//using System.Runtime.InteropServices; | |
[Guid("E7C52644-7AF1-4B8B-832C-23816F4188D9")] | |
public interface CSharp_Interface | |
{ |
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.boost.org/doc/libs/1_66_0/more/getting_started/windows.html | |
//cl /EHsc /I path\to\boost_1_66_0 path\to\example.cpp | |
//g++ -I "C:\boost_1_66_0" ./main.cpp | |
//echo 1 2 3 | ./a.exe | |
//https://nuwen.net/mingw.html | |
//g++ -I "C:\MinGW\include" ./main.cpp | |
#include <boost/lambda/lambda.hpp> | |
#include <iostream> |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#define CHUNK_SIZE 4096 | |
#ifdef _WIN32 | |
#include <wchar.h> | |
#include <io.h> | |
#define WIN32_LEAN_AND_MEAN |
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
fn dna_to_rna(dna: &str) -> String { | |
// dna.chars().map(|c| match c { 'T' => 'U', _ => c } ).collect() | |
// dna.chars().map(|c| { match c { 'T' => 'U', c => c, } } ).collect() | |
dna.replace("T", "U") | |
} | |
// https://www.codewars.com/kata/reviews/5824a92c5ce9e05d7700000e/groups/5be0706b2934eb31570049b1 | |
// https://www.codewars.com/kata/reviews/5824a92c5ce9e05d7700000e/groups/5b7aba0b0da8ff76920006e4 |
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
from turtle import * | |
import random | |
k = 4 | |
def my_figure(d, z): | |
step = 100/z | |
kk = 4 | |
dd = 360/k | |
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://ru.wikipedia.org/wiki/Bogosort | |
import random | |
#random.sample(a, b) # https://docs.python.org/3.7/library/random.html#random.sample | |
def isSorted(list): | |
for i in range(len(list)-1): | |
if not(list[i] < list[i+1]): | |
return False | |
return True | |
OlderNewer