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
enum DataType | |
{ | |
None(false, BASE_OPERATOR_TITLE_MAP), // Null or nil is this language. | |
Boolean(false, BASE_OPERATOR_TITLE_MAP), | |
Number(false, BASE_OPERATOR_TITLE_MAP), | |
String(false, BASE_OPERATOR_TITLE_MAP), | |
Date(false, BASE_OPERATOR_TITLE_MAP), | |
StringArray(true, BASE_OPERATOR_TITLE_MAP), // An array of strings | |
Object(false, BASE_OPERATOR_TITLE_MAP), // A catch-all type for objects types. | |
DateTime(false, BASE_OPERATOR_TITLE_MAP), |
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 Foo<T> | |
{ | |
late T value; | |
} | |
void main() { | |
Foo<Object?> foo1 = new Foo<String>(); | |
Foo<Object?> foo2 = new Foo<int>(); |
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
% dart compile js web/main.dart -o /dev/stdout --no-source-maps | |
Almost works, but at the end there is an error: | |
if (typeof dartMainRunner === "function") | |
dartMainRunner(callMain, []); | |
else | |
callMain([]); | |
}); | |
})(); | |
The compiler crashed: FileSystemException: Cannot create file, path = '/dev/stdout.deps' (OS Error: Operation not permitted, errno = 1) |
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
targets: | |
$default: | |
sources: | |
- lib/** | |
- web/** | |
# Note that it is important to include these in the default target. | |
- pubspec.* | |
- $package$ | |
builders: | |
# ----------------------- |
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
abstract class IVisitor<R> { | |
// visitX() methods not declared here, but | |
// on implementing class, so we can add new node types, | |
// without coupling the code calling accept() to that knowledge. | |
} | |
abstract class NodeVisitor<R> implements IVisitor<R> { | |
R visitParen(Node token); | |
} |
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
targets: | |
$default: | |
sources: | |
- lib/** | |
- web/** | |
# Note that it is important to include these in the default target. | |
- pubspec.* | |
- $package$ | |
builders: | |
# ----------------------- |
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
abstract class IDataType | |
{ | |
void render(); | |
} | |
class StringDataType implements IDataType | |
{ | |
@override | |
void render() |
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 Property | |
{ | |
final String foo; | |
const Property(String this.foo); | |
} | |
const Property MARGIN = const Property("margin"); | |
const Property PADDING = const Property("padding"); |
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 LayoutBox { } | |
class RgbColour { } | |
class LayoutProperty<T> | |
{ | |
static final LayoutProperty<LayoutBox> margin = new LayoutProperty<LayoutBox>(); | |
static final LayoutProperty<RgbColour> colour = new LayoutProperty<RgbColour>(); |
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
1) Needs more RAM (swap is 1.6GB often times) | |
2) Disc is getting too full (82%), causing more SSD garbage collection/moving stuff around on disc. | |
3) Not enough cores to handle 100 max_connections -- intrbiz says look at adding cores first as your load average is over core count. | |
4) Application processes stealing CPU from postgres | |
5) Poorly designed queries -- peerce | |
Intrbiz says: Log only slow queries so you can get an idea if it is certain queries which are consistently slow. | |
6) A possible change is that we are getting a lot of concurrent visits putting strain on the system through analytics caused by bots/spam filters visiting all links at once. We have been seeing that this results in a bunch of INSERT queries getting stuck running for many seconds. Do we need to change the isolation level so these INSERT queries can run smoothly concurrently? |
NewerOlder