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
tips: { | |
// ... | |
renderer: function (storeItem, item) { | |
if (/* want to hide condition ... */) { | |
this.update(); | |
return; | |
} | |
// ... the code for regualr tips we want to show | |
}, | |
listeners: |
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 interface Adaptee { | |
void doAdaptee(); | |
} | |
public interface Adaptor { | |
void doAdaptor(); | |
} | |
class Client{ | |
private final Adaptor adaptor; |
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
val rnd = Math.random() | |
val n = Math.abs(rnd) | |
assert(n > 0) |
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
implicit class BitMaskExtensions(bitSet: BitSet) { | |
def toBitArrayString: String = { | |
val seq = (0 to bitSet.max) map { x => if (bitSet.contains(x)) "1" else "0"} | |
"[" + seq.mkString(",") + "]" | |
} | |
} |