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
L-( ;P :)>- !!!!!! hah ;-( P) hahahah lololololol 8-( >:( lolololol P) :-> <:o) /:-) :X 8-( :O 8( ;-( :T (O.o) !!!!!!!!!! hahahaha :(|) :S B( $-) <:-p =-( lolololol :-S :-( :-B $( >:( :)>- :P :| :-> :-# :* $-( >>:) >:( hahahahah :-\ B-( :P hahahahahah :-( :b !! /:-) >>:) :x :-\ :-b :-b :-P hehehe (o.O) hehehe (o.O) >:) |-) =-) <:o( hehehehehe :-< :-T lololololol :( <:-P :-B hehe >>:) >>:-( :b :^O hehehe =) ;( :-\ :( P( ;-) :-X !!!!! ;-( //:| |-) hehehehehehe !!!!! :-x :-| $( ha hahah ;) !!!!! :| 8-( :-* hahaha $) heheheheheh hehehehehe /:( ;-) 8-( :X P) <:o) :-( ;P :b :-b ;-P :-D heheheheh :\ |-) 8-( :@( hahahah +o( |-) =-) >>:-) :(|) >:-) ! :-P =-( B( :-) :S !!!!!! $-( !! !!!!! :-b B( heheheheheh :-S 8-) !!! =) (o.O) :-> :s X-D >>:( :-& :B hahahaha /:-) :-# :-s :^o $( :-> :( >:o hahahahaha hahahahahaha O:) P) :> /:-( heheheh B-) <:-p //:| !! ;) B-( b-( :? O:) :-\ :> :^O X-D :O L-( :> heheh lololol $( :X heheh hahahahahaha :D ;-) O:( =-) heh |-( :-B +o( >>:-( P) :-* lololololol :-X :-S <:-p lolololololol ;( h |
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
extern bool compare_and_swap(void** vp, void* cmp, void* val); | |
template <class T> | |
bool CASRefs(T** vp, T* cmp, T* val) | |
{ | |
if (val) | |
val->AddRef(); | |
if (compare_and_swap(vp, cmp, val)) { | |
if (cmp) | |
cmp->Release(); |
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
function diff(a, b) { | |
[].sort.call(arguments); | |
return b - a; | |
} | |
console.log(diff(3, 5)); | |
console.log(diff(5, 3)); |
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
Overlapping 1 time: | |
x- | |
x- | |
Overlapping 1 time: | |
xx-x- | |
x-xx- | |
Overlapping 1 time: | |
xxx-xx-x- |
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
#!/usr/bin/env python | |
def count_down_up(max): | |
countdown = "-".join("x" * (max - i) for i in range(max)) + "-" | |
countup = "-".join("x" * i for i in range(1, max+1)) + "-" | |
overlaps = 0 | |
for i in range(min(len(countup), len(countup))): | |
if countdown[i] == "-" and countup[i] == "-": | |
overlaps += 1 | |
return overlaps, countdown, countup |
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
class EventQueue { | |
Queue<nsIRunnable> mQueue; | |
PRBool mWaiting; | |
mozilla::Monitor mRarelyUsedMonitor; | |
public: | |
EventQueue() | |
: mQueue() | |
, mWaiting(0) | |
, mRarelyUsedMonitor("EventQueue::mRarelyUsedMonitor") | |
{} |
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
Object.create = function( proto, props ) { | |
var ctor = function( ps ) { | |
if ( ps ) | |
Object.defineProperties( this, ps ); | |
}; | |
ctor.prototype = proto; | |
return new ctor( props ); | |
}; |
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
template <typedef T> | |
class hazard_manager { | |
template <unsigned Exp = 8> | |
class zet { | |
static const PRInt32 sCapacity = 1 << Exp; | |
hazard* mStore[sCapacity]; | |
PRInt32 sCount; | |
public: | |
zet() : sCount(0) { |
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
diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp | |
--- a/content/html/document/src/nsHTMLDocument.cpp | |
+++ b/content/html/document/src/nsHTMLDocument.cpp | |
@@ -920,17 +920,17 @@ nsHTMLDocument::StartDocumentLoad(const | |
"not nsICachingChannel"); | |
rv = cacheDescriptor->SetMetaDataElement("charset", | |
charset.get()); | |
NS_ASSERTION(NS_SUCCEEDED(rv),"cannot SetMetaDataElement"); | |
} | |
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
#define paste(x, y) x##y | |
#define blah(x) paste(blah, x) | |
int main() | |
{ | |
int blahbar = 0; | |
return blah(FOO); | |
} |