Skip to content

Instantly share code, notes, and snippets.

View erichocean's full-sized avatar

Erich Ocean erichocean

  • Xy Group Ltd
  • North Carolina
View GitHub Profile
@erichocean
erichocean / issues.html
Created April 14, 2010 04:36
issues.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Hub Issues Tracker Demo</title>
<style type="text/css" media="screen">
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="hub.js"></script>
/*
Copyright (c) 2009 Alexander Teinum
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Hub Issues Tracker Demo</title>
<style type="text/css" media="screen">
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="hub.js"></script>
//
// Model layer
//
// Namspace and API
Issues = hub.Object.create({
store: hub.Hub.create({
uti: 'com.hub.demo.web',
commitRecordsAutomatically: true
Created by
----------
In our schema, we'd like to know who created a specific ``Task``. In hub.js,
users are represented as instances of the ``hub.User`` class (or a subclass),
and there is an API call to get the ``hub.User`` that created a particular
record, so we'll create a computed property that calls that::
TaskList.Task = hub.Record.extend({
isDone: hub.attr(Boolean, { default: false }),
hub.attr = hub.Record.attr ;
hub.toOne = hub.Record.toOne ;
hub.toMany = hub.Record.toMany ;
// ==========================================================================
// Project: hub.js - cloud-friendly object graph sync
// Copyright: ©2010 Erich Ocean.
// Portions ©2006-2009 Sprout Systems, Inc. and contributors.
// Portions ©2008-2009 Apple Inc. All rights reserved.
// License: Licensed under an MIT license (see license.js).
// ==========================================================================
/*global hub */
/**
From 43ed2e9f37751e8ab43a4036186638f19fdcdf7e Mon Sep 17 00:00:00 2001
From: Erich Ocean <[email protected]>
Date: Thu, 12 Aug 2010 15:25:52 -0700
Subject: [PATCH] initial ptex support
---
src/liboslexec/master.cpp | 8 ++++
src/liboslexec/optexture.cpp | 95 ++++++++++++++++++++++++++++++++++++++++++
src/liboslexec/osl_ptex.h | 66 +++++++++++++++++++++++++++++
src/liboslexec/oslexec_pvt.h | 25 +++++++++++
didUpdateLayer: function() {
var elem = this.$('canvas'),
ctx = elem[0].getContext("2d"),
width = this.$().width(),
height = this.$().height(),
loc = this.get('anchorLocation'),
ploc, color, x, y, tmp;
// adjust size as needed...
if (Number(elem.attr('width')) !== width) elem.attr('width', width);
/**
Invokes the callback for each index. Otherwise works just like regular
forEach().
@param {Function} callback
@param {Object} target
@returns {SC.IndexSet} receiver
*/
forEachIndex: function(callback, target) {
var content = this._content,