class Duck {
def walk() { println "I'm a duck, I walk" }
def swim() { println "I'm a duck, I swim" }
def quack() { println "QUACK" }
}
class Person {
| import java.util.List; | |
| public class Sieve { | |
| static List<Integer> sieve(int n) { | |
| List<Integer> l = new java.util.ArrayList<Integer>(); | |
| byte[] bs = new byte[(n / 8) + 1]; // 0 => maybe prime | |
| bs[0] = (byte) 0xc0; // skip 0 and 1 | |
| for (int i = 2; i <= n / 2; i++) { | |
| for (int c = i; c <= n; c += i) { | |
| int bidx = c / 8; |
| parse_git_branch() { | |
| git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1 /' | |
| } | |
| gitps1() { | |
| local GREEN="\[\033[0;32m\]" | |
| local DEFAULT="\[\033[0m\]" | |
| PS1="[\u@\h \W]$GREEN\$(parse_git_branch)$DEFAULT\$ " | |
| } | |
| gitps1 |
| #!/bin/sh | |
| echo "What should the Application be called (e.g. GCal)?" | |
| read inputline | |
| name="$inputline" | |
| echo "What is the url (e.g. https://www.google.com/calendar/render)?" | |
| read inputline | |
| url="$inputline" |
| /* | |
| * Current getMetadataTable() method. This is hard to test because it requires a real HdfsZooInstance object. | |
| */ | |
| public synchronized static Writer getMetadataTable(Credentials credentials) { | |
| Writer metadataTable = metadata_tables.get(credentials); | |
| if (metadataTable == null) { | |
| metadataTable = new Writer(HdfsZooInstance.getInstance(), credentials, MetadataTable.ID); | |
| metadata_tables.put(credentials, metadataTable); | |
| } | |
| return metadataTable; |
| Observed in monitor: | |
| Unexpected throwable while invoking! | |
| java.lang.OutOfMemoryError: Java heap space | |
| at java.util.Arrays.copyOf(Arrays.java:2786) | |
| at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94) | |
| at org.apache.thrift.transport.TFramedTransport.write(TFramedTransport.java:146) | |
| at org.apache.thrift.protocol.TCompactProtocol.writeBinary(TCompactProtocol.java:342) | |
| at org.apache.thrift.protocol.TCompactProtocol.writeBinary(TCompactProtocol.java:337) | |
| at org.apache.accumulo.core.data.thrift.TKeyValue$TKeyValueStandardScheme.write(TKeyValue.java:465) |
| #!/bin/bash | |
| protected_branch='master' | |
| current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
| remote_name=$1 | |
| if [[ $remote_name != "origin" ]]; then | |
| exit 0 | |
| fi |
| #!/usr/bin/env bash | |
| # Copyright 2017 William A. Havanki, Jr. | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
| { | |
| "basics": { | |
| "name": "William A. Havanki, Jr.", | |
| "label": "", | |
| "picture": "", | |
| "email": "[email protected]", | |
| "website": "http://havanki.us/", | |
| "summary": "", | |
| "location": { | |
| "address": "1234 Test St.", |