This file contains hidden or 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
/* | |
________________ ______ | |
/ ____/_ __/ __ \ / ____/________ ____ _ ____ __ | |
/ /_ / / / / / / / / __/ ___/ __ \/ __ \ | / / / / / | |
/ __/ / / / /_/ / / /_/ / / / /_/ / /_/ / |/ / /_/ / | |
/_/ /_/ /_____/ \____/_/ \____/\____/|___/\__, / | |
/____/ | |
12/03/2015 | |
@ftmamud |
This file contains hidden or 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
/* | |
________________ ______ | |
/ ____/_ __/ __ \ / ____/________ ____ _ ____ __ | |
/ /_ / / / / / / / / __/ ___/ __ \/ __ \ | / / / / / | |
/ __/ / / / /_/ / / /_/ / / / /_/ / /_/ / |/ / /_/ / | |
/_/ /_/ /_____/ \____/_/ \____/\____/|___/\__, / | |
/____/ | |
12/03/2015 | |
@ftmamud |
This file contains hidden or 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 groovy.lang.Binding; | |
import groovy.lang.GroovyShell; | |
public class JavaEmbedGroovy { | |
public static void main(String[] args) { | |
Binding binding = new Binding(); | |
binding.setVariable("evento", "FTD"); | |
binding.setVariable("linguagem", "Groovy"); |
This file contains hidden or 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 forkjoin; | |
import java.util.concurrent.RecursiveTask; | |
public class FibonacciTask extends RecursiveTask<Long> { | |
/** | |
* | |
*/ | |
private static final long serialVersionUID = 8826018716775533826L; |
This file contains hidden or 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 forkjoin; | |
public class FibonacciProblem { | |
int n; | |
public FibonacciProblem(int n) { | |
this.n = n; | |
} | |
This file contains hidden or 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 forkjoin; | |
import java.math.BigInteger; | |
import java.util.concurrent.ForkJoinPool; | |
public class Main { | |
public static void main(String[] args) { |
This file contains hidden or 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 forkjoin; | |
public class FibonacciProblem2 { | |
int n; | |
public FibonacciProblem2(int n) { | |
this.n = n; | |
} | |
This file contains hidden or 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 forkjoin; | |
import java.math.BigInteger; | |
public class FibonacciProblem3 { | |
BigInteger n; | |
public FibonacciProblem3(int n) { | |
this.n = BigInteger.valueOf(n); |
This file contains hidden or 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 soujava.threads.java5; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class MainJava5 { | |
public static void main(String[] args) { | |
//Executor Framework |
This file contains hidden or 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(pingpong). | |
-export([start/0, ping/2, pong/0]). | |
ping(0, Pong_PID) -> | |
Pong_PID ! finished, | |
io:format("Ping finished~n", []); | |
ping(N, Pong_PID) -> | |
Pong_PID ! {ping, self()}, |
OlderNewer