Skip to content

Instantly share code, notes, and snippets.

#include<iostream>
#include<cmath>
using namespace std;
// Codice che definisce nel main un array, prende gli elementi di input, e
// chiama una funzione media esterna. Nota che media prende un puntatore ad
// intero (che e' il primo elemento dell'array), e la lunghezza.
double media(int * m, int l)
// Oscilloscope
// Input defined by ANALOG_IN
// SIG_OUT true puts a 2kHz wave on DIGITAL_OUT for testing.

#define ANALOG_IN 0
#define DIGITAL_OUT 13
bool SIG_OUT = true;

void setup() {
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
module Data.HyperRelation.Internal.Question1 where
import Data.Functor.Identity
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Lens
import Control.Monad.State.Lazy (State (..), get, runState)
---------------------------------------------------- Data Types
type Message = String
data Product = Product { _name :: String
, _price :: Int
-- * Preamble
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
-- * Preamble
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
#!/bin/bash
mkdir music
cd music
git clone https://github.com/music-suite/abcnotation
git clone https://github.com/music-suite/lilypond
git clone https://github.com/music-suite/music-articulation
git clone https://github.com/music-suite/music-dynamics
git clone https://github.com/music-suite/music-dynamics-literal
#!/usr/bin/emacs --script
;read stdin into a temp buffer
;go into org-mode
;output the buffer as a string and pipe to stdout
(with-temp-buffer
(progn
(let (line)
(while (setq line (ignore-errors (read-from-minibuffer "")))
(insert line "\n")))
#!/usr/bin/emacs --script
;read stdin into a temp buffer
;go into org-mode
;output the buffer as a string and pipe to stdout
(with-temp-buffer
(progn
(condition-case nil
(let (line)
(while (setq line (read-from-minibuffer ""))
(insert line)