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
package org.waveprotocol.wave.model.export; | |
import org.waveprotocol.wave.model.conversation.Conversation; | |
import org.waveprotocol.wave.model.conversation.ConversationBlip; | |
import org.waveprotocol.wave.model.conversation.ConversationView; | |
import org.waveprotocol.wave.model.conversation.TitleHelper; | |
import org.waveprotocol.wave.model.conversation.WaveBasedConversationView; | |
import org.waveprotocol.wave.model.conversation.WaveletBasedConversation; | |
import org.waveprotocol.wave.model.document.util.LineContainers; | |
import org.waveprotocol.wave.model.document.util.XmlStringBuilder; |
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 arr = [] | |
for (var i = 0; i < 100000; i++) { | |
arr.push(i+1); | |
} | |
// This is what the coffeescript compiler produces for 'sum += arr[x] for x in [arr.nexts.length - 1..0]' | |
var coffee = function() { | |
var x, _ref, sum = 0; | |
for (x = _ref = arr.length - 1; _ref <= 0 ? x <= 0 : x >= 0; _ref <= 0 ? x++ : x--) { |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Wave textbox test page</title> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
width: 800px; | |
margin: auto; | |
} |
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
# A synchronous processing queue. The queue calls process on the arguments, | |
# ensuring that process() is only executing once at a time. | |
# | |
# process(data, callback) _MUST_ eventually call its callback. | |
# | |
# Example: | |
# | |
# queue = require 'syncqueue' | |
# | |
# fn = queue (data, callback) -> |
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
<script> | |
var arr = []; | |
for (var i = 0; i < 100000; i++) { | |
num = Math.floor(Math.random() * 4147483648) - 2147483648 ; | |
if(num <= 0) { | |
num--; | |
} | |
arr.push(num); |
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
type = require './src/text' | |
fs = require 'fs' | |
assert = require 'assert' | |
check = (ops, check) -> | |
for {doc, op1, op2, result} in ops | |
op1_ = type.transform op1, op2, -1 | |
op2_ = type.transform op2, op1, 1 | |
op12 = type.compose op1, op2_ |
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
// | |
// text-tp2.h | |
#import <Foundation/Foundation.h> | |
//typedef struct { | |
// NSString *str; | |
// int num_tombs; | |
// int tombs[]; | |
//} Doc; |
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
request = (url, options, callback) -> | |
if typeof options is 'function' | |
[options, callback] = [{}, options] | |
options = {} | |
options.url = url | |
options.success = (obj) -> | |
callback(null, obj) | |
options.error = (err) -> | |
if err then callback(err) else callback(true) |
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
handler = new goog.net.BrowserChannel.Handler() | |
handler.channelOpened = (channel) => | |
document.body.innerHTML += '<p>Connected</p>' | |
errors = | |
2: 'request failed' | |
6: 'unknown session id' | |
handler.channelError = (channel, error) => |
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
faye = require 'faye' | |
client = new faye.Client 'http://josephgentle.com:4321/bayeux' | |
client.subscribe '/msg', (message) -> | |
console.timeEnd message | |
.callback -> | |
console.log 'Connected!' | |
seq = 0 |
OlderNewer