View Java8Test
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.google.locationlab; | |
import com.google.common.collect.Lists; | |
import com.google.common.collect.Ordering; | |
import com.google.common.primitives.Ints; | |
import org.apache.commons.lang.builder.ToStringBuilder; | |
import org.apache.commons.lang.builder.ToStringStyle; | |
import org.junit.Before; | |
import org.junit.Test; |
View PortalRestTemplateIntegrationTest
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.google.locationlab; | |
import com.google.common.collect.Lists; | |
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; | |
import org.junit.Test; | |
import org.springframework.http.*; | |
import org.springframework.http.converter.HttpMessageConverter; | |
import org.springframework.http.converter.StringHttpMessageConverter; | |
import org.springframework.web.client.RestTemplate; |
View RestTemplateIntegrationTest
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.google.locationlab; | |
import com.google.common.collect.Lists; | |
import com.google.locationlab.model.LocationResponse; | |
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; | |
import org.junit.Test; | |
import org.springframework.core.ParameterizedTypeReference; | |
import org.springframework.http.*; |
View print-time-interval.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
require 'date' | |
require 'time' | |
require 'optparse' | |
options = {:start_time => nil, :end_time => nil, :interval => nil} | |
parser = OptionParser.new do|opts| | |
opts.banner = "Usage: print-time-interval.rb --time [MIN | HOUR | DAY] --interval [5MIN | HOUR | DAY]" | |
opts.on('-s', '--start_time time', 'time') do |time| | |
options[:start_time] = time; |
View gist:c151c8900061c4848591
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 main | |
import "fmt" | |
func main() { | |
fmt.Println("test") | |
} | |
// $ go run test.go | |
// $ go build test.go |