I hereby claim:
- I am spullara on github.
- I am spullara (https://keybase.io/spullara) on keybase.
- I have a public key whose fingerprint is 68CB 3BDC 2346 AB6E 0BF7 58BC 7C13 E77B A6D1 A33E
To claim this, I am signing this object:
| public CharSequence render(String text, Set<Entity> entities) { | |
| StringBuilder sb = new StringBuilder(256); | |
| Entity[] array = entities.toArray(new Entity[entities.size()]); | |
| Arrays.sort(array); | |
| int pos = 0; | |
| int codePointPosition = 0; | |
| for (Entity entity : array) { | |
| int start = text.offsetByCodePoints(pos, entity.start - codePointPosition); | |
| sb.append(text, pos, start); | |
| sb.append(entity.html); |
| function archiveMail() { | |
| var delayDays = 1 // Enter # of days before messages are archived | |
| var maxDate = new Date(); | |
| maxDate.setDate(maxDate.getDate()-delayDays); | |
| var label = GmailApp.getUserLabelByName("To be archived"); | |
| if (label != null) { | |
| var threads = label.getThreads(); | |
| for (var i = 0; i < threads.length; i++) { | |
| if (threads[i].getLastMessageDate()<maxDate) { |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.yourpackage</groupId> | |
| <artifactId>parentartifactofeverything</artifactId> | |
| <version>1.0-SNAPSHOT</version> | |
| <modules> | |
| <module>module1</module> | |
| <module>module2</module> |
| -Xmx | |
| Set the maximum heap size. Beware going between 32G and 50G if you have a lot of objects since CompressedOops will not be after 32G. | |
| -XX:+UseG1GC | |
| It works now for us by default. | |
| -XX:+UseStringDeduplication | |
| This can usefully reduce your footprint if you have a lot of duplicate strings in your application. There is little benefit to | |
| not enabling it. |
| "user-tasks" #19 prio=5 os_prio=31 tid=0x00007f8bdc28b800 nid=0x4f03 runnable [0x000000011f631000] | |
| java.lang.Thread.State: RUNNABLE | |
| at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658) | |
| at java.util.regex.Pattern$Loop.matchInit(Pattern.java:4804) | |
| at java.util.regex.Pattern$Prolog.match(Pattern.java:4741) | |
| at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717) | |
| at java.util.regex.Pattern$Curly.match1(Pattern.java:4287) | |
| at java.util.regex.Pattern$Curly.match(Pattern.java:4236) | |
| at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658) | |
| at java.util.regex.Pattern$Begin.match(Pattern.java:3525) |
I hereby claim:
To claim this, I am signing this object:
| @Override | |
| public <T> T run(final Function<? super Transaction, T> tFunction) { | |
| return database.run(new Function<Transaction, T>() { | |
| int tries = 0; | |
| @Override | |
| public T apply(Transaction tx) { | |
| if (tries++ > 0) { | |
| log.info("Retrying transaction: " + tries); | |
| } |
| package lambda; | |
| public class JavacBug { | |
| interface Function<T, V> extends PartialFunction<T, V> { | |
| V apply(T paramT); | |
| } | |
| interface PartialFunction<T, V> { | |
| V apply(T paramT) throws Exception; | |
| } |
| package spullara; | |
| public class ExceptionInferenceBug { | |
| interface Function<T, V> extends PartialFunction<T, V> { | |
| V apply(T paramT); | |
| } | |
| interface PartialFunction<T, V> { | |
| V apply(T paramT) throws Exception; | |
| } |
| package com.sampullara; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Spliterator; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| import java.util.function.Consumer; | |
| import java.util.stream.Stream; | |
| import java.util.stream.StreamSupport; |