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
| tExp (A.IfExp{test, then', else', pos}) = | |
let | |
val test' = actual_type(tExp test, pos) | |
val tty = actual_type(tExp then', pos) | |
val ety = (case else' of | |
SOME(e) => actual_type(tExp e, pos) | |
| _ => tty) (* if there is no else, just pretend it matches with tty - hax *) | |
(* do the tty and ety match? *) |
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
(* check_duplicates robust enough; could not compare deeply *) | |
fun check_duplicates([],f) = () | |
| check_duplicates(h::l, f) = | |
if (List.exists (fn (x) => (h = x)) l) then | |
(f h ; check_duplicates(l,f)) | |
else check_duplicates(l,f) | |
(* cd2 uses an accessor g to access the record fields or tuples *) | |
fun check_duplicates2([],f,g) = () |
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
(* | |
What I hate about SML; parathensis are optional sometimes and absolutely required other times, | |
and currying is possible, so you never know what you want. | |
*) | |
| tExp(A.RecordExp {fields, typ, pos}) = | |
let | |
val typ' = (case Symbol.look(tenv, typ) of | |
SOME(t) => actual_type(t, pos) | |
| _ => (report pos (E.UndeclaredType (Symbol.name typ)) "undeclared type for record"; (E.ERROR)) |
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
package sabe; | |
import java.util.ArrayList; | |
import edu.umn.csci5801.sabe.interfaces.AccountReportIntf; | |
import sabe.calculations.HealthInsurance; | |
import sabe.calculations.UndergraduateCSECollegiateFees; | |
import sabe.calculations.UndergraduateGeneralFees; | |
import sabe.calculations.UndergraduateInternationalStudentFees; | |
import sabe.calculations.UndergraduateMedicalCollegiateFees; |
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
# configure: what is the name of the DAT you wish to switch to? | |
$strSeedFile = "Local_MAIN.dat" | |
# Do not change this. | |
$strDestinationFile = "Local.dat" | |
# switch to desired local dat. | |
cp $strSeedFile $strDestinationFile |
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 | |
require 'vendor/autoload.php'; | |
$client = new \GuzzleHttp\Client(); | |
$response = $client->get('http://digimon-adventure.net/application/nade2.php?click=20150413', [ | |
'headers' => [ |
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
package sabe; | |
import java.util.Set; | |
import edu.umn.csci5801.sabe.interfaces.UMNDatabaseIntf; | |
import edu.umn.csci5801.sabe.model.StudentRecord; | |
import edu.umn.csci5801.sabe.model.User; | |
public class Database implements UMNDatabaseIntf { | |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Guild Wars 2 Characters</title> | |
<script type="text/javascript" src="lodash.js"></script> | |
<script type="text/javascript" src="moment.js"></script> | |
<script type="text/javascript"> |
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 why I hate SML. | |
// I am told to look for an error around line 505, in the range of 493 to 506. | |
// I can do that, I have eyes! | |
// But nothing is wrong there. | |
semant.sml:505.13-505.46 Error: operator is not a function [tycon mismatch] | |
operator: E.fnvar ?.table * E.ty ?.table | |
in expression: |
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
package sabe; | |
import java.util.HashSet; | |
import java.util.Set; | |
import edu.sabe.interfaces.ReportItemIntf; | |
public class ItemSet { | |
Set<Item> set; |