nodes

PHP simpleXML parsing

时间秒杀一切 提交于 2019-12-12 19:23:09
问题 I need currency conversion, euro to dollar. The European Central bank provides the rates here: http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml I can get the USD rate by using the first node, but what if they change the order? Do I need something more reliable? I have no idea how.. $xml = @simplexml_load_file('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml'); echo "dollar: " . $xml->Cube->Cube->Cube[0]->attributes()->rate; 回答1: Just use XPath to get any node with the

How to place an image in D3 node?

纵然是瞬间 提交于 2019-12-12 13:03:32
问题 So far I have created these D3 nodes that are used to create a collapsible hierarchical tree. So far these nodes are coloured #AA1C1C (dark red) to show that if you click on them, they will expand into more nodes. What I want to do is use place in image in the node which will be a plus symbol to all the user to know it's clickable. How do I do this? I was trying to use this symbol: http://uxrepo.com/static/icon-sets/ionicons/svg/ios7-plus-outline.svg D3 nodeUpdate.select("circle") .attr("r",

Using the force-layout physics for seperated elements

别等时光非礼了梦想. 提交于 2019-12-12 10:14:33
问题 I use the force layout in D3.js v4. Now I want to click on a node and use the force physics like collide for that one node only. The simulation for every node on the entire SVG is this: var simulation = d3.forceSimulation() .force("link", d3.forceLink().id(function(d) { return d.index })) .force("collide", d3.forceCollide(function(d) { return d.r + 8 }).iterations(16)) .force("charge", d3.forceManyBody()) .force("center", d3.forceCenter(chartWidth / 2, chartWidth / 2)) Now I want to change

How to plot tree/graph/web data on gnuplot?

百般思念 提交于 2019-12-12 08:36:30
问题 I have a data-set that consist of edges and colors, and I want to plot them on a web-like manner, with lines and circles such as the picture below, and possibly with cluster coloring. The data is organized like this: point1a_x point1a_y color point1b_x point1b_y color point2a_x point2a_y color point2b_x point2b_y color (...) point2n_x point2n_y color point2n_x point2n_y color How would I go about doing it on gnuplot? 回答1: The accepted answer didn't quite work out for me. Here is how I had to

Jenkins node connection troubles

自作多情 提交于 2019-12-12 07:31:04
问题 Hi i have got the following error but my node is up and in jenkins logs everything is ok but on some of my jobs which are going on the nodes i've got the following trouble 12:59:29 [EnvInject] - Loading node environment variables. 12:59:29 ERROR: SEVERE ERROR occurs 12:59:29 org.jenkinsci.lib.envinject.EnvInjectException: hudson.remoting.ChannelClosedException: channel is already closed 12:59:29 at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader

Inserting XML nodes and inner nodes to an existing XML document in C#

懵懂的女人 提交于 2019-12-12 06:01:58
问题 Currently I have a working C# program that works as follows: Accept .xls template with values (xls is manually created by user) Save the values (matching fields) to the database Convert and write .xls to XML. Please see below sample output: Existing XML Structure Now, what I want to do is: Read the existing xml (the created xml) Insert another set of nodes and subnodes ( ReleaseLine and sub nodes). It must accept multiple ReleaseLine. Save/create the new xml with appended nodes. Please see

Swap Position of the Node in C

ⅰ亾dé卋堺 提交于 2019-12-12 06:00:04
问题 Okay so I want to swap POSITION (not values) of two nodes. My Program is running with any errors or warnings, but I am not sure if I am swapping position or values. Here is my sort function: void sort(struct node **recordsHead,int (*compare_fcn)(struct node*, struct node*)) { void swap(struct node**, struct node**); struct node *tmp,*lastPtr = NULL; int swapped; do { swapped = 0; tmp = *recordsHead; while (tmp->next_ != lastPtr) { if (compare_fcn(tmp, tmp->next_)) { swap(&tmp, &(tmp->next_));

Issue adding and deleting nodes from a linked list

一曲冷凌霜 提交于 2019-12-12 04:37:23
问题 I have a program that has to take in input from a text file, create a linked list with this input, then be able to add, delete, modify, and query the linked list. My query and modify functions work fine. My delete function fails under a particular case, and I'm struggling with the add function. No errors from the compiler to help out. It would be greatly appreciated if anyone could point me in the right direction. The add function is giving me the biggest problems. After a couple hours of

Segmentation Fault when using Linux, but not in Xcode

試著忘記壹切 提交于 2019-12-12 04:36:21
问题 I am having issues running my code in a Linux environment. However, it runs perfectly with Xcode. I have used gdb backtrace to pin-point where my problem is and it points to a line of code where I am setting a node's "entry" field (a string) equal to a line read from a text file (also a string). I have a feeling I am not including something or I am including the wrong thing. I am in way over my head since I have just started c++ this month. Please help! #include <iostream> #include <fstream>

Sequelize Error with query sending Error: read ECONNRESET

限于喜欢 提交于 2019-12-12 03:45:07
问题 PostgreSQL 9.6.2 I send query from node.js / express.js application. The sequelize provide the doc how to make the query, this example findAll. I try to make same example. console.log('user id: ', req.decoded); db.orders.findAll({where: {userId: req.decoded.id}}) .then(function (orders) { console.log('orders from db: ', orders); }) .catch(function (err) { console.log('orders request error from db: ', err); }); console.log('end of function'); Console log: user id: { id: 2 } end of function