node

enable tinyMce on all the node except one.

node/* user/* comment/* This is what i am using to enable tinyMCE drupal on particular pages. Now what i am looking for is to apply on all the NODES except the one having id (eg 100). How can i do that. ...

Nodejs proxy script, not working with mod_deflate

Hi Folks, I created a little proxy node script, which looksup the request.url and either passes a request to my apache server or uses node to process/response to this request. I have been successful so far, everything works fine, but when I enable mod_deflate for the apache, "strange things will happen". It looks like node just "cancel...

Check if xml node exists in PHP

I have this simplexml result object: object(SimpleXMLElement)#207 (2) { ["@attributes"]=> array(1) { ["version"]=> string(1) "1" } ["weather"]=> object(SimpleXMLElement)#206 (2) { ["@attributes"]=> array(1) { ["section"]=> string(1) "0" } ["problem_cause"]=> object(SimpleXMLElement)#94 (1) { ["@attr...

flex tree node types

hi, i have a tree of nodes that i dont want some type of nodes to appear in the tree, i can check the data on tree item renderer for each specific node type, so i have one type that i dont want it to be shown as tree node, like it doesn't exist. if(this.data.type == TypeEnum.id){ this.visible=false; this.height ...

Bring node field (event_date) data into ubercart

I need to be able to bring an Event_Date field into the checkout box in Ubercart. ...

Calling a function with variable number of arguments with an array in C++ (like python's * operator)

Hello world! I'm trying to write a v8 module in C++; there, the functions receive a variable number of arguments in an array. I want to take that array and call a function like gettext and printf that receives a formatted string and it's necessary args. The thing is, how can one take an array and send the elements as arguments to one of...

Bring field content from "parent" node to "child" node in Drupal

What I need to do is bring data from a field in a "parent" node to a "child" node. Something like the following: $myactive_trail = menu_get_active_trail(); $parent = $myactive_trail['2']['link_path']; print $parent->field_video['0']['filepath']; I know that there is not such thing as a parent not hence me trying to use menu_get_active...

how to get values inside an xml column, when it's of type nvarchar.

My question is similar to this one: http://stackoverflow.com/questions/3061804/choose-a-xml-node-in-sql-server-based-on-max-value-of-a-child-element except that my column is NOT of type XML, it's of type nvarchar(max). I want to extract the XML node values from a column that looks like this: <Data> <el1>1234</el1> <el2>Something</el2> ...

How to select the grandparent of a node using xslt

I'm in a situation where I can only test for the child node, but I have to apply tags to the grandparent of this child node. I've tried using: <xsl:call-template name="grandparent" select="parent::parent::node()"/> and: <xsl:call-template name="grandparent" select="ancestor::node [@nameofgrandparentnode]"/> But neither works. Th...

Xslt1.0: passing a node paramter rom a template to another template

I am trying to pass a node as a parameter from a named template to another named template but it doesn't work. It works in the first one, but not in the second level call. It complains about trying to convert from java.lang.String to node-set. I am using xslt1.0. Any ideas? Thanks <xsl:template match="whatever"> <xsl:call-templat...

What is a fast algorithm for finding critical nodes?

I'm looking for a quick method/algorithm for finding which nodes in a graph is critical. For example, in this graph: Node number 2 and 5 are critical. My current method is to try removing one non-endpoint node from the graph at a time and then check if the entire network can be reached from all other nodes. This method is obvious not...

CMS based on NodeJS?

Been looking around fora simple cms framework based on NodeJS. There is of course the option to laod the html, json and images all client side into the page. So the CMS is running client side. SEO might be a little screwed up. But its 2010 so why not ?? ...

xslt select grandparent node depending on an attribute value of its grandchild node

I'm trying to add different tags to a node depending on an attribute value of its grandchild node. Sample Input (a 1x3 table): <table> <row> <cell row="1" column="1" >heading text one</cell> </row> <row> <cell row="2" column="1" >body text one</cell> </row> <row> <cell row="3" column="1" >bo...

[jQuery] NOD name for VALUE?

Hey. I've a few inputs and I want to clear their values after clicking. How to? <input type="text" value="Name" /> I've tried: $(this).inputValue(""); But it doesn't work. If I'm unable to change the value, how to add text to the input ($(this).text(""); works very well in, for example, textareas). Thanks! ...

Cannot understand node.js.

Hi, From someone with few experience in JS, what do you recommend for learning Node.js? I read a lot in the forum about event driven, non-blocking , async, callbacks, etc but I don't know what's that! Where can I learn the basics in order to understand all that terms and in the future, node.js? Thanks! ...

Node.js base64 encode a downloaded image for use in data URI

Using Node v0.2.0 I am trying to fetch an image from a server, convert it into a base64 string and then embed it on the page in an image tag. I have the following code: var express = require('express'), request = require('request'), sys = require('sys'); var app = express.createServer( express.logger(), express.bodyDecoder() );...

Best way to graphically represent a tree node in Qt

Hello, I'm trying to visualise a tree in Qt. So far, all my nodes consist of simple circles and based on QGraphicsItem class. But I need to display some text over every node, how can I "attach" a QLabel to my nodes? Thanks in advance. ...

XQuery wrap result in computed node

Hi I am trying to do some simple pagination in XQuery. I would like my root element of the returned XML to have (as attributes) various properties about the pagination (current page etc). However I can't seem to find a way to add these dynamic attributes to my root element. I've tried playing with the element name {expr} and attribute ...

set attribute of xml node to a variable

I am trying to get the value of an attribute of an XML node and set it as a variable using JQuery. Is this possible? <DataContainer> <Customers> <Customer customerId="7366" customerName="Boardwalk Audi" url="" address="5930 West Plano Pkwy" city="Plano" state="Texas" zipCode="75093" latitude="33.01...

How do you set up npm (node package manager) without root access?

Setting npm up as the root user is straighforward and workds. Except you have to run npm commands as root (not recommended). So I thought I'd try setting it up as a non-root user. According to npm documentation, a non-root user without root access can set up npm by: creating a .npmrc file with root, binroot, and manroot pointing to...