View Order.java
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 uk.co.initech.sandbox; | |
import java.util.HashSet; | |
import java.util.Set; | |
import javax.persistence.CascadeType; | |
import javax.persistence.Entity; | |
import javax.persistence.Id; | |
import javax.persistence.OneToMany; | |
import javax.persistence.Table; |
View OrderLine.java
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 uk.co.initech.sandbox; | |
import javax.persistence.Embeddable; | |
import javax.persistence.EmbeddedId; | |
import javax.persistence.Entity; | |
import javax.persistence.ManyToOne; | |
import javax.persistence.MapsId; | |
@Entity | |
public class OrderLine { |
View A.java
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.stackoverflow.jaizen; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.Id; | |
import javax.persistence.ManyToOne; | |
@Entity | |
public class A { | |
View .hgignore
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
.hgignore | |
syntax:glob | |
.byecycle | |
.classpath | |
.checkstyle | |
.nbattrs | |
.nbintdb | |
.settings | |
antlib | |
antlog.bat |
View CircularQueue.java
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
public class CircularQueue<T> { | |
private T[] queue = newArray(5); | |
private int front = 0; | |
private int rear = 0; | |
public void enqueue(T element) { | |
if (front == (rear + 1) % queue.length) { | |
expandCapacity(); | |
} |
View Sorter.java
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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Random; | |
public class Sorter { | |
public static void main(String[] args) { | |
@SuppressWarnings("unchecked") |
View dashboards.sql
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
create table Dashboard ( | |
id integer not null, | |
name varchar(255), | |
primary key (id) | |
); | |
create table User ( | |
id integer not null, | |
name varchar(255), | |
primary key (id) |
View print_call_and_return.rb
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/ruby | |
def print_call_and_return(string, &block) | |
puts string | |
block.call unless !block | |
"return" | |
end | |
puts "=== exhibit A ===" |
View top
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
27727 elastics 20 0 31.9g 30g 6984 S 8 47.9 14:19.24 /usr/lib/jvm/java-6-sun/bin/java -Xms30g -Xmx30g -Xss256k -Djava.awt.headless=true -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:GCPauseIntervalMill | |
6895 www-data 20 0 28.5g 28g 1256 R 105 45.1 4881:55 /usr/bin/python /opt/graphite/bin/carbon-cache.py start | |
28369 logstash 20 0 16.5g 766m 6008 S 173 1.2 104:12.72 /usr/bin/java -jar /opt/logstash-monolithic.jar agent --pluginpath /opt/logstash_plugins --config /etc/logstash/logstash.conf --log /var/log/logstash_indexer.notlog | |
14562 nobody 20 0 753m 53m 644 S 0 0.1 395:29.49 java -XX:+UseConcMarkSweepGC -jar /usr/lib/riemann/riemann.jar /etc/riemann/riemann.config | |
26906 rabbitmq 20 0 509m 56m 1000 S 45 0.1 1786:24 /usr/lib/er |
View Recv.java
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
import java.io.IOException; | |
import java.util.concurrent.Executors; | |
import com.rabbitmq.client.AMQP.BasicProperties; | |
import com.rabbitmq.client.Channel; | |
import com.rabbitmq.client.Connection; | |
import com.rabbitmq.client.ConnectionFactory; | |
import com.rabbitmq.client.DefaultConsumer; | |
import com.rabbitmq.client.Envelope; |
OlderNewer