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
| grammar CFrunt; | |
| options { | |
| backtrack=true; | |
| memoize=true; | |
| } | |
| @header { | |
| package org.foo.bar; | |
| } |
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
| <cfscript> | |
| /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| * | |
| * CF9/ColdDoc script for generating static html MXUnit api docs. | |
| * ColdDoc is by Mark Mandel and is included in this MXUnit distribtion. | |
| * | |
| *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ | |
| import mxunit.framework.Assert; |
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
| <cfcomponent extends="mxunit.framework.TestCase"> | |
| <cfscript> | |
| /** | |
| * Assume cut has two methods: calculate() and getDataFromDatabase(). | |
| * getDataFromDatabase() goes to a Db, which we want to control, and | |
| * calculate() calls getDataFromDatabase(). We want to stub only getDataFromDatabase(). | |
| * | |
| * This "partial" mocking allows one to run tests on a component and mock specific methods | |
| * in that component. | |
| */ |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <projectDescription> | |
| <name>adam-c-gists</name> | |
| <comment></comment> | |
| <projects> | |
| </projects> | |
| <buildSpec> | |
| </buildSpec> | |
| <natures> | |
| <nature>org.cfeclipse.cfml.CFENature</nature> |
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
| /* | |
| * | |
| * This is a great muffin recipe, from "Are You Hungry Tonight, Elvis' Favorite Recipes" | |
| * | |
| * */ | |
| (function(){ | |
| var programmer = new Programmer(); | |
| var dry_ingredients = {}; | |
| var wet_ingredient = {}; |
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
| package edu.gmu.mut4j; | |
| import static edu.gmu.mut4j.Mut4JAssertions.*; | |
| import java.util.HashMap; | |
| import org.junit.Test; | |
| public class ExampleDBMutationTest { | |
| @Test |
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
| /** | |
| Prints some meta data about PreparedStatement parameters | |
| */ | |
| import java.io.InputStream; | |
| import java.io.Reader; | |
| import java.math.BigDecimal; | |
| import java.net.URL; | |
| import java.sql.Array; | |
| import java.sql.Blob; |
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
| ; TextPad syntax definitions for Hadoop Pig | |
| C=1 | |
| [Syntax] | |
| Namespace1 = 6 | |
| IgnoreCase = No | |
| KeyWordLength = | |
| BracketChars = {[()]} | |
| OperatorChars = -+*/<>!~%^&|=?: |
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
| <cfcomponent> | |
| <cfscript> | |
| //Hmmm .... how can we flatten without using state? | |
| {buffer = [];} | |
| function flatten(a){ | |
| var dup = []; | |
| buf = []; | |
| _flatten(a); | |
| dup.addAll(buffer); |
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
| import org.apache.commons.mail.* | |
| mail_server = 'mail.server' | |
| def send_mail = { cnt,sender,recipient,headers -> | |
| println 'sending mail ' + cnt | |
| email = new SimpleEmail(); | |
| email.setHostName mail_server | |
| email.addTo recipient, 'to_' + cnt |