I hereby claim:
- I am mressler on github.
- I am mressler (https://keybase.io/mressler) on keybase.
- I have a public key ASD-V10t8CB6KmlntWPWuzq70c4WAsn7SghSJp-AnGB0mAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| def map_to_clock(spin_axis): | |
| sp_x = spin_axis[0] | |
| sp_z = spin_axis[2] | |
| angle = np.arctan2(sp_z, sp_x) | |
| angle_deg = angle / np.pi * 180 | |
| angle_clock = -angle_deg / 30.0 + 3.0 | |
| if angle_clock < 0: | |
| angle_clock += 12 |
| /* | |
| * Copyright (C) 2014 jsonwebtoken.io | |
| * | |
| * 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 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| package com.diamondkinetics.model.enums; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import com.diamondkinetics.model.json.SessionTypeSerializer; | |
| import com.fasterxml.jackson.databind.annotation.JsonSerialize; | |
| @JsonSerialize(using = SessionTypeSerializer.class) | |
| public enum SessionType { |
| import static org.junit.Assert.*; | |
| import java.io.IOException; | |
| import java.util.ArrayList; | |
| import java.util.Iterator; | |
| import java.util.concurrent.Semaphore; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; |
| public static class ProfileResponse extends ODataListValueDTO<UserProfileDTO> {} | |
| // I was having a lot of difficulty getting Jackson to appropriately deserialize a complex | |
| // data type due to type erasure. By creating an "as needed" class, I can avoid the type | |
| // erasure problem and get an ODataListValueDTO<UserProfileDTO> as a result | |
| ResponseEntity<ProfileResponse> profileResponse = template.exchange( | |
| "http://localhost:8080/dummy", | |
| HttpMethod.POST, | |
| new HttpEntity<UserProfileDTO>(toSend, headers), | |
| ProfileResponse.class); |