node

In a graph, how to find the nearest node to a group of nodes?

Hello, I have an undirected, unweighted graph, which doesn't have to be planar. I also have a subset of graph's nodes (true subset) and I need to find a node not belonging to the subset, with minimum sum of distances to all nodes in the subset. So far, I have implemented breath-first search starting from each node in the subset, and th...

jquery how to access the an xml node by index?

Hi, say I've an xml returned from server like this: <persons> <person> <firstname>Jon</firstname> </person> <person> <firstname>Jack</firstname> </person> <person> <firstname>James</firstname> </person> </persons> If I want to access the 3rd ...

XML Node replacement in Actionscript 3

Hi, A couple of days ago I asked a question about how to replace and edit values in an xml file with c#. The question got a great answer. Now I wonder how to do this in Actionscript and if there is an as simple way as in c#. The question can be found here: http://stackoverflow.com/questions/2856459/advanced-replace-in-c Thanks ...

.NET TreeView causes application to crash when trying to check Parent node

I have a TreeView with check boxes, and when a user checks a child node, I want to go up the tree and check each parent. However, for some reason my application blows up whenever I touch the parent node. For the nodes in my tree, I've extended TreeNode to create my own objects with some data that I need to store in them, but I still r...

Deleting first and last element of a linked list in C

struct person { int age; char name[100]; struct person *next; }; void delfirst(struct person **p)// For deleting the beginning { struct person *tmp,*m; m = (*p); tmp = (*p)->next; free(m); return; } void delend(struct person **p)// For deleting the end { struct person *tmp,*m; tmp=*p; w...

How do I put a custom version of node/add form in a view using customfield in drupal 6?

Hi, I'm trying to add a pre-filled 'add reply' form to a view of nodes. Reply is a content-type (reply) with certain fields that need to be prefilled based on what is in the view. This way a user can see only the selected fields from the node/add/reply. At the moment I'm building the forms manually - copy the form from node/add, do som...

Remove all nodes from xml excluding specific nodes using XSLT

Hi, I have a bunch of xml files with a varying amount of data nodes in them and I want to change the files using XSLT to include only specific nodes. Example: <?xml version="1.0" encoding="UTF-8"?> <SomeName> <identifier> <UID> 1234 </UID> </identifier> <MainNode1> <SubNode1> <Subnode1a>DATA1a0</Subnode1a> ...

How can I find a text node in the live DOM using its copy/clone?

I've copied some text nodes from the page (i.e., live DOM) and have stored them in an array. Is it possible to locate those exact nodes again in the live DOM? I would need to use plain JavaScript. This is basically how my project works: A configuration object specifies sections of the page (using CSS selectors) where there is some tex...

why toString method does not work here??

Hi this is my whole class ,I have added number 2 to the doubly linked list and then I want it to be be print in the concole but it will show this "datastructureproject.Node@f62373" thanks! package datastructureproject; public class DoublyLinkedList { private Node head = new Node(0); private Node tail = new Node(0); private int length =...

How to specify the equivalent of ppn (on PBS) in SGE queuing system ?

Hello All, Is there a way to specify the ppn ( or equivalent ) in SGE ? i don't want to use all cpus in one node so i will be able to have more memory per core. ( In PBS you would do -l nodes=16:ppn=2 for exemple) Thanks. ...

Drupal 6: Drupal Themer gives same candidate name for different type of content types

Hi friends, I'm a drupal newbie... I have different type of contents like News, Events, etc. and their content is different. News detail page has title-content text-date. but Events detail page has title-date-content text-location-speaker-etc. So I need different layout page for these different types. So, I enabled Drupal Themer to get...

Drupal 6: getting particular fields from Node Reference types...

Hi friends, I'm a drupal newbie... <?php print $node->field_date[0]['view']; ?> I can get the custom created CCK fields' value and display in tpl.php files as above... that's fine. my question is how can I get the Node reference fields' in-fields? for example, I have an event content type, and I have defined Node Reference for Locat...

Building a service for a Drupal site to duplicate a node to another Drupal site in a multi-site setup

I'm trying to set up one of my Drupal sites to push a node to another Drupal site in a multi-site configuration. It looks like I need to do this with services somehow, but I can't find any tutorials out there and I need at least to be pointed in the right direction. What I believe I need is set up Services on the receiving site to accept...

Jtree And Jpanel on JSplitpane

i want to display different Jpanel when different node is selected just like in a fileBrowser.My Jpanel has button controls.am using TreeselectionListerner and defaultMutableTreeNode.how can i display different panel for nodes in the same depth.each node corresponds to different objects .everyTime i create a node i pass the userObject ...

how to set the name of the node using userobjects

How to set the node text.Here is the code am using public TreeCreation(final ArrayList houseList){ Apartment= new DefaultMutableTreeNode("Apartment"); for(int i=0;i by passing the userObject the name of the object is being displayed on the node ,how do i change the code to display h.HouseName when am using userObjects node.getUserO...

Drupal - How to display N nodes of a type X?

How to display N nodes of a type X? ...

Node.js for lua?

I've been playing around with node.js (nodejs) for the past few day and it is fantastic. As far as I can tell, lua doesn't have a similar integration of libev and libio which let's one avoid almost any blocking calls and interact with the network and the filesystem in an asynchronous manner. I'm slowly porting my java implementation to ...

Options for displaying OG groups a node is published for on node page?

What I want I have several OG groups in which content can be published. I would like to display which OG groups a node has been published for when viewing the node page. Like in "This page is published for: Department A, Department B." The code snipped below shows the data I have in the $node object in node.tpl.php. This data is gener...

Using nodereference + views to create combined view

I'm trying to set up a relational View but not sure how to do it. Here's an example of what I'm going for using the node types Artist and Song. Artist Song Length Bob Dylan Like a Rolling Stone 2:00 Bruce Springsteen Atlantic City 4:00 Burce Springsteen Born to Run ...

JTree create new file make it selected

I want to make it like when I click a button, it will create a new file. Then the jTree will highlight the new file. Below are my code. Currently I create new file, i will show the new file but no highlight the file. class FileTreeModel implements TreeModel { private FileNode root; public FileTreeModel(String directory) { root = ne...