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
RBNodeColor: enum { | |
black = 0 | |
red = 1 | |
} | |
RBNode: class <K, V> { | |
color := RBNodeColor black |
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
Tile: class { | |
id: Int | |
init: func (=id) | |
println: func (x, y: Int) { | |
"%d, %d: %d" format(x, y, id) println() | |
} | |
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
use math | |
import math | |
//PI: const Float = 3.14159265359 | |
TWOPI: const Float = PI*2 | |
HALFPI: const Float = PI/2 | |
Rect: class { | |
x, y, width, height: Float | |
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
Rem | |
foobar | |
EndRem | |
Rem | |
foobar! | |
End Rem | |
Rem |
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
#include <stdio.h> | |
#include <map> | |
class Object; | |
typedef std::map<int, Object> ObjectMap; | |
typedef std::map<int, Object*> ObjectPtrMap; | |
class Object { |
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
struct blah { | |
blah() | |
: a(0) // error: uninitialized member ‘blah::<anonymous union>::b’ with ‘const’ type ‘const float’ | |
//, b(0.0f) // error: initializations for multiple members of ‘blah::<anonymous union>’ | |
{} | |
union { | |
int const a; | |
float const b; | |
}; |
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
#include <cstddef> | |
#include <cstdint> | |
#include <cstdio> | |
namespace util { | |
struct funcs; | |
template <typename S> struct mh3_internal; | |
template <typename S, S default_seed> struct mh3; | |
typedef mh3<uint32_t, 0> mh3_default; |
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 Allocator { | |
public: | |
virtual std::size_t get_num_allocations() const=0; | |
virtual std::size_t get_allocation_size(void* p) const=0; | |
virtual void* allocate(std::size_t size, std::size_t align=0)=0; | |
virtual void deallocate(void* p)=0; | |
template<class U, typename ...Args> | |
inline U* construct(Args&&... args) { | |
return new (allocate(sizeof(U), alignof(U))) U(std::forward<Args>(args)...); |
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
--- 33283-t.tex 2012-09-27 14:19:54.131493000 -0400 | |
+++ 33283-t-b.tex 2012-09-27 15:09:31.478376000 -0400 | |
@@ -2545 +2545 @@ | |
-\frac{dy}{dx} = 3a\sqrt{b}x + \frac{3b\sqrt[3]{a}}{x^2}. | |
+\frac{dy}{dx} = 3a\sqrt{bx} + \frac{3b\sqrt[3]{a}}{x^2}. |
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
--- 33283-t.tex 2012-09-28 13:08:13.725523000 -0400 | |
+++ 33283-t-b.tex 2012-09-28 13:10:24.538750000 -0400 | |
@@ -2679 +2679 @@ | |
- {6(1 + a \sqrt[2]{3})^2}. | |
+ {6(1 + a \sqrt[2]{t^3})^2}. |
OlderNewer