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
@Test | |
public void testDate() { | |
{ | |
Date date = new Date(1325376000000l); | |
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("US/Eastern")); | |
cal.setTime(date); | |
cal.set(Calendar.MONTH, Calendar.JANUARY); | |
Date timeDate = cal.getTime(); | |
System.out.println(timeDate); | |
} |
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
// ================================================================================================= | |
// Copyright 2011 Twitter, Inc. | |
// ------------------------------------------------------------------------------------------------- | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this work except in compliance with the License. | |
// You may obtain a copy of the License in the LICENSE file, or at: | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software |
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 User { | |
@NotNull | |
private String email; | |
@ValidUsername | |
private String username; | |
@NotNull | |
private String name; |
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/env sh | |
du -s ./* | sort -n| cut -f 2-| xargs du -sh {} |
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 <T extends ApplicationEvent> void publishEvent(final T event) { | |
if (TransactionSynchronizationManager.isActualTransactionActive()) { | |
TransactionSynchronizationManager.registerSynchronization( | |
new TransactionSynchronizationAdapter() { | |
@Override | |
public void afterCommit() { | |
delegate.publishEvent(event); | |
} | |
}); | |
} |
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
22 May 12:15:48,532 DEBUG org.apache.http.impl.conn.SingleClientConnManager:212 - Get connection for route HttpRoute[{s}->https://scriptguidetest.ldmgrp.com] - | |
22 May 12:15:48,686 DEBUG org.apache.http.impl.conn.DefaultClientConnectionOperator:145 - Connecting to scriptguidetest.ldmgrp.com/67.221.232.152:443 - | |
22 May 12:15:49,056 DEBUG org.apache.http.client.protocol.RequestAddCookies:132 - CookieSpec selected: best-match - | |
22 May 12:15:49,064 DEBUG org.apache.http.client.protocol.RequestAuthCache:75 - Auth cache not set in the context - | |
22 May 12:15:49,064 DEBUG org.apache.http.impl.client.DefaultRequestDirector:631 - Attempt 1 to execute request - | |
22 May 12:15:49,064 DEBUG org.apache.http.impl.conn.DefaultClientConnection:264 - Sending request: POST /remotebridge.aspx HTTP/1.1 - | |
22 May 12:15:49,065 DEBUG org.apache.http.impl.conn.Wire:63 - >> "POST /remotebridge.aspx HTTP/1.1[\r][\n]" - | |
22 May 12:15:49,066 DEBUG org.apache.http.impl.conn.Wire:63 - >> "Content-Length: 588[\r][\n]" - | |
22 May 12:15:49,0 |
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
REQUEST: | |
<request source="EMA_4_0" portalID="1" pformat="pcl" wformat="html" output="inline"> | |
<rxNumber>rx_encrypted_id</rxNumber> | |
<productRxNorm>830648</productRxNorm> | |
<productNDC>00093092606</productNDC> | |
<quantity>10</quantity> | |
<patient> | |
<code>ABC123</code> | |
<firstName>John</firstName> |
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
{ | |
"query" : { | |
"match_all" : { } | |
}, | |
"facets" : { | |
"tag" : { | |
"terms" : { | |
"field" : "geopoint_calc_method", | |
"size" : 10 | |
} |
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
Get count of geocoded addresses: | |
curl -v 'http://cass3:9200/addresses/address/_count' -d '{ | |
"constant_score": { | |
"filter": { | |
"not": { | |
"missing": { | |
"field": "geo_point" | |
} | |
} | |
} |
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
addresses/address/_count w/ body" | |
{ | |
"filtered": { | |
"query": { | |
"match_all": {} | |
}, | |
"filter": { | |
"or": [ | |
{ | |
"missing": { |
NewerOlder