Skip to content

Instantly share code, notes, and snippets.

View recardona's full-sized avatar

Rogelio E. Cardona-Rivera recardona

View GitHub Profile
@recardona
recardona / trapmpi.c
Created December 12, 2012 19:20
Illustrates the basic MPI commands that can be used (executes parallel numerical integration by partitioning the summation using the Trapezoidal Rule).
/* program trapmpi.c */
#include <stdio.h>
/* Includes the mpi C library. */
#include "mpi.h"
/* Every processor gets values for a,b and n. */
main(int argc, char* argv[]) {
int my_rank;
int p;
@recardona
recardona / OrderedMutableDictionary.h
Last active December 15, 2015 14:09
The motivating problem was the straightforward maintenance of a High Scores table for an arcade-style game, which has names of players (keys), and scores (values). This sort of table is also typically displayed in ascending order of values. And thus, OrderedMutableDictionary was born.
#import <Foundation/Foundation.h>
// An OrderedMutableDictionary maps keys/values through the use of
// NSMutableArrays. The main benefit of this is that you can iterate
// the dictionary in the order elements were added to it, as opposed
// to an alternate ordering scheme.
//
// Copyright © 2013 Rogelio E. Cardona-Rivera <[email protected]>
// This work is free. You can redistribute it and/or modify it under the
// terms of the Do What The Fuck You Want To Public License, Version 2,
@recardona
recardona / include.tex
Created December 11, 2013 05:05
My typical LaTeX Document Preamble
%----------------------------------------------------------------------------------------------
% Theorem environments.
% From: http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Theorems.html
% The following code will create theorem, lemma, proposition, corollary,
% proof, definition, example and remark environments, together with a
% control sequence \qed which produces `tombstones' for the ends of proofs.
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
@recardona
recardona / .gitignore
Created May 3, 2015 06:02
Unity .gitignore template
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
# Autogenerated VS/MD solution and project files
/*.csproj
/*.unityproj
/*.sln
/*.suo