Skip to content

Instantly share code, notes, and snippets.

// Example code by plato demonstrating fs and async
// Before running this: Create a file foo.txt in the same directory as this
// Additionally, run npm install async
var async = require('async');
var fs = require('fs');
handleimg = function(callback){
var raft={}; // to float down the waterfall
raft.meta = {size:50, name:"foo.txt"};
async.waterfall(
@therealplato
therealplato / nano_.js
Created June 4, 2012 16:57
leading underscore in documents fails nano's validation
nano = require('nano')('http://localhost:5984');
nano.db.create('underscore', function(err){
data = {foo:'bar', _ISNEW:true};
couchdb = nano.use('underscore');
couchdb.insert(data, function(err,body) {
console.log('err:\n'+err+'\nbody:\n'+body);
console.log('JSON.stringify(err):\n'+JSON.stringify(err,null,2));
});
});
JReviews user form creation problem
I'm debugging a Joomla site that uses JReviews to store user reviews. The JReviews code has apparently been modified into a broken state.\
User forms are not being saved to the database when the user clicks Submit at the bottom of the form. I'm not sure if the server is receiving the data.
I'm using JReviews 2.3.12.203 and PHP 1.5. Unfortunately I'm running on godaddy hosting so I don't have access to php console error logs.
Details:
I have an index.html loading kinetic-v3.8.3.js, hexlib.js and perspective.js in that order
I am trying to segregate the mathematics of a hex grid in my hexlib.js file, while keeping the code to draw hexes in perspective.js
I am trying to access a function that is defined in hexlib.js from perspective.js but I have screwed it up. Here is the trace yielded by Firebug:
error in perspective.js (line 33)
Sexy is not defined
[Break On This Error]