This file contains hidden or 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
App.adviceListController = SC.ArrayController.create({ | |
sourceRoot: function() { | |
var groups = {}, headings = [], group, adviceAry, ret ; | |
var source = this.get('content') ; | |
if (!source) return null ; | |
source.forEach(function(advice) { | |
if (group = advice.get('group')) { | |
adviceAry = groups[group] ; |
This file contains hidden or 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
SC.Request.putUrl(this._appendQueryString(url, params)) | |
.notify(this, this._response, { | |
query: query, | |
selection: selection, | |
mailbox: mailbox, | |
folder: folder, | |
read: flag | |
}) | |
.set('isJSON', YES) | |
.send() ; |
This file contains hidden or 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
_response: function(request, userData) { | |
var json = request.get('response') ; | |
Refresher.processJson(json, { | |
query: userData.query | |
}); | |
}, |
This file contains hidden or 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
/** @private */ | |
_appendQueryString: function(url, params) { | |
// very simple, does not handle arrays or objects, just takes a hashes of simple values | |
var name, queryString = [] ; | |
for (name in params) { | |
if (params.hasOwnProperty(name)) { | |
queryString.push("%@=%@".fmt(name,params[name])); | |
} | |
} | |
return [url, queryString.join('&')].join('?') ; |
This file contains hidden or 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
r = Redis.new(opts) | |
r.lpush("srckey","bar") | |
r.rpoplpush("srckey","newkey") | |
# srckey is now an empty list | |
r = Redis.new(opts) | |
puts r.del("newkey") | |
# newkey no longer exists | |
puts r.rpoplpush("srckey","newkey").inspect | |
The buggy output is: |
This file contains hidden or 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
var | |
PARALLEL_CONNECTS = 10, | |
http = require('http'), | |
sys = require('sys'), | |
connectionCount = 0, | |
messageCount = 0; | |
lastMessages = 0; | |
function addClient() { |
This file contains hidden or 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
[true,[0,161741,124,1456,120,1455,121,1455,-1,2,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112,1,,112 |
This file contains hidden or 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
/* @license | |
========================================================================== | |
SproutCore Costello -- Property Observing Library | |
Copyright ©2006-2009, Sprout Systems, Inc. and contributors. | |
Portions copyright ©2008-2009 Apple Inc. All rights reserved. | |
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, |
This file contains hidden or 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
function Program(str){ | |
var tbl=[],pos=0,l=str.length+1;while(l--)tbl.push([]);l=str.length; | |
function Program(a){var x,p=pos,c;if(x=tbl[p][0]){pos=x[1];a.push([p,0]);return 1}if(x==false){return 0}c=[];return fin(c,p,0,_Program(c),a)} | |
function FunctionBody(a){var x,p=pos,c;if(x=tbl[p][1]){pos=x[1];a.push([p,1]);return 1}if(x==false){return 0}c=[];return fin(c,p,1,_FunctionBody(c),a)} | |
function FunctionDeclaration(a){var x,p=pos,c;if(x=tbl[p][2]){pos=x[1];a.push([p,2]);return 1}if(x==false){return 0}c=[];return fin(c,p,2,_FunctionDeclaration(c),a)} | |
function FunctionExpr(a){var x,p=pos,c;if(x=tbl[p][3]){pos=x[1];a.push([p,3]);return 1}if(x==false){return 0}c=[];return fin(c,p,3,_FunctionExpr(c),a)} | |
function FormalParameterList(a){var x,p=pos,c;if(x=tbl[p][4]){pos=x[1];a.push([p,4]);return 1}if(x==false){return 0}c=[];return fin(c,p,4,_FormalParameterList(c),a)} | |
function UseStrictDirective(a){var x,p=pos,c;if(x=tbl[p][5]){pos=x[1];a.push([p,5]);return 1}if(x==false){return 0}c=[];return fin(c,p,5,_UseStrict |
This file contains hidden or 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
function Program(str){ | |
var tbl=[],pos=0,l=str.length+1;while(l--)tbl.push([]);l=str.length; | |
function Program(a){var x,p=pos,c;if(x=tbl[p][0]){pos=x[1];a.push([p,0]);return 1}if(x==false){return 0}c=[];return fin(c,p,0,_Program(c),a)} | |
function FunctionBody(a){var x,p=pos,c;if(x=tbl[p][1]){pos=x[1];a.push([p,1]);return 1}if(x==false){return 0}c=[];return fin(c,p,1,_FunctionBody(c),a)} | |
function FunctionDeclaration(a){var x,p=pos,c;if(x=tbl[p][2]){pos=x[1];a.push([p,2]);return 1}if(x==false){return 0}c=[];return fin(c,p,2,_FunctionDeclaration(c),a)} | |
function FunctionExpr(a){var x,p=pos,c;if(x=tbl[p][3]){pos=x[1];a.push([p,3]);return 1}if(x==false){return 0}c=[];return fin(c,p,3,_FunctionExpr(c),a)} | |
function FormalParameterList(a){var x,p=pos,c;if(x=tbl[p][4]){pos=x[1];a.push([p,4]);return 1}if(x==false){return 0}c=[];return fin(c,p,4,_FormalParameterList(c),a)} | |
function UseStrictDirective(a){var x,p=pos,c;if(x=tbl[p][5]){pos=x[1];a.push([p,5]);return 1}if(x==false){return 0}c=[];return fin(c,p,5,_UseStrict |