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
def deep_attributes | |
self.attributes.merge 'service_appointments_attributes'=>service_appointments.collect{|sa| | |
sa.attributes.merge 'student_appointments_attributes'=>sa.student_appointments.collect{|std_a| | |
std_a.attributes.merge 'student_appointment_goals_attributes'=>std_a.student_appointment_goals.collect{|sag| | |
sag.attributes | |
} | |
} | |
} | |
end |
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
def deep_attributes | |
attributes_to_copy(self).merge 'service_appointments_attributes'=>service_appointments.collect{|sa| | |
attributes_to_copy(sa).merge 'student_appointments_attributes'=>sa.student_appointments.collect{|std_a| | |
attributes_to_copy(std_a).merge 'student_appointment_goals_attributes'=>std_a.student_appointment_goals.collect{|sag| | |
attributes_to_copy(sag) | |
} | |
} | |
} | |
end |
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 com.cadrlife.util; | |
/* | |
* A simple Java class to provide functionality similar to Wget. | |
*/ | |
import java.io.*; | |
import java.net.*; | |
import org.apache.commons.io.IOUtils; |
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 com.cadrlife; | |
import java.util.Arrays; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
public class SampleGet { | |
public static void main(String[] args) { | |
final JGet jGet = new JGet(); | |
final LinkedHashMap<String, List<String>> families = new LinkedHashMap<String, List<String>>(); |
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
!!! Strict | |
%html(lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml") | |
%head | |
%title Page Title | |
%meta(http-equiv="Content-Type" content="text/html; charset=UTF-8") | |
= stylesheet_link_tag :all | |
= javascript_include_tag :all | |
= csrf_meta_tag | |
%style{ :type => "text/css" } | |
:sass |
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
beans = { // ... | |
groovyPageResourceLoader(com.cadrlife.jhaml.grailsplugin.HamlGroovyPageResourceLoader) { | |
baseResource = new org.springframework.core.io.FileSystemResource(".") | |
} | |
} |
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
<!-- GSP/JSP --> | |
<div id="profile"> | |
<div class="left column"> | |
<div id="date"><%= date %></div> | |
<div id="address"><%= user.address %></div> | |
</div> | |
<div class="right column"> | |
<div id="email"><%= user.email %></div> | |
<div id="bio"><%= user.bio %></div> | |
</div> |
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
/ Haml | |
#profile | |
.left.column | |
#date= date | |
#address= user.address | |
.right.column | |
#email= user.email | |
#bio= user.bio | |
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
%html | |
%head | |
%title Welcome to Grails | |
%meta(name="layout" content="main") | |
:css | |
#nav { | |
margin-top:20px; | |
margin-left:30px; | |
width:228px; | |
float:left; |
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
#! /usr/bin/env python | |
import sys | |
import httplib | |
from urlparse import urlparse | |
from time import time | |
try: | |
# Python 2.6 | |
import json | |
except: | |
# Prior to 2.6 requires simplejson |
OlderNewer