Click here to Skip to main content
15,885,366 members
Everything / Graph

Graph

graph

Great Reads

by Bharat Mallapur
Sample project to host MS-Chart in your WPF application
by Dmitrii Nemtsov
A way to build a finite-state machine identifying predefined sequences in a stream of characters
by Chris La
A 2D/3D force directed graph algorithm in C#
by saransh89
How to create stack bar chart using AngularJs and ChartJS

Latest Articles

by Dmitrii Nemtsov
A way to build a finite-state machine identifying predefined sequences in a stream of characters
by IAmJoshChang
Today we are going to demonstrate how to use Top Down Dynamic Programming to solve the problem, Coin Change.
by IAmJoshChang
Graphs are one of the most common questions that might show up in a technical interview, especially in these days where many real-world applications can be represented by nodes and edges such as the social networks!
by IAmJoshChang
How to traverse a postorder binary tree

All Articles

Sort by Score

Graph 

2 Jul 2015 by Bharat Mallapur
Sample project to host MS-Chart in your WPF application
13 May 2023 by Dmitrii Nemtsov
A way to build a finite-state machine identifying predefined sequences in a stream of characters
17 Nov 2016 by saransh89
How to create stack bar chart using AngularJs and ChartJS
1 Apr 2017 by schollii
Find routes from any node of a directed graph to leaves, when cycles may be present in graph
14 Dec 2016 by Paolo Parise
Graph intersection using map reduce and Akka
22 Nov 2020 by Sandeep Mewara
A look into graph based algorithm
28 Jan 2015 by CHill60
Whenever you are trying to sort out problems in your code start at the very first error reported not somewhere in the middle!The first error reported is not on that line at all - it's on public void Form1_Load(object sender, CpuUsage e) and states Quote:The type or namespace name 'CpuUsage'...
28 Apr 2015 by Sergey Alexandrovich Kryukov
You messed up everything. Let's see how equal temperament works.You are trying to create equal temperament based on having 2 intermediate micro-tones between tones of 12-tone European system. It it also pretty apparent that you use the equal temperament and A440 pitch standard as the base....
8 Apr 2016 by jurhas
Solving graph on linear time
10 May 2016 by Patrice T
You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.The debugger allow you to follow the execution line by line, inspect variables and you will see that there...
3 Aug 2016 by Zebedee Mason
When applying metrics to architecture, the Cyclomatic number has some nice invariances
8 Nov 2017 by ZurdoDev
The easiest way to learn is to record a macro creating the pie chart manually. You can then go into the Macro Editor and see the code that was created.
17 Dec 2020 by IAmJoshChang
Today we are going to demonstrate how to use Top Down Dynamic Programming to solve the problem, Coin Change.
29 Jun 2015 by CPallini
Assuming you are able collecting input from the user, then drawing the polygon is trivial:call moveto(x0,y0); lineto(x1,y1);...;lineto(x0,y0);Computing the perimeter is relatively easy, since, for instancel01 = sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0));gives the length of the side connecting...
30 Jun 2015 by Stefan_Lang
There's a simple algorithm for calculating the area of a polygon:1. Choose one point P1. Interpret this point as 3D point by setting the z-coordinate to 0.2. For all remaining (n-1) points Pi:- interpret Pi and Pi+1 as 3D points by setting the z-coordinate to 0.- calculate the vector...
8 Oct 2015 by Sergey Alexandrovich Kryukov
Apparently, you are doing it wrong. You have to support drawing/redrawing permanently, by doing all rendering in your overridden OnPaint method or Paint handler. For further detail, please see my past answers:What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],How to...
16 Sep 2016 by Patrice T
Quote:I read about Dijkstra's algorithm, how can you use in this problem? You don't, it is not for this kind of problem.In contests like this one, it is never a classical problem, and well known solutions do not apply.In example 1, the distance between 2 keys mach Taxicab geometry -...
16 Nov 2018 by CPallini
Let's try a bit of experimental evidence. The program #include #include struct Queue { int data; int priority; struct Queue *next; }; void dump_pointers( struct Queue ** phead) { printf("-- dump_pointers --\n"); printf("phead=%p, *phead=%p &(*phead)=%p\n", phead,...
26 Apr 2019 by MadMyche
Separation of Concerns comes into play here. The Chart is presentation layer and should be one of the last things to do; easiest way to do it would be via JavaScript on the actual webpage. PHP is server-side, and will play the roles of the Business Layer as well as the Data Layer. So how do...
26 Apr 2019 by Patrice T
Quote: How to create graph in PHP First of all, php is server side language, it is used to prepare page that will be sent to client browser. JS and html are client side. There is basically 3 ways to make a graph in an html page. - The canvas which is manipulated on client side by some JS code....
30 May 2020 by OriginalGriff
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us...
4 Dec 2020 by IAmJoshChang
Graphs are one of the most common questions that might show up in a technical interview, especially in these days where many real-world applications can be represented by nodes and edges such as the social networks!
5 Dec 2020 by KarstenK
you must seperate each condition or state into a seperate block or function and than solve it. For that you need some C++ from some C++ tutorial. Use class design like for the robots and the standard library. Make a lot of output, ev write a...
27 Dec 2021 by Andy Bantly
This problem is discussed in the book Algorithms in C++ volume 5 - Graph Algorithms. I believe your solution is going to be based on minimal spanning trees. The chapter on this topic (chap 20) is very detailed. I think if you can see it, then...
14 Jan 2024 by Code Artist
Consider this algorithm Implementation Downsampling Algorithm in MSChart Extension[^] to plot large data size without loosing details of trends and performance impact.
29 Oct 2014 by DoomedOne
Hi everyone, I have a trouble modifying an old report, client wants to add a graphic in a report, Visual studio reporting services (no Crystal), not so hard I think myself, but now i'm struggling with an error: Could not load file or assembly 'Miscosoft.ReportViewer.DataVisualization,...
6 Nov 2014 by Elgars Logins
I was using facebook graph api "/me/home" for my app. But now it returns just 1 record. It happened just in 2 days. Does anyone run into the same issue? How to fix it?
6 Nov 2014 by Afzaal Ahmad Zeeshan
There might be a change on the Facebook Graph or their API. You can consult a client from their API to get help in this, if there is no problem in the code execution but just an unsual result, you can try asking them out for help. Or a better option is to check their API, they might have...
10 Nov 2014 by DoomedOne
I solved it, by replacing Microsoft.ReportVierwer.DataVisualization.dll from other development PC, delete reference to it from the proyect, re-add reference in the proyect.Now works.Regards
26 Nov 2014 by Karthik Ravi
Hi All,I working in a project done in .net Framework 2.0, I need chart control for displaying chart in web application i can't use chart control its hidden in tools.I also referenced "system.web.datavisualization.dll" , even its not working.can anyone suggest any solution for...
26 Nov 2014 by CPallini
MSDN provides tutorials about: "Getting Started"[^]
10 Dec 2014 by Karthik Ravi
Hi all I am generating dynamic graph using Graph control in dot net with good look and feel that will refresh for every 30 seconds(Every 30 seconds values are automatically inserted in db) in asp.net web application. I'm doing it in Framework 4.I'm using only Graph control in dot net,...
10 Dec 2014 by Garth J Lancaster
in the old days of simple html, since I was never a web expert, I used to produce pages that looked like this :- Karthik Ravi - Graph of x vs y
14 Jan 2015 by Chetan Saini
From a long time i am trying to generate graph like this Image Url Codes i tried. Excel.Range chartRange1; Excel.ChartObjects xlCharts1 = (Excel.ChartObjects)worksheet.ChartObjects(Type.Missing); Excel.ChartObject myChart1 =...
28 Jan 2015 by Eric@Fibonacci
Hi there!I am working on a C# application that monitor CPU Usage. The raw data must flow through a Graph and display on a form application. I'm quite new with C# and this error "Does not contain a definition for..." bullies me for a few days now haha. I've done tons of research on the problem,...
15 Feb 2015 by Zoltán Zörgő
Take a look here: http://blog.aggregatedintelligence.com/2011/06/cobjectdumper.html[^]
22 Feb 2015 by Supradeep Choudhury
Hi friends...Thanks for visit...I am facing a problem [due to lack of knowledge] in Visual Studio 2013. My project is under development. I have to create a dependency graph which I generated in VS2013 and saved. Now day by day new classes are created by developers and attached with project....
22 Feb 2015 by Member 11065384
I need to recognize a pattern in the following diagram/example:Image LinkI need to recognize that students spend a lot of time studying for 40-55mins ON Monday, Tues, wed. And rarely studies on another date and so forth. Can I use Machine Learning to do this or is there an easier and...
23 Feb 2015 by manchanx
I'm no AI expert but I'd say AI isn't required to solve this and most probably wouldn't be the quickest way. I would try this approach:Imagine a cube - axis X is the day of the week, axis Y is the time spent studying and axis Z is the frequency of that happening (reflecting the "mostly" and...
23 Feb 2015 by Matt T Heffron
Is the graph image what you actually have as input (i.e., you have image files as the input)?Or do you have the data points that were used to generate the image(s)?If you really want to learn about Machine Learning and Classification systems, check out the Free, introductory Machine...
30 Mar 2015 by Averla
How to add both click and double click event in svg D3charts. I tried this code. Iam using D3 charts.. I devoleped Tooltip but i need to create a div to show the data on double click to copy data, i have a click event where in that event child-parent hiding take place. I want to implement double...
30 Mar 2015 by ramyajaya
1. Showing and hiding of div can be done by setting style.visibility property as hidden and visiblereference: http://www.w3schools.com/jsref/prop_style_visibility.asp2. On double click you want copy the data which is nothing but recreation of another. For which create another div copy...
16 Apr 2015 by User 11258466
I'm trying to create a Line Graph with zed graph. I just wanted to ask that how can I create a Line Graph which XAxis type is text and YAxis type is doubles.Firstly i was really searching about this topic but i didnt get any result about it. Because other Line graphs are always about...
16 Apr 2015 by User 11258466
I just figured it out ! Here is an basic example about creating a line graph with ZedGraphprivate void button3_Click(object sender, EventArgs e){ // generate some fake data double[] y = { 1, 2, 3, 9 ,1,15,3,7,2}; string[] schools = { "A", "B", "C", "D"...
8 May 2015 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
I think without an APP, you can't post.Refer for complete code and implementation - How to do a post in facebook on my page fan wall with c# and asp.net[^].
10 Jun 2015 by Member 10527566
I have a graph with nodes that have a time property. I was wondering if there is a control that displays a timeline according to the nodes.Something like the below picture:http://s3.picofile.com/file/8192248918/TimeLineGraph.png[^]For example in the picture the first node’s time is...
29 Jun 2015 by KarstenK
The areas can get computed via triangulation: you seperate the polygon in triangles and add their areas. The perimeter is more complex. You need to find all outsides and add them.For that you may look for some algorhitm. I would write a test function to proof that a points is NOT in a...
4 Sep 2015 by Member 11082591
i have Facebook application and business manger account i want to get access of Facebook page which is not my own. so i want to send request to page admin to get access on that page using Graph API. can it possible using graph API.which Facebook page i want to access that page admin need a...
8 Oct 2015 by Jesús Álvarez
I have problem whit the chart when i resize other controls, i have a seri with N point added to my chart, then i paint a line graph.DrawLine(new Pen(Color.Yellow, 1), point3, point4); when i resize other control o de form this line disapear, then when i zom in the chart appear again. I need to...
19 Oct 2015 by devandprog
I have implemented dbscan algorithm in c#.net since this algorithm deals with datasets which contains d-dimensional points e-g the datasets it use are of the following formatexample:10,10020,3050,8469,74............I want to modify this algorithm for graphs datasets....
25 Nov 2015 by parthapratimdey007
I am trying to add zedgraph.dll as reference in VS2003. But i am facing a problem. A message has been popped up mentioned that "This is not a valid assembly or COM component."
25 Nov 2015 by OriginalGriff
The chances are that ZedGraph is written for a very different version of .NET - VS2003 is a very old IDE these days (it's 12 years old which in computing terms is nearly paleolithic!)If you want to use a relatively modern assembly in your application, you are almost certainly going to have...
30 Nov 2015 by parthapratimdey007
Presently I have drawn a bar chart which does not show the bar chart value in each bar. But I need to show the value at the top of each bar. I am using vb.net. Can anyone please help? It is very urgent.
2 Dec 2015 by Member 10243484
Hi all, I used canvas line chart with HTML5. I have a trouble with clear data and redraw the data. Example I drawn the random data on Y-Axis and the X-Axis increased one value in updateInterval times. I want when the X value had 200 and clear all data displayed on line chart and redraw again...
20 Dec 2015 by Member 12160712
So if I have two nodes in a graph, and they are connected through more than one edge while having the same shortest path between them (i.e if I have node A and node B and they are connected directly through three edges : edge 1, edge 2, edge 7 (there are 3 shortest paths between them each of...
9 May 2016 by leon de boer
Lets start with the most obvious problem I can see, that you haven't initialized the bool array visitedbool *visited = new bool[V]; // this leaves all the values in the array random are you sure you didn't mean to initialize it like so?bool *visited = new bool[V](); // this zeros the...
13 Sep 2016 by Member 12731860
problem explained here Keyboarding – Kattis, ICPC World Finals[^]What I have tried:What I did first was to put all characters in a 2-D array, find where all the letters are in array and adding the absolute value of the difference of the indexes to get shortest path, this only...
18 Sep 2016 by Member 12731860
I found this solution but its in c++ and I know c#, I dont understand it, can someone please explainusing namespace std;int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, -1, 0, 1 };int mv[50][50][4];int best[50][50];int _tmain(int argc, _TCHAR* argv[]){ int Y, X; while (cin...
16 Oct 2016 by Alireza Shokrizadeh
Here is my codeimport networkx as nximport pylab as pltfrom collections import Counterwebg = nx.read_edgelist('web-graph.txt',create_using=nx.DiGraph(),nodetype=int)in_degrees = webg.in_degree()in_values = sorted(set(in_degrees.values()))in_hist = [in_degrees.values().count(x)for...
6 Jan 2017 by Richard MacCutchan
You already posted this question at How will you solve the following problem ?[^]. Please do not repost.Also, no one is going to do your homework for you.
7 Jan 2017 by nv3
This is no correct C code and won't even compile. Same problem as in your last post:long long C[n];doesn't work, because the compiler cannot allocate space for a quantity n that is unknown at compile time. Nor willint arr[n+1][n+1];work for the same reason. So fix that first and you will...
22 Jan 2017 by Member 12962833
i am trying to get the license details of each user on my azure tenant on this webapp and i want to provide an edit option like the one you find in office 365 for user licenses how can i do this right? my details.cshtml page
3 Feb 2017 by Member 12613265
// Implementing BFS Algorithmimport java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; public class BFS { private Queue queue; // Queue that will contain some of Nodes static ArrayList nodes=new...
16 Apr 2017 by Dave Kreskowiak
OK, have fun getting support for OxyPlot from the people who are writing it. Support · OxyPlot[^]
10 May 2017 by Member 13191541
In R programming - How do I plot a network visualization graph given a matrix X with a 2 column coordinate system: coordinates
3 Jul 2017 by Member 11247684
I need to extract the best path in terms of its length from a rectangular array like this array: Quote: |1||0||1||0| |1||0||0||1| |1||1||0||1| |0||0||1||1| The pathfinding rules: 1- Start from the indexes provided in the method signature where the rowIndex and colIndex are the positions of...
11 Jul 2017 by Member 13304699
Thank you for taking the time to read my message. (Using the **logit** function in package **car**) My Statistical analyses were conducted on probability estimates ranging from 0% to 100%. As it's not ideal to run linear models on percentages that are bounded between 0 and 1, these...
9 Aug 2017 by Espen Harlinn
Google gave me this:Chess Knight Problem | Find Shortest path from source to destination[^] It's pretty close to what you need, as you know where the pawn is going to be in x number of steps ... Best regards Espen Harlinn
8 Nov 2017 by JayyMehta
I am new to VB and am trying to learn how to create a pie chart out of certain values on the excel spreadsheet. I know how to do the bar charts but i was wondering whether you guys are aware of online resources or tutorials for this.. Thanks. What I have tried: Charts.Add ActiveChart.ChartType...
8 Nov 2017 by Patrice T
Excel have a feature that record user actions and translate those actions into VBA code. - Start a new macro recording - do your actions (a pie chart) - Stop macro recording - go to VBE and inspect code, then adapt to integrate to your code.
20 Nov 2017 by Member 13468650
I am trying to figure out how to find all paths between to nodes through all edges, not vertices. Was thinking about visited[][], to check did edge was visited, but I came up with some problems. Maybe I there is simple way and I can't see it. Any ideas? void allPathsDFS(int verticeFrom, int...
25 Nov 2017 by Member 13485513
I am doing a project to code the A* algorithm in the shortest path problem. In able to determine the shortest path using A* algorithm, I acknowledge that we have to get the heuristic value first. Do anyone know how to calculate and determine the heuristic value for each nodes? [i made up the map...
25 Nov 2017 by Richard MacCutchan
A* search algorithm - Wikipedia[^].
14 Oct 2020 by Member 13650651
Excel.ChartObjects xlCharts = (Excel.ChartObjects)oSheet.ChartObjects(Type.Missing); Excel.ChartObject myChart = (Excel.ChartObject)xlCharts.Add(10, 80, 450, 275); oSheet.Shapes.Item("Chart 1").Top = (float)(double)oSheet.get_Range("A15", "A16").Top; ...
19 May 2018 by Richard MacCutchan
Sorry, we do not do your homework for you. You cannot expect to get accepted for a course by submitting an exam that you did not do yourself.
19 May 2018 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action. Try it yourself, you may find it is...
19 May 2018 by Patrice T
Quote: I need to be re-examined in order to change my major at college. So, in order to do this, the following problem should be solved until 28 May . That is your exam, about your work and your knowledge, not ours. We do not do your HomeWork. HomeWork is not set to test your skills at begging...
7 Jun 2018 by Stavros Avramidis (asder)
I am making a directed Graph class. I want find if there is any Euler Cycle and update a vector with it's path accordingly. My Function some times work but others add two times the last edge of the path.So i guess it needs to be tydied up. (If others parts of my code are too simple, so I didn't...
18 Jun 2018 by Member 13647869
I have a csv file that contains the following: the date a tweet is published, the sentiment value (0=negative and 1=positive), and then the tweet in the third column, all seperated by commas. I need to plot the date on the x-axis and the sentiment value on the y-axis to see the change of...
29 Jun 2018 by Alexandre Cornet
In my economics research I am currently dealing with a specific shortest path problem: Given a directed deterministic dynamic graph with weights on the edges, I need to find the shortest path from one source S, which goes through N edges. The graph can have cycles, the edge weights could be...
29 Jun 2018 by Patrice T
Quote: Is there an efficient algorithm for this problem? None, even worse there can be no solution because of infinite looping. Quote: The graph can have cycles, the edge weights could be negative, and the path is allowed to go through a vertex or edge more than once. The combination of those...
17 Aug 2018 by Member 13952951
I have two plots. One is a plot of ten basketball players' paths and because of the coordinate system is scaled to a roughly 50x50 graph. The other is of some basketball half-court plotting code that I found online that is plotting on a roughly 500x500 graph scale. I want to superimpose the...
11 Sep 2018 by Member 13981298
Need to print labels on a GlControl box for a graph. This can be done easily with Glut. However, OpenGL.Net does not seem to support GLUT. What I have tried: Tried writing the string on a bitmap and then print it on the Glcontrol but it prints some garbage value. The application is in WinForm....
25 Sep 2018 by kavinderrana121
I'm studying graphs at the moment, and I'm using C. When I represent a graph with an adjacency list, I need a queue for a BFS traversal. However, I'm having some issues with the code - I'm not sure if I grasped the concept of a bfs traversal with queues well. I pasted the commented code below,...
25 Sep 2018 by OriginalGriff
Compiling does not mean your code is right! :laugh: Think of the development process as writing an email: compiling successfully means that you wrote the email in the right language - English, rather than German for example - not that the email contained the message you wanted to send. So now...
16 Nov 2018 by kavinderrana121
My doubt is regarding pointer only,Here head is a double poiner to Queue if we are using *head than we are accessing the location(or address passed) inside main but when we are using simply head than we are using head in the current function only which will hold the address of pointer to Queue...
16 Nov 2018 by Rick York
Graph *G = malloc(sizeof(*G)); "He is allocating memory block for one block which will hold the pointer to G" Not exactly. It is allocating a Graph structure and assigning G to the address of that structure. That is certainly readable code but I think it obscures what's really going on,...
6 Jan 2019 by TeemeeT
How can I access other users calendar appointments in MS Outlook to validate if the appointment time created in our application are already taken. We have an account to access MS Graph APIs. What I have tried: Access with a signed-in user but I need to have delegate access to users' calendars.
20 Apr 2019 by Member 14321210
pred_uc1 = results.get_forecast(steps=30) pred_ci = pred_uc1.conf_int() axes = y.plot(label='A321 Observed', figsize=(14, 7)) pred_uc1.predicted_mean.plot(ax=axes, label='A321 Forecast') pred_uc2 = results.get_forecast(steps=30) pred_ci = pred_uc2.conf_int() ax = y.plot(label='A320 Observed',...
20 Apr 2019 by Member 14321210
Screen-Shot-2019-04-20-at-5-08...
30 May 2019 by ognjenjebot
If I have a graph looking something like this 0 - 1 - 2 ........|......| .......3.....4 ...............| ...............5 Note: dots have no function, and line represent edges and I have an adjacency matrix for that graph,how do I know only from using that matrix if there is a node,for...
28 Jun 2019 by Miranda Powell
I'm trying to put together a few stats about the history of my data to better understand it. My goal is to create a loop which creates a pdf for trend. seasonality and resid for each column in my data frame. I wrote a loop to do this, but each graph includes more data than it should. For...
4 Aug 2019 by StoneCoder
My approach : using recursive DFS. Note: i will be running this function for every vertex of graph and this approach works for very small values of vertices. How can i improve it or could u suggest any better/faster algo. Thanks:) What I have tried: static int size=0,source=0; int ans=0;...
4 Aug 2019 by Patrice T
Quote: How can i improve it or could u suggest any better/faster algo. Show the calling code with sample data so we have an idea of what you do with this function. Advise: - Double line spacing adds nothing to your code, it just make it more difficult to read. - Learn to indent properly your...
5 Aug 2019 by geek code
I came across this problem while giving a sample test. The problem was that we have given a tree which is undirected. We can start from any node of our choice. Initially we have power "P" and while going from one node to other node we loose some power "X" (consider as cost of travelling) and...
25 Dec 2019 by Member 12128269
We have some data in both influxDb and dynamoDb. Now we want to fetch the data from both the DataStores into GraphDB free and make a sparql query by joining the results. What I have tried: We tried to fetch it using the URL directly in the import section of GraphDB Free but we are unable to do...
3 Mar 2020 by Manujaya Premathilaka
Can a control flow graph contain multiple start and end nodes? If so, what will happen when multiple start and end nodes contain in a control flow graph? Thanks in advance What I have tried: I tried googling but I couldn't find an answer.
3 Mar 2020 by Richard Deeming
A CFG is "a representation, using graph notation, of all paths that might be traversed through a program during its execution". (Control-flow graph - Wikipedia[^]) All but the simplest programs are likely to have multiple end nodes. But a...