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
-- | Given a representation of an arithmetic expression, convert | |
-- | it into a format (involving assignments) such that every | |
-- | operand to an operator is either a variable or integer | |
-- | literal. | |
-- | | |
-- | For example: | |
-- | ``` | |
-- | x * 3 + y + a * b | |
-- | ``` | |
-- | -> |
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 Prelude | |
import Control.Alternative ((<|>)) | |
import Data.Array (filter) | |
import Data.Array.NonEmpty (head, last) | |
import Data.Either (Either(..)) | |
import Data.Int as Int | |
import Data.String (Pattern(..), split) | |
import Data.String.CodeUnits as String | |
import Data.Traversable (sum, traverse) |
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
module Main where | |
import Prelude | |
import Control.Monad.ST (ST) | |
import Control.Monad.ST as ST | |
import Control.Monad.ST.Internal (STRef) | |
import Control.Monad.ST.Internal as STRef | |
import Data.Exists (Exists, mkExists, runExists) | |
import Effect (Effect) |
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
-- In memory REST API for getting Animal information. | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE ImportQualifiedPost #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# LANGUAGE TypeOperators #-} | |
module SimpleAnimalAPI |
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
/** | |
* @file main.c | |
* | |
* @author Nathan Waltz (nathan.waltz@wsu.edu) | |
* @brief A snake game to demonstrate a covert channel. | |
* @version 0.1 | |
* @date 2022-04-05 | |
* | |
* @copyright Copyright (c) 2022 | |
* |
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
# | |
# A simple makefile for compiling three java classes | |
# | |
# define a makefile variable for the java compiler | |
# | |
JCC = javac | |
# define a makefile variable for compilation flags | |
# the -g flag compiles with debugging information |
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
# 'make depend' uses makedepend to automatically generate dependencies | |
# (dependencies are added to end of Makefile) | |
# 'make' build executable file 'mycc' | |
# 'make clean' removes all .o and executable files | |
# | |
# define the C compiler to use | |
CC = gcc | |
# define any compile-time flags |
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
# | |
# This is an example Makefile for a countwords program. This | |
# program uses both the scanner module and a counter module. | |
# Typing 'make' or 'make count' will create the executable file. | |
# | |
# define some Makefile variables for the compiler and compiler flags | |
# to use Makefile variables later in the Makefile: $() | |
# | |
# -g adds debugging information to the executable file |
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
# the compiler: gcc for C program, define as g++ for C++ | |
CC = gcc | |
# compiler flags: | |
# -g adds debugging information to the executable file | |
# -Wall turns on most, but not all, compiler warnings | |
CFLAGS = -g -Wall | |
# the build target executable: | |
TARGET = myprog |
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
# build an executable named myprog from myprog.c | |
all: myprog.c | |
gcc -g -Wall -o myprog myprog.c | |
clean: | |
$(RM) myprog |
NewerOlder