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
// My dream interaction with the Win32 API. | |
#include <iostream> | |
#include <windows.h> | |
#define WIN32_SIMPLE | |
int main (int argc, char* argv[]) | |
{ | |
SIMPLEWINDOW* wnd = CreateSimpleWindow(x, y, w, h, title, fullscreenFlag); |
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
project (dataAPI) | |
# Set Debug Mode | |
ADD_DEFINITIONS(-g) | |
find_package(Lua51 REQUIRED) | |
include_directories(${LUA_INCLUDE_DIR}) | |
set(LIBS ${LIBS} ${LUA_LIBRARIES}) |
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.Collections.Generic; | |
using Microsoft.Xna.Framework; | |
namespace PuzzleGame | |
{ | |
/// <summary> | |
/// Keyframe animation helper class. | |
/// </summary> | |
public class Animation | |
{ |
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
#! /usr/bin/runhaskell | |
module Main where | |
-- As with many programming languages, the main function is the entry point for execution. | |
main :: IO () | |
main = do -- "do notation" is a way of sequencing functions in haskell to simulate imperitive programming. | |
inp <- getContents -- Here we bind the resulting thunk from getContents to the name 'inp'. | |
putStrLn $ reverse inp -- Here we reverse the evaluated value of 'inp' and send it to stdout. |
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
string outputString = ""; | |
foreach (var e in enumList) | |
{ | |
outputString += e.ToString() + ", "; | |
} |
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
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
} | |
private void Form1_Load(object sender, EventArgs e) | |
{ | |
comboBox1.DataSource = Enum.GetValues(typeof(MyEnum)); |
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
<?php | |
header("Content-type: text/plain"); | |
foreach (apache_request_headers() as $k => $v) | |
{ | |
echo("$k: $v\n"); | |
} | |
?> |
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
#! /bin/bash | |
# Clone the repo | |
git clone https://github.com/tcsavage/pangolin.git . | |
# Ensure we're on uopcomputing | |
git checkout uopcomputing | |
# Setup config | |
cp config.sample.php config.php |
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 OverloadedStrings #-} | |
module BlazeHelpers where | |
import Text.Blaze ((!)) | |
import Text.Blaze.Html5 | |
import qualified Text.Blaze.Html5 as H | |
import Text.Blaze.Html5.Attributes | |
import qualified Text.Blaze.Html5.Attributes as A | |
import Text.Blaze.Renderer.Pretty |
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
-- | Instantiates the WebCore singleton with a set of configuration parameters. | |
initialize :: Config -> IO () | |
initialize conf | |
| conf == defaultConfig = awe_webcore_initialize_default | |
| otherwise = go conf | |
where | |
go :: Config -> IO () | |
go = do | |
-- Operating in the (->) monad. | |
a <- fmap fromBool pluginsEnabled |
OlderNewer