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.*; | |
public class Main { | |
public static void main(String[] args) { | |
int max = 72; | |
int maxDate = 31; | |
Set<Ages> agesPerms = getProducPerms(max, maxDate); | |
Map<Integer, List<Ages>> sumToAgesMap = getSumToAgesMap(agesPerms); | |
Map<Integer, List<Ages>> sumWithDups = getSumWithDups(sumToAgesMap); |
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 Something { | |
private Something() { | |
System.out.println("Constructor called..."); | |
} | |
/** | |
* SingletonHolder is loaded on the first execution of Singleton.getInstance() or the first access to SingletonHolder.INSTANCE, not before. | |
*/ | |
private static class LazyHolder { | |
private static final Something INSTANCE = new Something(); |
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
svn log -r 1:HEAD --limit 1 http://svn.ingenui.com:8081/repos/trunk/ing/ims_component |
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
var partialAny = (function() { | |
var slice = Array.prototype.slice; | |
function partialAny(fn /*, args...*/) { | |
var orig = slice.call(arguments, 1); | |
return function() { | |
var partial = slice.call(arguments, 0); | |
var args = []; | |
for (var i = 0; i < orig.length; i++) { |
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
// http://dbaron.org/log/20100309-faster-timeouts | |
// Only add setZeroTimeout to the window object, and hide everything | |
// else in a closure. | |
(function() { | |
var timeouts = []; | |
var messageName = "zero-timeout-message"; | |
// Like setTimeout, but only takes a function argument. There's | |
// no time argument (always zero) and no arguments (you have to | |
// use a closure). |
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
shasum -a 256 $1 |
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
git config --global url."https://".insteadOf git:// |
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
BEGIN | |
FOR cur_rec IN (SELECT object_name, object_type | |
FROM user_objects | |
WHERE object_type IN | |
('TABLE', | |
'VIEW', | |
'PACKAGE', | |
'PROCEDURE', | |
'FUNCTION', | |
'SEQUENCE' |
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
ts=`date +%s1` | |
echo $ts | |
date -r $ts | |
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 IntegrationTestUtil { | |
public static void addParameters(Object formObject, MockHttpServletRequest request) { | |
ObjectMapper mapper = new ObjectMapper(); | |
mapper.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL); | |
Map<String, Object> propertyValues = mapper.convertValue(formObject, Map.class); | |
Set<String> propertyNames = propertyValues.keySet(); | |
Iterator<String> nameIter = propertyNames.iterator(); |
NewerOlder