Skip to content

Instantly share code, notes, and snippets.

@Amiko
Amiko / UAgentInfo.java
Created Aug 15, 2017 — forked from bryanjswift/UAgentInfo.java
User Agent detection in Java
View UAgentInfo.java
/* *******************************************
// LICENSE INFORMATION
// The code, "Detecting Smartphones Using PHP"
// by Anthony Hand, is licensed under a Creative Commons
// Attribution 3.0 United States License.
//
// Updated 01 March 2010 by Bryan J Swift
// - Remove un-needed if statements instead just returning the boolean
// inside the if clause
//
@Amiko
Amiko / gist:b5671d586c7ac22e55ffebb6d564ec42
Created Apr 7, 2017 — forked from hpadmanabhan/gist:9e3ab663f491798b897c
Java InetAddress wrapper for PostgreSQL inet data type for Hibernate
View gist:b5671d586c7ac22e55ffebb6d564ec42
//Java bean wrapping InetAddress to enable Hibernate support for PostgreSQL inet type.
import java.io.Serializable;
import java.net.InetAddress;
@SuppressWarnings("serial")
public class PgInet implements Serializable {
private InetAddress address;
public PgInet() {}