Skip to content

Instantly share code, notes, and snippets.

package util.model;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
public interface ReferencesRepository
extends PagingAndSortingRepository<Reference, Long>, JpaSpecificationExecutor<Reference> {
public List<Reference> findByRequestIsNullAndKeyProcessType(EProcessType processType);
}
@cokeSchlumpf
cokeSchlumpf / config.toml
Last active November 29, 2016 17:45
gitlab + gitlab-runner
concurrent = 1
check_interval = 0
[[runners]]
name = "Sample Runner"
url = "http://gitlab:9080"
token = "b9f216ac4a40d71994bad41269154a"
executor = "docker"
[runners.docker]
tls_verify = false
swagger: '2.0'
info:
description: Discover REST APIs available within Liberty
version: 1.0.0
title: calc-sum-service
x-ibm-name: calc-sum-service
host: $(catalog.host)
tags:
- name: 'calculation-service for adding numbers! :)'
- name: about-service
docker ps -a | grep 'Exited' | grep -v 'build-dvc' | awk '{print $1}' | xargs docker rm -v || true
docker images | grep "<none>" | awk '{print $3}' | xargs docker rmi || true
docker volume ls | grep local | awk '{print $2}' | xargs docker volume rm || true
function test() {
if (true) {
var a = 3
}
console.log("a" + a); // prints "a3" ...yes really... that sucks...
}
public class NaNTest {
public static void main(String[] args) {
double a = 10.0 / 0.0;
double b = a * 3;
System.out.println(a);
System.out.println(b);
checkValue(b);
}
@cokeSchlumpf
cokeSchlumpf / gist:2f10d29c831a0803bd18
Created July 9, 2014 15:52
Slick DAO Capabilities
**
* DAOCapabilities for slick entities.
*
* @author [email protected]
* @since 4/14/14
*/
abstract class AbstractDAOCapabilities[ENTITY <: EntityCapabilities[ENTITY], TABLE <: AbstractTable[ENTITY]](cons: Tag => TABLE)
extends DAOCapabilities[Option[Long], ENTITY]
/**
* Interface for Data Access Objects. The interface encapsulates the access from the underlying persistence method.
*
* @author [email protected]
* @since 4/14/14
*/
trait DAOCapabilities[ID, ENTITY] {
/**
* @return The display name of the entity (used for logging, generic ui, ...)
@cokeSchlumpf
cokeSchlumpf / gist:bbad848d4c44aadd7fa7
Created July 7, 2014 19:25
Slick Column Mapper for wellnr commons Enumerations
/**
* Returns a mapper for an enumeration.
*
* @param enumeration
* The Enumeration object.
* @tparam ENUM
* The type of the enumeration.
* @return
* The mapper column mapper for the enumeration.
*/