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
public class BitSet<T extends Enum<?>> { | |
private byte[] bytes; | |
@SafeVarargs | |
public BitSet(T... elements) { | |
bytes = new byte[elements.length / 8 + 1]; | |
} | |
private int bitMask(int ordinal) { |
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 java.util.LinkedList; | |
/** | |
* Slave task that allows for asynchronous operations based on a FIFO queue. | |
*/ | |
public class Async extends Thread { | |
private LinkedList<Runnable> tasks = new LinkedList<Runnable>(); | |
private boolean stop = false; |
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
public class ClosureIterator { | |
private static interface Iterator<T> { | |
T next(); | |
} | |
private static class Container<T> { | |
private T value; | |
public Container(T value) { |
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
def current_exception_details(): | |
"""Retourne un tuple contenant les les informations sur l'exception | |
en cours de traitement | |
Retour : ( | |
Nom du fichier, | |
Ligne, | |
Nom de l'exception, | |
Type de l'exception, | |
Message de l'exception |
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
>>> def test(a=0,b="salut",c=[],d=[]): | |
... a += 1 | |
... b += "!" | |
... c += [2] | |
... d = d + [42] | |
... print a, b, c, d | |
... | |
>>> test() | |
1 salut! [2] [42] |
NewerOlder