This file contains hidden or 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
\documentclass[12pt,a4paper,svgnames]{article} | |
\usepackage{amsmath} | |
\usepackage{fullpage} | |
\usepackage{amsfonts} | |
\usepackage{amssymb,amsthm} | |
\usepackage{makeidx} | |
\usepackage{graphicx} | |
\usepackage{float} | |
\usepackage{wrapfig} | |
\usepackage{algorithm} |
This file contains hidden or 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
function [ x1,x2,y1,y2 ] = FindQuad( a,b,h,k,phi ) | |
%FINDQUAD Summary of this function goes here | |
% Detailed explanation goes here | |
x = @(t) h + cos(phi)*a*cos(t) - sin(phi)*b*sin(t); | |
y = @(t) k + sin(phi)*a*cos(t) + cos(phi)*b*sin(t); | |
t = 0:0.05:2*pi; | |
subplot(3,1,1); | |
plot(x(t),y(t)) | |
axis equal | |
This file contains hidden or 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
def gi(n,i): | |
return n&(1<<i) | |
def b(n): | |
l = [] | |
for k in filter(lambda n: n%5 < 4, range(19)): | |
if gi(n,k) and not gi(n,k+1) and not gi(n,k+5): | |
l.append(k) | |
return l |
This file contains hidden or 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
type var = string;; | |
type ar = Int of int | Var of var | Add of ar * ar;; | |
type bl = True | False | And of bl * bl | Or of bl * bl | Eq of ar * ar | Le of ar * ar;; | |
type com = Skip | Assgn of var * ar | Seq of com * com | If of bl * com * com | While of bl * com | Break;; | |
(* representation for stores *) | |
module Store = Map.Make(struct | |
type t = var | |
let compare = Pervasives.compare | |
end) |
This file contains hidden or 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
open Ast | |
exception TypeError | |
exception UnificationError | |
(* ---------- EQUALITY ---------- *) | |
(* [typ_eq t1 t2] returns [true] iff [t1] and [t2] are equal *) | |
let rec typ_eq (t1:typ) (t2:typ) : bool = | |
match t1,t2 with |
This file contains hidden or 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
def pthing(title,ext,n): | |
overlay = ''' | |
<GroundOverlay> | |
<name>res</name> | |
<TimeSpan> | |
<begin>%s</begin> | |
<end>%s</end> | |
</TimeSpan> | |
<Icon> |
This file contains hidden or 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
function swinger(x0,y0,m1,m2,l1,l2) | |
% SWINGER Classic double pendulum. | |
% SWINGER(x,y) starts the pendulum at the given initial position. | |
% The initial position can reset with the mouse. | |
% | |
% SWINGER with no arguments starts at (x,y) = (0.862,-0.994). | |
% What is interesting about the resulting orbit? | |
% | |
% SWINGER(0,2) starts in an unstable vertical position. | |
% How long does it stay there and what causes it to move? |
This file contains hidden or 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
#include <windows.h> | |
#include <stdio.h> | |
//68 BE BA FE CA | |
const unsigned char OP_PUSH = 0x68; | |
const unsigned char OP_JMP = 0xE9; | |
static DWORD rets[10000]; | |
static PDWORD r = NULL; | |
struct patchwork{ |
This file contains hidden or 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
open Ast | |
(* lexp_of_aexp: convert an aexp into an lexp *) | |
let rec lexp_of_aexp (a:aexp) : lexp = | |
match a with | |
| Int n -> | |
LInt n | |
| Var x -> | |
LPVar x | |
| Plus(a1,a2) -> |
This file contains hidden or 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
<html> | |
<head> | |
<title>Scrolling Cards</title> | |
<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script> | |
<script type="text/javascript"> | |
jQuery.fn.center = function () { | |
this.css("position","absolute"); | |
this.css("bottom", "1px");// Math.max(0, (($(window).height() - this.outerHeight()) / 2) + | |
// $(window).scrollTop()) + "px"); | |
this.css("left", Math.max(0, (($(window).width() - this.outerWidth()) / 2) + |