Search Results

Search found 2725 results on 109 pages for 'nodes'.

Page 6/109 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Multiple munin-nodes per machine

    - by Alexander T
    I'm collecting statistics remotely through JMX. The munin JMX plugin allows you to select an URL to connect to when aggregating statistics. This allows me to collect statistics from hosts which do not actually have munin-node installed. I find this a desirable property for some systems where I am hindered to install munin-node. How I work today is that if i want to collect JMX stats from machine A without munin-node, I install munin-node on machine B. Machine B then collects data from A via JMX, and reports it to munin-server, which runs on machine C. This setup requires multiple B-type machines: one per C-type machine. I would like to avoid this and instead use only one B-type machine to collect the data from all A-type machines and reports it to the only munin-server (C-type machine). As far as I understand this requires running multiple munin-nodes on B or in some other way report to munin-server that the B-type machine is reporting data from multiple sources. Is this possible? Thank you.

    Read the article

  • Network topology for both direct and routed traffic between two nodes

    - by IndigoFire
    Despite it's small size, this is the most difficult network design problem I've faced. There are three nodes in this network: PC running Windows XP with an internal WiFi adapter.Base station with both WiFi and a Wireless Modem (WiModem)Mobile device with both WiFi and WiModem The modem is a low-bandwidth but high-reliability connection. We'd like to use WiFi for high-bandwidth stuff like file transfers when the mobile is nearby, and the modem for control information. Here's the tricky part: we'd like the wifi traffic to go directly from the mobile to the PC, as rebroadcasting packets on the same WiFi channel takes up double the bandwidth. We can do that with a manual configuration by giving the both the PC and the base station two IP addresses for their WiFi interfaces: one on a subnet shared with the mobile, and one on their own subnet. The routes on the PC are set up so that any traffic going to the mobile via WiModem goes through the secondary IP address so that return traffic from the mobile also goes through the WiModem. Here's what that looks like: PC WiFi 1: 192.168.2.10/24 WiFi 2: 192.168.3.10/24 Default route: 192.168.2.1 Base Station WiFi 1: 192.168.2.1/24 WiFi 2: 192.168.3.1/24 WiModem: 192.168.4.1/24 Mobile WiFi: 192.168.3.20/24 WiModem: 192.168.4.20/24 We'd like to move to having the base station automatically configure the mobile and PC, as the manual setup is problematic when you start having multiple mobiles and PCs. This means that the PC can only have 1 IP address and needs to be treated as being pretty simple. Is it possible to have a setup driven by DHCP on the base station that is efficient with bandwidth?

    Read the article

  • Re-ordering child nodes in django-MPTT

    - by Dominic Rodger
    I'm using Ben Firshman's fork of django-MPTT (hat tip to Daniel Roseman for the recommendation). I've got stuck trying to re-order nodes which share a common parent. I've got a list of primary keys, like this: ids = [5, 9, 7, 3] All of these nodes have a parent, say with primary key 1. At present, these nodes are ordered [5, 3, 9, 7], how can I re-order them to [5, 9, 7, 3]? I've tried something like this: last_m = MyModel.get(pk = ids.pop(0)) last_m.move_to(last_m.parent, position='first-child') for id in ids: m = MyModel.get(pk = id) m.move_to(last_m, position='right') Which I'd expect to do what I want, per the docs on move_to, but it doesn't seem to change anything. Sometimes it seems to move the first item in ids to be the first child of its parent, sometimes it doesn't. Am I right in my reading of the docs for move_to that calling move_to on a node n with position=right and a target which is a sibling of n will move n to immediately after the target? It's possible I've screwed up my models table in trying to figure this out, so maybe the code above is actually right. It's also possible there's a much more elegant way of doing this (perhaps one that doesn't involve O(n) selects and O(n) updates). Have I misunderstood something? Bonus question: is there a way of forcing django-MPTT to rebuild lft and rght values for all instances of a given model?

    Read the article

  • Read Parent nodes only from XML using LINQToXML

    - by ItsMeSri
    I have XML string that has parent nodes "Committee" and inside that another child node "Committee" is there. When I am using "from committee in xDocument.DescendantsAndSelf("Committee")" it is reading childnode also, but I don't want to read child nodes, I just want to read Parent nodes only. <Committee> <Position>STAFF</Position> <Appointment>1/16/2006</Appointment> <Committee>PPMSSTAFF</Committee> <CommitteeName>PPMS Staff</CommitteeName> <Expiration>12/25/2099</Expiration> </Committee> <Committee> <Position>STAFF</Position> <Appointment>4/16/2004</Appointment> <Committee>PMOSSTAFF</Committee> <CommitteeName>PPMS </CommitteeName> <Expiration>12/25/2099</Expiration> </Committee> XElement xDocument= XElement.Parse(xml); var committeeXmls = from Committee in xDocument.Descendants("Committee") select new { CommitteeName = Committee.Element("CommitteeName"), Position = Committee.Element("Position"), Appointment = Committee.Element("Appointment"), Expiration = Committee.Element("Expiration") }; int i = 0; foreach (var committeeXml in committeeXmls) { if (committeeXml != null) { drCommittee = dtCommittee.NewRow(); drCommittee["ID"] = ++i; drCommittee["CommitteeName"] = committeeXml.CommitteeName.Value; drCommittee["Position"] = committeeXml.Position.Value; drCommittee["Appointment"] = committeeXml.Appointment.Value; drCommittee["Expiration"] = committeeXml.Expiration.Value; dtCommittee.Rows.Add(drCommittee); // educationXml.GraduationDate.Value, educationXml.Major.Value); } }

    Read the article

  • How can I remove duplicate nodes in XQuery?

    - by Brabster
    I have an XML document I generate on the fly, and I need a function to eliminate any duplicate nodes from it. My function looks like: declare function local:start2() { let $data := local:scan_books() return <books>{$data}</books> }; Sample output is: <books> <book> <title>XML in 24 hours</title> <author>Some Guy</author> </book> <book> <title>XML in 24 hours</title> <author>Some Guy</author> </book> </books> I want just the one entry in my books root tag, and there are other tags, like say pamphlet in there too that need to have duplicates removed. Any ideas? Updated following comments. By unique nodes, I mean remove multiple occurrences of nodes that have the exact same content and structure.

    Read the article

  • XML: Check if anything exists between two nodes

    - by sebastian
    Hi there, I need to find out if anything exists between two nodes. My XML looks like this: <event value1="1" value2="2" value3="3" <info="some info here"/> Line 1.</lb> Line 2.</lb></lb> Line 3.</lb> Line 4.</lb> </event> My goal is to convert the </lb> nodes to </br> HTML tags using XSLT. There is one additional requirement to fulfill though. In case there is one </lb> directly following another </lb> I want to output only one </br>. My XSLT looks like this: <xsl:template match="lb"> <xsl:if test="not(preceding-sibling::lb[1])"> <br/> </xsl:if> </xsl:template> The problem with the XSLT above is that it works correctly for line 1 only as the text between both nodes is ignored. Maybe someone here can help.

    Read the article

  • what dataprovider in flex (aside from ArrayCollection) will work for single, non-repeating XML nodes

    - by Rees
    hello, i asked this question before but haven't been able to get an answer.. i get the following error when i retrieve an XML that only has 1 node (no repeating nodes) from a PHP page and i try to store in an ArrayCollection. -When I have MORE than 1 "name" nodes...i do NOT get an error. TypeError: Error #1034: Type Coercion failed: cannot convert "XXXXXX" to mx.collections.ArrayCollection. this error occurs as the line of code: myList= e.result.list.name; I'm using this ArrayCollection as a dataprovider for a Component -is there an alternative I can use that will take BOTH single and repeating nodes as well as work as a dataprovider? Thanks in advance! code: [Bindable] private var myList:ArrayCollection= new ArrayCollection(); private function getList(e:Event):void{ var getStudyLoungesService:HTTPService = new HTTPService(); getStuffService.url = "website.com/asdf.php"; getStuffService.addEventListener(ResultEvent.RESULT, onGetList); getStuffService.send(); } private function onGetList(e:ResultEvent):void{ myList= e.result.list.name; }

    Read the article

  • Retrieve specific preceding sibling nodes attributes

    - by Matthieu BROUILLARD
    Is there an XPath way of recovering directly one specific attribute of preceding sibling nodes of an XML node using an XPath query? In the following example, I would like to retrieve the values of the alt attribute of each img nodes that precede the div element marked with the id=marker. <content> <img alt="1" src="file.gif" /> <img alt="2" src="file.gif" /> <img alt="3" src="file.gif" /> <img alt="4" src="file.gif" /> <div id='marker'></div> </content> For this example, I want to retrieve the values 1 2 3 4. I use the following XPath query //div[@id='marker']/preceding-sibling::img in order to retrieve the node list I want <img alt="1" src="file.gif"/> <img alt="2" src="file.gif"/> <img alt="3" src="file.gif"/> <img alt="4" src="file.gif"/> As it is a node list I can then iterate on the nodes to retrieve the attribute value I am looking for, but is there an XPath way of doing it? I would have expected to be able to write something like: //div[@id='marker']/preceding-sibling::img@alt or //div[@id='marker']/preceding-sibling@alt::img but I don't even know if it is possible once you have used an XPath Axe like preceding-sibling.

    Read the article

  • [XPATH] Retrieve specific preceding sibling nodes attributes

    - by Matthieu BROUILLARD
    Is there an XPath way of recovering directly one specific attribute of preceding sibling nodes of an XML node using an XPath query? In the following example, I would like to retrieve the values of the alt attribute of each img nodes that precede the div element marked with the id=marker. <content> <img alt="1" src="file.gif" /> <img alt="2" src="file.gif" /> <img alt="3" src="file.gif" /> <img alt="4" src="file.gif" /> <div id='marker'></div> </content> For this example, I want to retrieve the values 1 2 3 4. I use the following XPath query //div[@id='marker']/preceding-sibling::img in order to retrieve the node list I want <img alt="1" src="file.gif"/> <img alt="2" src="file.gif"/> <img alt="3" src="file.gif"/> <img alt="4" src="file.gif"/> As it is a node list I can then iterate on the nodes to retrieve the attribute value I am looking for, but is there an XPath way of doing it? I would have expected to be able to write something like: //div[@id='marker']/preceding-sibling::img@alt or //div[@id='marker']/preceding-sibling@alt::img but I don't even know if it is possible once you have used an XPath Axe like preceding-sibling.

    Read the article

  • Duplicating custom nodes in JavaFX

    - by Elazar Leibovich
    As far as I understand, duplicating nodes in JavaFX should be done with the Duplicator.duplicate function. It works fine when duplicating nodes whose types are included in JavaFX library, for example def dup = Duplicator.duplicate(Rectangle{x:30 y:30 width:100 height:100}); dup.translateX = 10; insert dup into content; would insert a black rectangle to the scene. However if I define a new class in the following way: class MyRect extends Rectangle {} Or class MyRect extends CustomNode { override function create() {Rectangle{x:30 y:30 width:10 height:10}} } It gives me the following runtime error Type 'javafxapplication1.NumberGrid$MyRect' not found. Where of course javafxapplication1.NumberGrid are the package and file the MyRect class is in. This guy at Sun's forums had the same problem, but I don't see any answer in there. Or maybe I'm doing that the wrong way, and there's a better approach for duplicating custom nodes? update: Trying to duplicate Group worked, but trying to duplicate Stack yields the same error. According to the documentation, it's supposed to support all types supported in FXD including Node, but maybe it supports only some of Node's descendants?

    Read the article

  • IE 8 remove line break between nodes with JavaScript

    - by Tokimon
    Ok i have a list of HTML nodes which should be inline with no spacing between them. The problem is, that the nodes are written from a CMS and therefore will come with all sorts of linebreaks and spaces. Therefore I'm removing the spaces with JS using the method descibed in this question. The problem is, however, that in IE (not 9) the white spaces isn't part of the childrens list of the parent node, rendering the method useless in IE. However IE 7 (or at least IE 9 emulating IE 7) ignores the linebreaks, so that one is in the clear. That leaves IE 8 as the troublemaker. I discovered that the line break is actually a part of the outerHTML and that a simple reset of the outerHTML did the trick - like so: node.outerHTML = node.outerHTML However this will reset the node intirely and therefore removing all events and other settings on the node, which isn't really any good. So my question is now: Is there a way to remove that linebreak from the nodes outerHTML whitout resetting the node? I've tried with zoom: 1, but to no avail. Hope anyone has any experience with this.

    Read the article

  • LINQ to XML: suppressing redundant namespace attribute in child nodes

    - by GSerg
    If a node belongs to a namespace, it's children by default belong to the same namespace. So there's no need to provide an xmlns attribute on each child, which is good. However. If I create two nodes like this: Dim parent = <parent xmlns="http://my.namespace.org"/> Dim child = <child xmlns="http://my.namespace.org">value</child> parent.Add(child) Console.WriteLine(parent.ToString) The result is this: <parent xmlns="http://my.namespace.org"> <child xmlns="http://my.namespace.org">value</child> </parent> But, if create them in a less convenient way: Dim parent = <parent xmlns="http://my.namespace.org"/> Dim child As New XElement(XName.Get("child", "http://my.namespace.org")) With {.Value = "value"} parent.Add(child) Console.WriteLine(parent.ToString) The result is more desirable: <parent xmlns="http://my.namespace.org"> <child>value</child> </parent> Obviously, I'd prefer to use the first way because it is so much more intuitive and easy to code. There's also another reason to not use method 2 -- sometimes I need to create nodes with XElement.Parse, parsing a string that contains an xmlns attribute, which produces exactly same results as method 1. So the question is -- how do I get the pretty output of method 2, creating nodes as in method 1? The only option I see is to create a method that would clone given XElement, effectively recreating it according to method 2 pattern, but that seems ugly. I'm looking for a more obvious solution I overlooked for some reason.

    Read the article

  • XPath Query - Select relative top level nodes

    - by John
    I'm trying to iterate over some elements in an XML document that may be nested, but as I iterate over them I may be removing some from the tree. I'm thinking the best way is to do this recursively, so I'm trying to come up with an XPath Query that will select all the top-level nodes relative to the current node. //foo[not(ancestor::foo)] works great at the document level, but I'm trying to figure out how to do this from a relative query. <foo id="1"> <foo id="2" /> <foo id="3"> <foo id="4"> <bar> <foo id="5"> <foo id="6" /> </foo> <foo id="7" /> </bar> </foo> </foo> </foo> If the current node is foo#3, I only want to select foo#4. When the current node is foo#4, I only want to select foo#5 and foo#7. I think I'm trying to select any descendant foo nodes of the current node, but without any ancestor foo nodes between the current node and the node I'm selecting. My conundrum is if we're already inside a foo node, not(ancestor::foo) doesn't help.

    Read the article

  • Graphviz DOT arrange Nodes in circles

    - by Ivo Wetzel
    OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes, currently everything is on one gargantuan horizontal row, which makes the thing 50k pixels wide and also let's the svg converter fail(only renders about the half of the graph). I went trough the docs(http://www.graphviz.org/doc/info/attrs.html) but couldn't find anything that seems to do the trick. So the question is: Is there a simple way to do this or do I have to layout the whole thing by myself? :/

    Read the article

  • Finding all the shortest paths between two nodes in unweighted directed graphs using BFS algorithm

    - by andra-isan
    Hi All, I am working on a problem that I need to find all the shortest path between two nodes in a given directed unweighted graph. I have used BFS algorithm to do the job, but unfortunately I can only print one shortest path not all of them, for example if they are 4 paths having lenght 3, my algorithm only prints the first one but I would like it to print all the four shortest paths. I was wondering in the following code, how should I change it so that all the shortest paths between two nodes could be printed out? class graphNode{ public: int id; string name; bool status; double weight;}; map<int, map<int,graphNode>* > graph; int Graph::BFS(graphNode &v, graphNode &w){ queue <int> q; map <int, int> map1; // this is to check if the node has been visited or not. std::string str= ""; map<int,int> inQ; // just to check that we do not insert the same iterm twice in the queue map <int, map<int, graphNode>* >::iterator pos; pos = graph.find(v.id); if(pos == graph.end()) { cout << v.id << " does not exists in the graph " <<endl; return 1; } int parents[graph.size()+1]; // this vector keeps track of the parents for the node parents[v.id] = -1; // there is a direct path between these two words, simply print that path as the shortest path if (findDirectEdge(v.id,w.id) == 1 ){ cout << " Shortest Path: " << v.id << " -> " << w.id << endl; return 1; } //if else{ int gn; map <int, map<int, graphNode>* >::iterator pos; q.push(v.id); inQ.insert(make_pair(v.id, v.id)); while (!q.empty()){ gn = q.front(); q.pop(); map<int, int>::iterator it; cout << " Popping: " << gn <<endl; map1.insert(make_pair(gn,gn)); //backtracing to print all the nodes if gn is the same as our target node such as w.id if (gn == w.id){ int current = w.id; cout << current << " - > "; while (current!=v.id){ current = parents[current]; cout << current << " -> "; } cout <<endl; } if ((pos = graph.find(gn)) == graph.end()) { cout << " pos is empty " <<endl; continue; } map<int, graphNode>* pn = pos->second; map<int, graphNode>::iterator p = pn->begin(); while(p != pn->end()) { map<int, int>::iterator it; //map1 keeps track of the visited nodes it = map1.find(p->first); graphNode gn1= p->second; if (it== map1.end()) { map<int, int>::iterator it1; //if the node already exits in the inQ, we do not insert it twice it1 = inQ.find(p->first); if (it1== inQ.end()){ parents[p->first] = gn; cout << " inserting " << p->first << " into the queue " <<endl; q.push(p->first); // add it to the queue } //if } //if p++; } //while } //while } I do appreciate all your great help Thanks, Andra

    Read the article

  • Graphviz DOT arrange Nodes in circles, layout too "compact"

    - by Ivo Wetzel
    I'm halfway there please see the edit OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes, currently everything is on one gargantuan horizontal row, which makes the thing 50k pixels wide and also let's the svg converter fail(only renders about the half of the graph). I went trough the docs(http://www.graphviz.org/doc/info/attrs.html) but couldn't find anything that seems to do the trick. So the question is: Is there a simple way to do this or do I have to layout the whole thing by myself? :/ EDIT: Thanks to Andrews comment I've got the right layout, the only problem now is that it's a bit to "compact"... so the question now is, how to fix this?

    Read the article

  • Graphviz DOT arange Nodes in circles

    - by Ivo Wetzel
    OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes, currently everything is on one gargantuan horizontal row, which makes the thing 50k pixels wide and also let's the svg converter fail(only renders about the half of the graph). I went trough the docs(http://www.graphviz.org/doc/info/attrs.html) but couldn't find anything that seems to do the trick. So the question is: Is there a simple way to do this or do I have to layout the whole thing by myself? :/

    Read the article

  • onclick event from XML Nodes

    - by user256007
    My Documents are a mixture of XML and HTML Tags. where HTML tags are pulled from xhtml namespace and mine are from various namspaces. I wanna take user interaction events from XML Nodes of my Document. I First tried <do:landingTime xhtml:onclick="fnc">20:48:29.45</do:landingTime> with no Luck. But <xhtml:span onclick="fnc"> works. So is there any solution/tricks/hacks/backdoor to take events from my xml Nodes.

    Read the article

  • Gaining information from nodes of tree

    - by jainp
    I am working with the tree data structure and trying to come up with a way to calculate information I can gain from the nodes of the tree. I am wondering if there are any existing techniques which can assign higher numerical importance to a node which appears less frequently at lower level (Distance from the root of the tree) than the same nodes appearance at higher level and high frequency. To give an example, I want to give more significance to node Book, at level 2 appearing once, then at level 3 appearing thrice. Will appreciate any suggestions/pointers to techniques which achieve something similar. Thanks, Prateek

    Read the article

  • Handling duplicate nodes in XML

    - by JYelton
    Scenario: I am parsing values from an XML file using C# and have the following method: private static string GetXMLNodeValue(XmlNode basenode, string strNodePath) { if (basenode.SelectSingleNode(strNodePath) != null) return (basenode.SelectSingleNode(strNodePath).InnerText); else return String.Empty; } To get a particular value from the XML file, I generally pass the root node and a path like "parentnode/item" I recently ran into an issue where two nodes at the same document level share the same name. Question: What is the best way to get the values for duplicate-named nodes distinctly? My thought was to load all values matching the node name into an array and then using the array index to refer to them. I'm not sure how to implement that, though. (I'm not well-versed in XML navigation.)

    Read the article

  • What is the best way for communication between cluster nodes

    - by Tom
    I have an application written in a combination of ASP/VB6/VBScript and ASP.NET/C# that consists of a website part, SOAP-like webservice part and a queue processing part processing incoming files in a hotfolder. We are used to running under load balancers (Microsoft or other make). Often we need to communicate between the different load balanced servers. Currently we do this through the SQL Server database that is common for all nodes, however, this comes with a performance penalty as each message requires a transaction and continual polling from the other nodes. What would be better ways to achieve this? Tom, Appelby

    Read the article

  • View of nodes and their translations

    - by kratib
    I'm trying to create a view of nodes and their translations. Specifically, I want each row to show the node title for each language. The way I'm doing it right now is by filtering the view by a specific language, then adding one relationship of type "Node translation: Translations" for each language on the site. I can then choose the "Node: Title" field, once for the original language and once per relationship. The problem with this approach is that the nodes that don't exist in the filtered language, but exist in other languages, are not included in the view. That's what I need help with.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >