Skip to content

Instantly share code, notes, and snippets.

View chinmaygarde's full-sized avatar

Chinmay Garde chinmaygarde

View GitHub Profile
-(void) sandbox {
EFDisplay *display = [EFDisplay defaultDisplay];
const EGLint attributes[] = {
EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_NONE, /* termination sentinel */
};
EFSurfaceConfig *config = [display configurationsForAttributes:attributes].firstObject;
NSMutableSet *aSet = [[NSMutableSet alloc] init];
// add NSDictionary objects to aSet
NSDictionary *aDictionary = @{@(1) : @"1"};
[aSet addObject:aDictionary];
// Now test for membership
if ([aSet containsObject:aDictionary]) {
NSLog(@"set contains object");
@chinmaygarde
chinmaygarde / gist:9d7d4c64a7f578d1ec87
Created January 10, 2015 02:51
CFType Subclass Creation Boilerplate Code (Dash Snippet)
#pragma mark - !!class!! structure definition
struct __!!class!! {
CFRuntimeBase _base;
// More stuff goes here
};
#pragma mark - !!class!! core methods
diff --git a/BUILD.gn b/BUILD.gn
index 4e8e540..edf4512 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -495,12 +495,11 @@ component("icuuc") {
# TODO(GYP) support use_system_icu.
if (icu_use_data_file) {
if (is_ios) {
- # TODO(GYP): Support mac resource bundle shown below.
- # 'link_settings': {
class HashCodeBuilder {
int code = 1;
static const int hashPrime = 31;
HashCodeBuilder append(o) => this..code = (hashPrime * code) + o.hashCode;
}
void main() {
print((new HashCodeBuilder()).append(true).append(12.0).code);
print((new HashCodeBuilder()).append(true).append(12.0).code);
diff --git a/DEPS b/DEPS
index 0a6fd25..3422ceb 100644
--- a/DEPS
+++ b/DEPS
@@ -20,7 +20,7 @@
vars = {
'chromium_git': 'https://chromium.googlesource.com',
'dart_svn': 'https://dart.googlecode.com',
- 'skia_revision': '409fd66a5afcef5f165f7ccec7c3473add231752',
+ 'skia_revision': '7b971f0152299ae9a924252a9bfd220318497bdd',
/Volumes/Mojo/mojo/src/third_party/dart-sdk/dart-sdk/bin/dartanalyzer
--url-mapping=dart:mojo.internal,/Volumes/Mojo/mojo/src/mojo/public/dart/sdk_ext/internal.dart
--url-mapping=dart:sky,out/ios_sim_Debug/gen/sky/bindings/dart_sky.dart
--url-mapping=dart:sky.internals,/Volumes/Mojo/mojo/src/sky/engine/bindings/sky_internals.dart
--url-mapping=dart:sky_builtin_natives,/Volumes/Mojo/mojo/src/sky/engine/bindings/builtin_natives.dart
--package-root
out/ios_sim_Debug/gen/dart-pkg/packages
--package-warnings
sky/sdk/example/stocks/lib/main.dart
void main() {
print((10.0).runtimeType);
print((10.1).runtimeType);
print(double.MAX_FINITE);
print((1e3).runtimeType);
print((1.0e3).runtimeType);
print((1e-3).runtimeType);
class Foo {
Foo operator << (_) => new Foo();
Foo operator <= (_) => new Foo();
// For the last case below
Foo operator == (_) => new Foo();
}
main(List<String> arguments) {
var foo = new Foo();
"sky": const LibraryInfo(
"../../../../Volumes/Mojo/mojo/src/out/ios_sim_Debug/gen/sky/bindings/dart_sky.dart",
maturity: Maturity.STABLE),
"sky.internals": const LibraryInfo(
"../../../../Volumes/Mojo/mojo/src/mojo/public/dart/sdk_ext/internal.dart",
maturity: Maturity.STABLE),