node

Java Binary Tree, how to implement Node?

In the tree class I'm suppose to compare two node, for you know searching and adding items. I have some issues with how to make it comparable. When one adds data(generic, anything) to the tree one calls the Tree class which then makes a new Node object. How can I declare the variable data/element in the Node class so that it is of type E...

Drupal's auto node title and node_save?

I am using auto node title which will generate the title of a node. However, this is not happening when I create a node using node_save. See below: function save_contact($firstName, $lastName, $email, $showErrors = false) { global $user; $edit = array(); $edit['type'] = 'contact'; $edit['uid'] = $user->uid; $edit['name'...

Linked list and copy constructor

I'm trying to write a basic, singly-linked list class in C++. I did it in my data structures class years back, but I can't remember the details. Should my Node class have a copy constructor? It has a Node* as a member variable, and as far as I know you're always supposed to write a copy constructor, destructor, and assignment operator f...

C# variable height for nodes in a TreeView

Despite my google efforts, I could not find a solution to use a default .NET treeview and have variable height for each node in that tree view. I need is a way to have 2 types of node with different heights. Ideally, I would also like that one node type can also become bigger as the mouse hover it. Any clever guy around? :) ...

How do I disable the click handler on a YUI Node?

I am wanting to be able to disable the click functionality of a radio button so I can uncheck it. However, when I uncheck it, the click still fires and the end result is a radio that unselects (and modifies other page elements accordingly), and then re-checks because of the onclick event. var clickFunction = function(e, radio, p){ ...

Disabling /node view and other hidden views in Drupal?

Many long nights spent on my site, and now I've started doing all sorts of security checks and stumbled upon the following: www.mysite.com/node That shows the latest x nodes that a user has access to. I DON't want this view visible to users. And I certainly don't want any other views similar to this available. So, my questions are: ...

Swapping Nodes on a single linked list

Trying to make a swapNode function that can take any two nodes and swap them. I've made an algorithm that works if they're at least 2 nodes away, but I can't seem to come up with an algorithm that will work if they are closer to each other. Here's what I wrote so far: void swapNode(call * &head, call * &first, call * &second){ call...

SSRS 2005 treenode as report parameter

Hi, I have report data that belongs to regions in a tree (with infinite levels). What I would want is to allow the user to choose a region (node in the tree), and pass that parameter on to my stored procedure, which will collect appropriate data. I have created some reports with drill-down matrices, which sort of does what I want. I ne...

What Toolchains Support Passing in a Nodeset to an XSLT Transformation as a Parameter?

This is a followup to an answer on a previous question I had about XSLT. To recap, I didn't realize that without EXSLT, XSLT wouldn't let you dynamically create an xpath expression with string values. One of the suggested workarounds was to query the input document's DOM before you execute the transform, and pass the node-set into...

Scheme How To Test 2 Conditions in one Clause ?

I need to create a sub-function that will return me all the adjacent node, which I needed for this question in Scheme. I'm new to scheme, not sure how I can combine two conditions into one test case ? Basically my algorithm is to test if the node is on the edge or not. This case I use a 5x5 grid. If both node is on the corner meaning ...

Scheme How To Return Multiple Values?

I notice that almost all scheme functions can only return one list as output. In the following, I would like to return multiple values of all the adjacent nodes of neighbors. (define (neighbors l w) (if (and (= 1 l) (= 1 w)) (list (and (l (+ 1 w))) (and (+ 1 l) w)))) ; how to output 2 or more values? In this case I'm first t...

xpath select referenced xml node

I need to select a node whose "name" attribute is equal to the current node's "references" attribute. <node name="foo" /> <node name="bar" references="foo" /> I couldn't find a way to express this in XPATH. Any ideas. Ive tried the following: ./node[@name=@references] ./node[@name={@references}] Obviously the above didn't work. I g...

comparing a Node and an Object with a BST data structure

I'm getting a "java.lang.string cannot be cast to node" exception. I thought of converting the localRoot to a string using a provided toString method then comparing them, nut this leaves no concept of 'greater than' or 'less than' which I need to navigate the BST... int computeResult = ((Node<E>)o).compareTo(localRoot); where o is o...

range - how to select new inserted node automatically ?

hi, i have range> newNode = document.createElement("span"); newNode.innerHTML = 'example'; range.insertNode(newNode); i insert new node. is there way, how to automatically select this newNode (as it appears on page, it is not selected) ? thanks. ...

Developing an asset/node based CMS

I'd like to develop a CMS for fun/personal using asset-based architecture rather than page-based (why, is the purpose of this question), but I can't find much information on the subject. All I've found barely scrapes the surface (there's a good chance I'm searching with the wrong terms). An asset-based CMS stores information as blo...

Java tree class's

I'm trying to make my own tree class but keep getting horribly confused. Basically I'm trying to make a weighted tree. I've made the following node class: import java.util.*; public class subdivNode { private int nodevalue; private int nodeID; private List<subdivNode> childnodes; public subdivNode(int value, int id){ nodevalue = ...

How do I surroundContents() around a Document Fragment Node?

I may be asking the impossible, but, how do I surroundContents on a document-fragment node? My thoughts (which I'd appreciate feedback on), are as follows: Is the solution to close the fragmentation? If that's it, is there some way to detect if the starting node and ending node don't have opening and closing tags? I'm running into the...

C# Xml Node to String.

I have a XML document with my data in it, multiple entries for the same node fields (StudentID = FirstName, LastName, etc). How do I convert the nodes into string values for each StudentID section? ...

Drupal Custom Node Form

I want to create an input form for registered user, separated from admin's content creation form. Each submission will create multiple node. To illustrate the case, I will use content type Project, and Review. Project: Title, Description, Owner, Rating. Review: Title, Reviewer, Project, Difficulty I have setup the content types along...

Drupal6: No blog node can be edited - solved

Going to http://www.example.com/node/NID/edit, where NID is any valid nid referring to a node of the story content type, results in the following error: warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'blog_node_form' was given in /home/site/public_html/site2/includes/f...