Skip to content

Instantly share code, notes, and snippets.

View mattfeury's full-sized avatar

Matt Feury mattfeury

View GitHub Profile
@mattfeury
mattfeury / Book.groovy
Last active December 22, 2015 21:09
Test case for inherited namedQuery bug in Grails
package org.example
class Book {
String author
static namedQueries = {
withAuthor { author ->
eq 'author', author
}
}
@mattfeury
mattfeury / AccountInfo.groovy
Created September 11, 2013 21:10
NamedQueries with countDistinct projections do not function in TEST mode (tested on Grails 2.1.1, 2.2.4)
package org.example
class AccountInfo {
Integer type
String accountId
static mapping = {
version false
}
@mattfeury
mattfeury / jQueryTransparencyIssue.js
Created August 8, 2012 21:27
Show how jQuery caches data attributes on access
function getBooyan() {
return $('body').data('booyan')
}
$(function() {
// Set a data attribute on an element. This can be done in the html as well, but is simplified in js for this example.
// e.g. <body data-booyan="magic">...</body>
$('body').attr('data-booyan', 'magic');
// Retrieve as data
var booyan = getBooyan(); // booyan == 'magic'
package as.adamsmith.etherealdialpad.dsp;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
public class Dac extends UGen {
private final float[] localBuffer;
private boolean isClean;