Skip to content

Instantly share code, notes, and snippets.

View arockwell's full-sized avatar

Alex Rockwell arockwell

View GitHub Profile
/*
* The idea is that all of those bean classes you are creating will extend BaseAddressBean.
* BaseAddressBean contains abstract methods of a lot the methods needed to implement the logic
* to easily update any changed HousingAddress records thanks to generics.
*
*/
// AddressBean, EmailBean, etc. would extend this
public abstract class BaseAddressBean {
public abstract boolean isUpdated(BaseAddressBean baseAddressBean, HousingAddress housingAddress);
grep -rni "Peer\.(*" * | awk '{FS=":"; print $3}' | perl -ne '($name, $method) = /([A-z]+Peer)\.(\w+)/; print "$name,$method\n";' | sort | uniq > file.txt
grep -rni "Peer\.(*" * | awk '{FS=":"; print $3}' | perl -ne '($name, $method) = /([A-z]+Peer)\.(\w+)/; print "$name,$method\n";' | sort | uniq > file
<script type="text/javascript">
function setFormAction(department) {
if (department == 'DOH') {
jQuery("#welcomeForm").attr({action: '<html:rewrite action="/housing/submitNewRequest"/>',
name: 'computerAccessForm'});
} else if (department == 'RecSports') {
jQuery("#welcomeForm").attr({action: '<html:rewrite action="/recsports/submitNewRequest"/>',
name: 'recSportsForm'});
}
}
<script>
jQuery(function() {
jQuery("#container").tabs( { remote: true });
}
</script>
<div id="#container">
<ul>
<li><html:rewrite action="application" /></li>
<li><html:rewrite action="contract" /></li>
<script>
jQuery(function() {
jQuery("#app_link").click(function() {
jQuery("#app_div").load('"<html:rewrite action="application" />');
}
jQuery("#contract_link").click(function() {
jQuery("#contract_div").load('"<html:rewrite action="contract" />');
}
jQuery("#example_link").click(function() {
jQuery("#example_div").load('"<html:rewrite action="example" />');
$('#example').bind('tabsshow', function(event, ui) {
if (ui.panel.id == "log_history") {
// show the dialog box
}
});
(function($) {
$.fn.highlightRows = function(hightlightClass) {
$(this).mouseover(function() {
$(this).toggleClass(hightlightClass);
});
$(this).mouseout(function() {
$(this).toggleClass(hightlightClass);
});
return this;
}
(function($) {
$.fn.highlightRows = function(highlightClass) {
$(this).find("tbody tr").each(function(i, tr) {
$(tr).mouseover(function() {
$(this).toggleClass(highlightClass);
});
$(tr).mouseout(function() {
$(this).toggleClass(highlightClass);
});
});
(function($) {
$.fn.highlightRows = function(highlightClass) {
$(this).find("tbody tr").each(function(i, tr) {
$(tr).hover(
function() {
$(this).toggleClass(highlightClass);
},
function() {
$(this).toggleClass(highlightClass);
}