I want to use YUI inside of a WebWorker thread. Flickr recently wrote a post on this very topic, Web workers and YUI.
But I want to use YUI's CDN, which WebWorkers prevent because it enforces a same-origin policy with importScripts()
from twisted.web.iweb import IBodyProducer | |
from twisted.internet import defer | |
from twisted.web.client import Agent | |
from twisted.web.http_headers import Headers | |
import urllib | |
class StringProducer(object): | |
implements(IBodyProducer) | |
def __init__(self, body): |
/* | |
Some simple Github-like styles, with syntax highlighting CSS via Pygments. | |
*/ | |
body{ | |
font-family: helvetica, arial, freesans, clean, sans-serif; | |
color: #333; | |
background-color: #fff; | |
border: none; | |
line-height: 1.5; | |
margin: 2em 3em; |
int servopin = 12; | |
int neckservo = 9; | |
int servo_position = 2300; | |
int neck_position = 2400; | |
int i; | |
int fetchPos; | |
int total = 0; | |
int average = 0; | |
// for serial communication |
YUI.add('tdp-autoview', function(Y) { | |
var NS = Y.namespace('TDP'), | |
View = Y.Base.create('tdpAutoView', Y.View, [], { | |
render : function() { | |
this.findViews(); | |
return this; | |
}, |
I want to use YUI inside of a WebWorker thread. Flickr recently wrote a post on this very topic, Web workers and YUI.
But I want to use YUI's CDN, which WebWorkers prevent because it enforces a same-origin policy with importScripts()
From https://gist.github.com/3050224
From http://blog.smartcore.net.au/smartos-the-basics/
var myDataValues = [ | |
{day:"Monday", taxes:2000}, | |
{day:"Tuesday", taxes:50}, | |
{day:"Wednesday", taxes:4000}, | |
{day:"Thursday", taxes:200}, | |
{day:"Friday", taxes:2000} | |
], | |
getDonutChart = function(cfg) | |
{ | |
var pieGraph = new Y.Chart(cfg), |
A future version of Ember will come with a new templating engine known as HTMLBars.
The original motivation for HTMLBars was to allow helpers and properties to have better contextual information about what they were bound to.
So for example, consider a template like this:
MDB is unlike most debuggers you've experienced.
It is not a source level debugger like gdb or lldb or even Node's builtin debugger
Generally used for postmortem analysis.
Postmortem is for Production and Development
We operate mostly on core files, though you can attach to running processes as well.
// URL of the endpoint we're going to contact. | |
NSURL *url = [NSURL URLWithString:@"http://localhost:8080/my.json"]; | |
// Create a simple dictionary with numbers. | |
NSDictionary *dictionary = @{ @"numbers" : @[@1, @2, @3] }; | |
// Convert the dictionary into JSON data. | |
NSData *JSONData = [NSJSONSerialization dataWithJSONObject:dictionary | |
options:0 | |
error:nil]; |