node

Selecting a node in the nested set model through a not-unique name

Hello, I am trying to manage the retrieval of a node in a nested set model table, not through the unique ID, but through the name (a string), and other nodes within the tree under different parents may be called the same way. As far as now I used an unique ID to get nodes inside the nested sets: SELECT node.name, node.lft, node.r...

node.js Nerve framework unicode response

code: var nerve = require("./nerve"); var sitemap = [ ["/", function(req, res) { res.respond("Русский"); }] ]; nerve.create(sitemap).listen(8100); show in browser: CAA:89 How it should be correct? ...

Selecting a node in Raphael javascript

Hi, the following code mostly works (thanks to a good answer a couple of days ago!) all except for the last little bit: things.square[1].node.setAttribute("id","clicker"); $("#clicker").click(function(){ $("#canvas_things1").fadeOut(); $("#canvas_things2").fadeIn(); }); I think the problem is this line: things.square[1].node....

Most elegant way to find node's predecessors with networkX

I'm working on a graphical model project with python using NetworkX. NetworkX provides simple and good functionality using dictionaries: import networkx as nx G = nx.DiGraph() # a directed graph G.add_edge('a', 'b') print G['a'] # prints {'b': {}} print G['b'] # prints {} I want to use directed graphs because I am coding dependencies ...

Using setAttribute with an array of Raphael paths

When 'things' in the following code is an array of paths... things.square = [ RM.path("m 154.21525,71.431259 74.32805,0 0,70.496711 -74.32805,0 0,-70.496711 z").attr(attr), RM.path("m 271.25132,77.933263 58.07304,0 0,56.409037 -58.07304,0 0,-56.409037 z").attr(attr2) ]; ...then this code does not work: things....

Download Tar File via NodeJS

I have two nodejs http servers, one requests a tar file from the other. It works fine via browser testing, but I can never get the second server to glue the chunks together correctly. My attempts with fwrite has been as useless as this // Receives File var complete_file = ''; response.on('data', function(chunk){ complete_file += chu...

EXT JS custom TreeNodeUI or XTemplate

I'm looking for a way to get a custom template for a node in TreePanel .. i would like to wrap it in a div or something like that. Can abybody help ? ...

Run javascript file in Netbeans/Eclipse?

Is there a way to run a javascript file directly in Netbeans or Eclipse? I feel it's time consuming to fire up a terminal, browse to that file and run it with node all the time. ...

node with multiple images attached (drupal 6.x)

I'm creating a site where user can create a node with multiple images attached. For that matter, I have installed image attach module. I also have view and view slideshow module installed so that user can see the uploaded images attached to this particular node in slideshow style. The problem I'm facing right now is that view does not ...

Suggestions for dealing with `exports` in node.js

Theory: One of the things that appeals to me about node.js is using it as a command line tool. In theory, I can write libraries in Javascript and place them in my ~/.node_libraries directory, and then then I can reuse those libraries. So for instance, I have a text.js in ~/.node_libraries, and it has a bunch of text-related function...

Joyent vs Heroku for Node.js?

Has anyone used both Joyent and Heroku and could share your thoughts about each one of them? First I used Heroku with Rails but since I switched to Node.js in the backend I haven't made up my mind where to host my future node applications. It seems that the best candidates are Joyent and Heroku. Heroku has closed it's Node.js registra...

Node.js on Heroku?

I wonder if all Heroku addons - that are currently working for Rails - will work for Node.js once the support is there? And what is the ETA for the launch of Node.js support? ...

Drupal Views of nodes to show node comments

Hello everybody! I've encountered a Drupal problem: I'm using the Views module for rendering nodes of a kind, based on the user id of it's author (it is a Content Profile actually). I want the view to show the comments for the node, just like in node/%. I could not find any option in views or any relevant module. Am I in the wrong direc...

Module for Saving Drupal node page without "closing"

Is there a Drupal module out there that allows users to save the changes to a node creation form while still keeping the form in the edit mode? If you preview, the node isn't saved, if you save the editing form is closed. ...

In node.js javascript why can't I add to a child function?

game_state = function(){ this.players = function() { this.x = 0; }; } game_state.players['test'] = 1; Why does this fail but game_state['test'] = 1; does not? I'm trying this in node.js in case it wasn't clear. Thanks for any help. ...

Differences between Narwhal and Node.js?

I'm new to Node.js and I have been reading about Narwhal that is a framework based on Rhino. My questions: If I'm using Node.js, should/could I use Narwhal and it's libraries/modules? Aren't the libraries/modules in Narwhal IO-blocked (why Node.js got this huge popularity)? Is Node.js only for creating Web servers or is it for creatin...

Jake on Node.js?

From what I have understood Jake (Rake equivalent for Javascript) is based on Rhino. Does this mean that I cannot use it with Node.js? ...

Creating modules to be required in other files in Javascript?

In Node.js I can use a module like this: sys = require("sys"); How do I create my own module like "sys" so that I can require it from other files? ...

Difference between console.log and sys.puts in node.js?

In node.js you can use console.log or sys.puts to print out to the screen. What is the preferred method and what is the difference between these? ...

Development VPS where environment (Ruby/Rails, Javasciprt/Node.js etc) is pre-installed?

Until now I'm setting up my own development environment with Vagrant/VirtualBox/Chef (Ruby). I wonder if there is a hosting company that provides pre-configured VPS for... Ruby/Rails Javascript/Node ...letting me just choose what I want to have installed and also which linux packages I would like to install in each VPS. Are there h...