Skip to content

Instantly share code, notes, and snippets.

@nkcr
nkcr / AbstractFacade.java
Created March 11, 2016 12:04 — forked from Snugglepantz/AbstractFacade.java
Modified Netbeans Abstract Facade
package me.slashfix.angular.rest;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.Query;
/**
require 'date'
# Actually doesn't matter WHAT you choose as the epoch, it
# won't change the algorithm. Just don't change it after you
# have cached computed scores. Choose something before your first
# post to avoid annoying negative numbers. Choose something close
# to your first post to keep the numbers smaller. This is, I think,
# reddit's own epoch.
$our_epoch = Time.local(2005, 12, 8, 7, 46, 43).to_time