nodes

ASP.NET MVC SiteMap provider — How to 'hide' single items in the actual menu

一笑奈何 提交于 2019-12-10 03:29:06
问题 I am using the ASP.NET MVC SiteMap provider in a project, and it is working great. I am having a tough time trying to figure out how to hide a menu item however. The menu item I want to hide from displaying in the global navigation is my "Site Map" page. Now I know that there is something called a VisibilityProvider available to me on the mvcSiteMapNode - but I can't seem to figure out how to make it work. 回答1: First, I suggest you read this wiki page: Creating a Custom

D3, SVG, and Javascript : Need to assign unique images to dynamically created nodes

感情迁移 提交于 2019-12-09 22:43:50
问题 I'm playing with the following Javascript + SVG + D3 code. http://bl.ocks.org/1095795 The code is here: https://gist.github.com/1095727 In short, I need unique images for each node (instead of the duplicated smiley face image as it's pulling now), but I'm not savvy enough to make it happen. Any help would be appreciated. <!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> <script type="text/javascript" src="http://mbostock.github

Networkx neighbor set not printing

夙愿已清 提交于 2019-12-09 18:23:59
问题 I have a little problem with my networkx code. I am trying to find all the neighbors from a node in a graph, but.... neighbor = Graph.neighbors(element) print(neighbor) outputs: <dict_keyiterator object at 0x00764BA0> Instead of all the neighbors I am supposed to get... A friend of mine, who is using an older version of networkx does not get this error, his code is exactly the same and works perfectly. Can anyone help me? Downgrading my networkx is not an option. Edit: This is my complete

How can I make rectangle selection on multiple nodes with graph dracula?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 18:00:54
问题 I am working on some graph visualizations, and I am using the JavaScript library graph Dracula. Now, with this library, when I want to move a node I have to click the node I want to move and move it on the desired place (with drag and drop). But, what I want to do is to select more nodes and move all of them. I can't figure out how to do this, since I am not so experienced in JavaScript programming. So, my question is: How can I select multiple nodes with rectangle selection and move them?

hadoop/hdfs/name is in an inconsistent state: storage directory(hadoop/hdfs/data/) does not exist or is not accessible

心不动则不痛 提交于 2019-12-09 14:31:03
问题 I have tried all the different solutions provided at stackoverflow on this topic, but of no help Asking again with the specific log and the details Any help is appreciated I have one master node and 5 slave nodes in my Hadoop cluster. ubuntu user and ubuntu group is the owner of the ~/Hadoop folder Both the ~/hadoop/hdfs/data & ~/hadoop/hdfs/name folder exist and permission for both the folders are set to 755 successfully formated the namenode before starting the script start-all.sh THE

Run multiple elasticsearch nodes as a service on one Ubuntu-Server

僤鯓⒐⒋嵵緔 提交于 2019-12-09 13:05:35
问题 I have a server running Ubuntu 14.04 with 220 GB of ram on which I'd like to run elasticsearch. According to the documentation, one node should not have more than 32 GB of RAM, so I guess I have to run several nodes on this one machine in order to make use of all that RAM. I'm considering running 4 nodes with 28 GB of memory for each. How do I set this up as an ubuntu service, so that all of the nodes automatically come back up after a system reboot for example? I guess I have to edit /etc

NPM run parallel task, but wait until resource is available to run second task

佐手、 提交于 2019-12-09 11:37:15
问题 In npm, how can I run two or more parallel tasks, but waiting for the resource that the first task will create to be available to the second task to use it, and so forth? example (conceptual): npm run task1 & waitfor task1 then task2 & waitFor task3 then task4 ... any ideas? EDIT As an example: Lets say that my first task is starting a webserver, and my second task is consuming data from that web-server every time an event happens. Another example: My first task could be starting webdriver

What type of algorithm should i use?

三世轮回 提交于 2019-12-09 11:02:06
问题 Lets say I have four group A [ 0, 4, 9] B [ 2, 6, 11] C [ 3, 8, 13] D [ 7, 12 ] Now I need one number from each group(i.e a new group) E [num of A,num of B, num of C, num of D], such that the difference between the maximum num in E and minimum num in E should be possible lowest.What type of problem is this ? which graph algorithm will be better to solve this kind of problem ? Thanks in advance. P.S : I'm trying to solve this in java and sorry for the unspecified title. Edit : Finally I've

Creating a node class in Java

a 夏天 提交于 2019-12-09 09:06:48
问题 So I'm fairly new to Java and programming and I was wondering how to create a node class? So far I have: public class ItemInfoNode{ private ItemInfoNode next; private ItemInfoNode prev; private ItemInfo info; public ItemInfoNode(ItemInfo info, ItemInfoNode next, ItemInfoNode prev){ info = info; next = next; prev = prev; } public void setInfo(ItemInfo info){ info = info; } public void setNext(ItemInfoNode node){ next = node; } public void setPrev(ItemInfoNode node){ prev = node; } public

XPath select node with periods

ε祈祈猫儿з 提交于 2019-12-08 20:18:22
问题 I have an XML document where some of the nodes have a . in their name: <com.site.blah> <id>asdkjasd</id> <com.site.testing> <name>test</name> </com.site.testing> </com.site.blah> If I try @doc.search("/*/id").first.xpath , it returns /com.site.blah/id , but if I then do: @doc.search("/com.site.blah/id").first.inspect it returns nil . I want to be able to make an XPath query to select the name under com.site.testing , but it keeps rejecting my queries. Any ideas? (I am using hpricot if it