Skip to content

Instantly share code, notes, and snippets.

Brett C. bmchild

Block or report user

Report or block bmchild

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View beans.json
{
"beans":[
{
"agreemendId":1,
"answerId":2
}
]
}
View gist:8925602
public class PolicyAgreementBean {
@Valid
private List<PolicyAgreementUserAnswerBean> beans;
public List<PolicyAgreementUserAnswerBean> getBeans() {
return beans;
}
public void setBeans(List<PolicyAgreementUserAnswerBean> beans) {
View triggerseeker.sql
SELECT
sysobjects.name AS trigger_name
,USER_NAME(sysobjects.uid) AS trigger_owner
,s.name AS table_schema
,OBJECT_NAME(parent_obj) AS table_name
,OBJECTPROPERTY( id, 'ExecIsUpdateTrigger') AS isupdate
,OBJECTPROPERTY( id, 'ExecIsDeleteTrigger') AS isdelete
,OBJECTPROPERTY( id, 'ExecIsInsertTrigger') AS isinsert
,OBJECTPROPERTY( id, 'ExecIsAfterTrigger') AS isafter
,OBJECTPROPERTY( id, 'ExecIsInsteadOfTrigger') AS isinsteadof
View SchedulerController.java
package com.bmchild.controller.admin;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.Scheduled;
View elementcollection2.java
public class ParentEntity implements Serializable {
@Id
private Long Id;
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "COLLECTION_TABLE_NAME",
joinColumns = @JoinColumn(name = "PARENT_ENTITY_COLUMN", referencedColumnName = "COLLECTION_COLUMN"))
@OrderBy("collectionProperty")
private List<CollectionObject> myCollection;
View romanNumeral.html
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
var NumberMap = {};
NumberMap.I = 1;
NumberMap.V = 5;
NumberMap.X = 10;
NumberMap.L = 50;
View PrimeFizzBuzz.java
public class PrimeFizzBuzz {
/**
* @param args
*/
public static void main(String[] args) {
for(int i = 1; i < 151; i++) {
String print = i + " -> ";
if(i % 3 == 0) {
View ChallengeFive.java
package com.bmchild;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.HashMap;
import java.util.Map;
/**
* @author bchild
*
View MoreTemplates.txt
private static final Logger LOGGER = Logger.getLogger(${enclosing_type}.class.getName());
${\:import(org.apache.log4j.Logger)}
public static final String ${field1} = "${field1}";
${cursor}
private static final String ${field1} = "${field1}";
${cursor}
ArgumentCaptor<${field}> captor = ArgumentCaptor.forClass(${field}.class);
View ChallengeNine.java
package com.bmchild.challenge.nine;
public class ChallengeNine {
private static final String PALINDROME = "Mr. Owl ate my metal worm";
private static final String NOT_PALINDROME = "I am not a palindrome.";
public static void main(String[] args) {
checkPalindrome(PALINDROME);
checkPalindrome(NOT_PALINDROME);
You can’t perform that action at this time.