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
% | |
% MAMA package (MAth MAcros) | |
% a semantic package for mathematical symbols and fast latexing | |
% | |
% by Matteo Capucci <matteo.capucci@gmail.com> | |
% | |
% comment on an equation | |
\newcommand{\comment}[1]{\qquad\text{#1}} |
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
name: exam simulation | |
source code: | | |
input: 'aaaabb' | |
blank: ' ' | |
start state: q0 | |
table: | |
q0: | |
'a' : {write: 'b', R: q1} | |
'b' : {R: rej} | |
' ' : {R: rej} |
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
\newcommand{\lax}{\mathrm{lx}} | |
\newcommand{\oplax}{\mathrm{ox}} | |
\newcommand{\pseudo}{\mathrm{ps}} | |
\newcommand{\strong}{\mathrm{st}} | |
\newcommand{\costrong}{\mathrm{ct}} | |
\newcommand{\bistrong}{\mathrm{bt}} | |
\newcommand{\lMod}[1]{{#1}\textsf{-}\Mod} | |
\newcommand{\laxMod}[1]{{#1}\textsf{-}\lax\Mod} | |
\newcommand{\oplaxMod}[1]{{#1}\textsf{-}\oplax\Mod} |
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
\newcommand{\E}{\mathcal{E}} | |
\newcommand{\utilities}{\mathsf{util}} | |
\newcommand{\coutilities}{\mathsf{coutil}} | |
\newcommand{\play}{\mathsf{play}} | |
\newcommand{\coplay}{\mathsf{coplay}} | |
\newcommand{\update}{\mathsf{update}} | |
\newcommand{\strategies}{\mathsf{strat}} | |
\newcommand{\moves}{\mathsf{moves}} |
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
# Proof of equivalence for two definitions of sum | |
\begin{code} | |
module equiv_of_sums where | |
import Relation.Binary.PropositionalEquality as Eq | |
open Eq using (_≡_; refl; cong; sym) | |
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _≡⟨_⟩_; _∎) | |
data ℕ : Set where |
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
// alias type to new_name | |
typedef type new_name; | |
// declare an array | |
int vector[SIZE]; | |
// declare an array, size undetermined | |
int vector[] = { 3, 4 }; | |
void read_str( char s[] ); | |
// main signature |
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
export default class Library extends React.Component { | |
static getFragment() { | |
return Lokka.getFragment(` | |
fragment on Library { | |
name | |
} | |
`); | |
} | |
render() { |
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
import Library from '../components/library'; | |
export default class App extends React.Component { | |
static async getInitialProps() { | |
return await Lokka.query(`{ | |
libraries { | |
id, | |
...${Library.getFragment()} | |
} | |
}`); |
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
import { Lokka } from 'lokka'; | |
import { Transport } from 'lokka-transport-http'; | |
import { SERVER_URL } from '../config'; | |
/* singleton Lokka client */ | |
export default new Lokka({ | |
transport: new Transport(`${SERVER_URL}/graphql`) | |
}); |
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
Show hidden characters
{ | |
"presets": [ | |
"next/babel" | |
] | |
} |
NewerOlder