Search Results

Search found 16557 results on 663 pages for 'graph library'.

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

  • How to serialize a graph ?

    - by Michael
    This is an interview question: How to serialize a graph ? I saw this answer but I am not sure if this is enough. It looks like a very confusing "open question" and the candidates are probably expected to ask more questions about the requirements: what the nodes and edges are, how they are serialized themselves, is this graph weighted, directed, etc., how many nodes/edges are in the graph.What about the infrastructure ? Is it a plain file system or we should/can use a database ? So, how would you answer this question ?

    Read the article

  • Plotting a cumulative graph of python datetimes

    - by ventolin
    Say I have a list of datetimes, and we know each datetime to be the recorded time of an event happening. Is it possible in matplotlib to graph the frequency of this event occuring over time, showing this data in a cumulative graph (so that each point is greater or equal to all of the points that went before it), without preprocessing this list? (e.g. passing datetime objects directly to some wonderful matplotlib function) Or do I need to turn this list of datetimes into a list of dictionary items, such as: {"year": 1998, "month": 12, "date": 15, "events": 92} and then generate a graph from this list? Sorry if this seems like a silly question - I'm not all too familiar with matplotlib, and would like to save myself the effort of doing this the latter way if matplotlib can already deal with datetime objects itself.

    Read the article

  • Storing parameters from a graph and applying to other graphs

    - by Braden
    I would like to store the xmin and xmax parameters from one geom_histogram and apply them to a second geom_histogram. I am putting both graphs on the same page using grid.arrange and would like them to have the same x range, while allowing the first graph to establish the range based on its data. The second graph is produced from a subset of the first graphs data, so it will not have data that falls outside of the x-range established by the first. But I don't want the range to shrink to fit the second graph.

    Read the article

  • Windows Media Player 12 Library import keeps dying

    - by duckworth
    I cannot get WMP 12 to import my library. I have searched around various forums and tried all the common solutions like disabling Media Sharing, deleted my %LOCALAPPDATA%\Microsoft\Media Player directory and tried reimporting, etc. but nothing works. I have even removed the Media features from Windows setup and re-added them. I have a large mp3 collection shared on the network from another Windows box. I add the folder (tried as a mapped drive and UNC path) and it begins importing. After about 30 minutes into the import (the CurrentDatabase_372.wmdb hits just under 400MB) my WMP player stops importing and all of the icons in WMP turn to red x's and my library is gone. I close and reopen WMP 12 and the library is empty and the CurrentDatabase_372.wmdb is small and it strarts importing again. Rinse, lather, repeat. I am going nuts as WMP11 on Vista handles this same setup perfectly. I am at my wits end on what else to try. I am running a legit Windows 7 Ultimate X64 RTM install. Here is a screenshot of what WMP12 looks like when the import dies: Any other ideas? Edit: OK, I Just confirmed this is definitely a problem not specific to my computer or configuration. I just did a clean installation of Windows 7 Ultimate x86 on an old test machine, opened WMP12 and added the same network folder of mp3's and it crashed about an hour into the import with the same appearance as the screenshot I posted above and the library disappears. So the problem has to be one of several things: The large size of the library The fact that the library is on the network A specific file or file is causing it the player to crash

    Read the article

  • PHP mtChart (new pChart): how do i control the angle of x-axis labels?

    - by gsquare567
    i am trying to graph the results of a survey, where the question is multiple choice. eg. How would you describe this website? format: option | number of times selected | percentage of users who selected that option Informative 1 50% All of the above 1 50% Interesting 0 0% Intelligent 0 0% Cool 0 0% Incredible 0 0% Sleek 0 0% Amazing the graph is a bar graph, where each bar represents one of those options, and the height of the bar depends on the number of times selected. however, the labels are slanted at a 45 degree angle and are barely readable! here is my code: <?php require_once ("includes/common.php"); require_once ("graph/mtChart.min.php"); // type must be specified $type = $_GET['type']; if($type == "surveys_report_MC_or_CB") { // PARAMS $surveyID = $_GET['surveyID']; $questionID = $_GET['questionID']; // END PARAMS $question = SurveyQuestions::getSingle($questionID); $answers = SurveyAnswers::getAll($questionID); $options = SurveyQuestionOptions::getAll($question[SurveyQuestions::surveyQuestionID]); $others = SurveyAnswers::setOptionCounts($options, $answers); $printedOthers = false; // set graph $values = array(); $axisLabels = array(); foreach($options as $option) { $values[$option[SurveyQuestionOptions::optionText]] = $option['count']; $axisLabels[] = $option[SurveyQuestionOptions::optionText]; } $graphs = array(); $graphs[0] = $values; $xName = "Option"; $yName = "Number of Times Selected"; $graphTitle = $question[SurveyQuestions::question]; $series = array("Total"); $showLegend = false; $tall = false; } drawGraph($graphs, $axisLabels, $xName, $yName, $graphTitle, $series, $showLegend, $tall); function drawGraph($graphs, $axisLabels, $xName, $yName, $graphTitle, $series, $showLegend, $tall) { $Graph = ($tall) ? new mtChart(575,375) : new mtChart(575,275); // Dataset definition $avg = 0; $i = 0; foreach ($graphs as $key => $value) { $Graph->AddPoint($value,"series" . $key); $Graph->SetSerieName($series[$key],"series" . $key); // Get average $avg += array_sum($value); $size = sizeof($value); $i += $size; // Calculate x-axis tick interval $step = ceil($size / 25); } $Graph->AddPoint($axisLabels,"XLabel"); $Graph->AddAllSeries(); $Graph->RemoveSerie("XLabel"); $Graph->SetAbsciseLabelSerie("XLabel"); $Graph->SetXAxisName($xName); $Graph->SetYAxisName($yName); // Get from cache if it exists $Graph->enableCaching(NULL, 'graph/cache/'); $Graph->GetFromCache(); // Initialize the graph $Graph->setInterval($step); $Graph->setFontProperties("graph/tahoma.ttf",8); ($showLegend) ? $Graph->setGraphArea(45,30,475,200) : $Graph->setGraphArea(75,30,505,200); $Graph->drawGraphArea(255,255,255,TRUE); $Graph->drawScale(SCALE_START0,100,100,100,TRUE,55,1,TRUE); $Graph->drawGrid(4,TRUE,230,230,230,50); // Draw the 0 line $Graph->setFontProperties("graph/tahoma.ttf",6); $Graph->drawTreshold(0,143,55,72,TRUE,TRUE); // Draw the bar graph $Graph->drawBarGraph(); // Draw average line $Graph->drawTreshold($avg/$i, 0, 0, 0, FALSE, FALSE, 5); // Finish the graph $Graph->setFontProperties("graph/tahoma.ttf",8); if ($showLegend) { $Graph->drawLegend(482,30,255,255,255,255,255,255,100,100,100); } $Graph->setFontProperties("graph/tahoma.ttf",10); $Graph->drawTitle(0,22,$graphTitle,100,100,100,555); // Draw Graph $Graph->Stroke(); } and here is where i use it on the page: <div class="graph_container"> <img src="drawGraph.php?type=surveys_report_MC_or_CB&surveyID=<?php echo $survey[Surveys::surveyID] ?>&questionID=<?php echo $question[SurveyQuestions::surveyQuestionID] ?>" /> is there a setting i can apply to the graph which will make the text look nicer, or at least let me set the angle to 90 degrees so people can read it if they cock their head to the left? thanks! btw, mtchart is located here: http://code.google.com/p/mtchart/ and pchart (the original, which has mainly the same code) is here: http://pchart.sourceforge.net/documentation.php

    Read the article

  • Facebook Graph API: user gender

    - by Mark
    The old Facebook API provided the user sex/gender as part of the default user data. Apparently the new Graph API does not provide that information, even though the documentation says that it does. I've heard people say that you need to request special permissions to get it and other pieces of data, but I have not been successful in getting it to work. Does anyone have an example, using the Facebook Graph API, of how to get the user's gender and/or location (city/state/country/whatever)?

    Read the article

  • How to draw a graph in LaTeX?

    - by Amir Rachum
    First of all, let me say I'm using LyX, though I have no problem using ERT. Secondly, what is the most simplest way to draw a simple graph like this in Latex? I've seen some documents with graphs and I've seen some examples, but I couldn't figure out how to just draw a simple graph - what packages do I need, etc?

    Read the article

  • jQuery Graph from a PHP page

    - by Francesc
    Hi. I'm looking for a jQuery Plugin to create a graph like that http://www.panic.com/blog/2010/03/the-panic-status-board/. To update the graph every x miliseconds from a PHP page and the numbers that are on the top. Is it possible? Do you know any plugin that does that? Thanks!

    Read the article

  • Drawing a Web Graph

    - by Kenn
    I'm trying to draw a graph on an ASP webpage. I'm hoping an API can be helpful, but so far I have not been able to find one. The graph contains labeled nodes and unlabeled directional edges. The ideal output would be something like this. Anybody know of anything pre-built than can help?

    Read the article

  • Custom InputIterator for Boost graph (BGL)

    - by Shadow
    Hi, I have a graph with custom properties to the vertices and edges. I now want to create a copy of this graph, but I don't want the vertices to be as complex as in the original. By this I mean that it would suffice that the vertices have the same indices (vertex_index_t) as they do in the original graph. Instead of doing the copying by hand I wanted to use the copy-functionality of boost::adjacency_list (s. http://www.boost.org/doc/libs/1_37_0/libs/graph/doc/adjacency_list.html): template <class EdgeIterator> adjacency_list(EdgeIterator first, EdgeIterator last, vertices_size_type n, edges_size_type m = 0, const GraphProperty& p = GraphProperty()) The description there says: The EdgeIterator must be a model of InputIterator. The value type of the EdgeIterator must be a std::pair, where the type in the pair is an integer type. The integers will correspond to vertices, and they must all fall in the range of [0, n). Unfortunately I have to admit that I don't quite get it how to define an EdgeIterator that is a model of InputIterator. Here's what I've succeded so far: template< class EdgeIterator, class Edge > class MyEdgeIterator// : public input_iterator< std::pair<int, int> > { public: MyEdgeIterator() {}; MyEdgeIterator(EdgeIterator& rhs) : actual_edge_it_(rhs) {}; MyEdgeIterator(const MyEdgeIterator& to_copy) {}; bool operator==(const MyEdgeIterator& to_compare) { return actual_edge_it_ == to_compare.actual_edge_it_; } bool operator!=(const MyEdgeIterator& to_compare) { return !(*this == to_compare); } Edge operator*() const { return *actual_edge_it_; } const MyEdgeIterator* operator->() const; MyEdgeIterator& operator ++() { ++actual_edge_it_; return *this; } MyEdgeIterator operator ++(int) { MyEdgeIterator<EdgeIterator, Edge> tmp = *this; ++*this; return tmp; } private: EdgeIterator& actual_edge_it_; } However, this doesn't work as it is supposed to and I ran out of clues. So, how do I define the appropriate InputIterator?

    Read the article

  • how to associate a custom Page with new doccument in doccument library,also the fields in rhe page w

    - by Ankur Madaan
    Hey, I am onto a task in which i have to create a link in a doccument library either upload or new link,clicking on which a form/page "not infopath" will get open and allow to upload the doccument and along with that we have some text boxes on the same page which will be asking for the properties of the doccument(like "Customer of the doccument","content Developer") and after filling up all of the things when user click on submit than in the doccument library the value of the url as well as properties comes into the columns/fields of the doccument library. Can anyone have the solution for this?

    Read the article

  • C++ code parser/processor library

    - by uray
    is there any library that parse a source code of C++ to produce lets say, call graph, class inheritance tree, flow control, class member list or anything as a ready to use graph or structure in code (not in diagram image). to make it more clear, suppose to generate call graph image, there will be a process like this: ` C++ source -> parser -> intermediate structure -> renderer -> call graph image ^ | [i need this] `

    Read the article

  • Big Data – Operational Databases Supporting Big Data – Columnar, Graph and Spatial Database – Day 14 of 21

    - by Pinal Dave
    In yesterday’s blog post we learned the importance of the Key-Value Pair Databases and Document Databases in the Big Data Story. In this article we will understand the role of Columnar, Graph and Spatial Database supporting Big Data Story. Now we will see a few of the examples of the operational databases. Relational Databases (The day before yesterday’s post) NoSQL Databases (The day before yesterday’s post) Key-Value Pair Databases (Yesterday’s post) Document Databases (Yesterday’s post) Columnar Databases (Tomorrow’s post) Graph Databases (Today’s post) Spatial Databases (Today’s post) Columnar Databases  Relational Database is a row store database or a row oriented database. Columnar databases are column oriented or column store databases. As we discussed earlier in Big Data we have different kinds of data and we need to store different kinds of data in the database. When we have columnar database it is very easy to do so as we can just add a new column to the columnar database. HBase is one of the most popular columnar databases. It uses Hadoop file system and MapReduce for its core data storage. However, remember this is not a good solution for every application. This is particularly good for the database where there is high volume incremental data is gathered and processed. Graph Databases For a highly interconnected data it is suitable to use Graph Database. This database has node relationship structure. Nodes and relationships contain a Key Value Pair where data is stored. The major advantage of this database is that it supports faster navigation among various relationships. For example, Facebook uses a graph database to list and demonstrate various relationships between users. Neo4J is one of the most popular open source graph database. One of the major dis-advantage of the Graph Database is that it is not possible to self-reference (self joins in the RDBMS terms) and there might be real world scenarios where this might be required and graph database does not support it. Spatial Databases  We all use Foursquare, Google+ as well Facebook Check-ins for location aware check-ins. All the location aware applications figure out the position of the phone with the help of Global Positioning System (GPS). Think about it, so many different users at different location in the world and checking-in all together. Additionally, the applications now feature reach and users are demanding more and more information from them, for example like movies, coffee shop or places see. They are all running with the help of Spatial Databases. Spatial data are standardize by the Open Geospatial Consortium known as OGC. Spatial data helps answering many interesting questions like “Distance between two locations, area of interesting places etc.” When we think of it, it is very clear that handing spatial data and returning meaningful result is one big task when there are millions of users moving dynamically from one place to another place & requesting various spatial information. PostGIS/OpenGIS suite is very popular spatial database. It runs as a layer implementation on the RDBMS PostgreSQL. This makes it totally unique as it offers best from both the worlds. Courtesy: mushroom network Tomorrow In tomorrow’s blog post we will discuss about very important components of the Big Data Ecosystem – Hive. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Big Data, PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL

    Read the article

  • Need some help understanding this problem about maximizing graph connectivity

    - by Legend
    I was wondering if someone could help me understand this problem. I prepared a small diagram because it is much easier to explain it visually. Problem I am trying to solve: 1. Constructing the dependency graph Given the connectivity of the graph and a metric that determines how well a node depends on the other, order the dependencies. For instance, I could put in a few rules saying that node 3 depends on node 4 node 2 depends on node 3 node 3 depends on node 5 But because the final rule is not "valuable" (again based on the same metric), I will not add the rule to my system. 2. Execute the request order Once I built a dependency graph, execute the list in an order that maximizes the final connectivity. I am not sure if this is a really a problem but I somehow have a feeling that there might exist more than one order in which case, it is required to choose the best order. First and foremost, I am wondering if I constructed the problem correctly and if I should be aware of any corner cases. Secondly, is there a closely related algorithm that I can look at? Currently, I am thinking of something like Feedback Arc Set or the Secretary Problem but I am a little confused at the moment. Any suggestions? PS: I am a little confused about the problem myself so please don't flame on me for that. If any clarifications are needed, I will try to update the question.

    Read the article

  • Shortest acyclic path on directed cyclic graph with negative weights/cycles

    - by Janathan
    I have a directed graph which has cycles. All edges are weighted, and the weights can be negative. There can be negative cycles. I want to find a path from s to t, which minimizes the total weight on the path. Sure, it can go to negative infinity when negative cycles exist. But what if I disallow cycles in the path (not in the original graph)? That is, once the path leaves a node, it can not enter the node again. This surely avoids the negative infinity problem, but surprisingly no known algorithm is found by a search on Google. The closest is Floyd–Warshall algorithm, but it does not allow negative cycles. Thanks a lot in advance. Edit: I may have generalized my original problem too much. Indeed, I am given a cyclic directed graph with nonnegative edge weights. But in addition, each node has a positive reward too. I want to find a simple path which minimizes (sum of edge weights on the path) - (sum of node rewards covered by the path). This can be surely converted to the question that I posted, but some structure is lost. And some hint from submodular analysis suggests this motivating problem is not NP-hard. Thanks a lot

    Read the article

  • Unable to retrieve search results from server side : Facebook Graph API usig Python

    - by DjangoRocks
    Hi all, I'm doing some simple Python + FB Graph training on my own, and I faced a weird problem: import time import sys import urllib2 import urllib from json import loads base_url = "https://graph.facebook.com/search?q=" post_id = None post_type = None user_id = None message = None created_time = None def doit(hour): page = 1 search_term = "\"Plastic Planet\"" encoded_search_term = urllib.quote(search_term) print encoded_search_term type="&type=post" url = "%s%s%s" % (base_url,encoded_search_term,type) print url while(1): try: response = urllib2.urlopen(url) except urllib2.HTTPError, e: print e finally: pass content = response.read() content = loads(content) print "==================================" for c in content["data"]: print c print "****************************************" try: content["paging"] print "current URL" print url print "next page!------------" url = content["paging"]["next"] print url except: pass finally: pass """ print "new URL is =======================" print url print "==================================" """ print url What I'm trying to do here is to automatically page through the search results, but trying for content["paging"]["next"] But the weird thing is that no data is returned; i received the following: {"data":[]} Even in the very first loop. But when i copied the URL into a browser, a lot of results were returned. I've also tried a version with my access token and th same thing happens. Can anyone enlighten me? +++++++++++++++++++EDITED and SIMPLIFIED++++++++++++++++++ ok thanks to TryPyPy, here's the simplified and edited version of my previous question: Why is that: import urllib2 url = "https://graph.facebook.com/searchq=%22Plastic+Planet%22&type=post&limit=25&until=2010-12-29T19%3A54%3A56%2B0000" response = urllib2.urlopen(url) print response.read() result in {"data":[]} ? But the same url produces a lot of data in a browser? Anyone? Best Regards.

    Read the article

  • Safe way for getting/finding a vertex in a graph with custom properties -> good programming practice

    - by Shadow
    Hi, I am writing a Graph-class using boost-graph-library. I use custom vertex and edge properties and a map to store/find the vertices/edges for a given property. I'm satisfied with how it works, so far. However, I have a small problem, where I'm not sure how to solve it "nicely". The class provides a method Vertex getVertex(Vertexproperties v_prop) and a method bool hasVertex(Vertexproperties v_prop) The question now is, would you judge this as good programming practice in C++? My opinion is, that I have first to check if something is available before I can get it. So, before getting a vertex with a desired property, one has to check if hasVertex() would return true for those properties. However, I would like to make getVertex() a bit more robust. ATM it will segfault when one would directly call getVertex() without prior checking if the graph has a corresponding vertex. A first idea was to return a NULL-pointer or a pointer that points past the last stored vertex. For the latter, I haven't found out how to do this. But even with this "robust" version, one would have to check for correctness after getting a vertex or one would also run into a SegFault when dereferencing that vertex-pointer for example. Therefore I am wondering if it is "ok" to let getVertex() SegFault if one does not check for availability beforehand?

    Read the article

  • Extraneous Library Linkage

    - by gmatt
    I have a question which may be somewhat silly because I'm pretty sure I may know the answer already. Suppose you have static library A, and dynamic shared object library B and your program C under linux. Suppose that library A calls functions from library B and your program calls functions from library A. Now suppose that all functions that C calls in A make no use of functions in B. To compile C will it be enough to link just A and omit B and furthermore can your program C be run on a system without library B installed?

    Read the article

  • C Run-Time library part 2

    - by b-gen-jack-o-neill
    Hi, I was suggested when I have some further questions on my older ones, to create newer Question and reffer to old one. So, this is the original question: What is the C runtime library? OK, from your answers, I now get thet statically linked libraries are Microsoft implementation of C standart functions. Now: If I get it right, the scheme would be as follow: I want to use printf(), so I must include which just tels compiler there us functio printf() with these parameters. Now, when I compile code, becouse printf() is defined in C Standart Library, and becouse Microsoft decided to name it C Run Time library, it gets automatically statically linked from libcmt.lib (if libcmt.lib is set in compiler) at compile time. I ask, becouse on wikipedia, in article about runtime library there is that runtime library is linked in runtime, but .lib files are linked at compile time, am I right? Now, what confuses me. There is .dll version of C standart library. But I thought that to link .dll file, you must actually call winapi program to load that library. So, how can be these functions dynamically linked, if there is no static library to provide code to tell Windows to load desired functions from dll? And really last question on this subject - are C Standart library functions also calls to winapi even they are not .dll files like more advanced WinAPI functions? I mean, in the end to access framebuffer and print something you must tell Windows to do it, since OS cannot let you directly manipulate HW. I think of it like the OS must be written to support all C standart library functions same way across similiar versions, since they are statically linked, and can differently support more complex WinAPI calls becouse new version of OS can have adjustements in the .dll file.

    Read the article

  • Tips for submitting a library to Boost?

    - by AraK
    Hi everyone, Summer is coming, and a group of friends and I are getting ready for it :) We decided to build a compile-time Arbitrary precision Unsigned Integers. We would like to provide a set of integers algorithms(functions) with the library. We have seen a number of requests for such a library(SoC2010, C++0x Standard Library wishlist). Also, a regular run-time bigint is requested usually with that, but we don't want to go into the hassle of memory management. The idea came to me from a library called TTMath, unfortunately this library works only on specific platforms because Assembly was used extensively in the library. We would like to write a standard library, depending on the C++ standard library and Boost. Also, we would like to use the available C++0x facilities in current compilers like user-defined literals and others. This would technically make the library non-standard for a while, but we think that it is a matter of time the new standards will be official. Your hints on the whole process including design, implementation, documentation, maintainable of the library are more than welcom. We are a group of students and fresh graduates who are looking for something interesting in the summer, but we see that Boost is full of gurus and we don't want to forget something too obvious. We are communicating on-line, so there is no shared white-boards :( Thanks,

    Read the article

  • computing "node closure" of graph with removal

    - by Fakrudeen
    Given a directed graph, the goal is to combine the node with the nodes it is pointing to and come up with minimum number of these [lets give the name] super nodes. The catch is once you combine the nodes you can't use those nodes again. [first node as well as all the combined nodes - that is all the members of one super node] The greedy approach would be to pick the node with maximum out degree and combine that node with nodes it is pointing to and remove all of them. Do this every time with the nodes which are not removed yet from graph. The greedy is O(V), but this won't necessarily output minimum number super nodes. So what is the best algorithm to do this?

    Read the article

  • Graph and permutation problem

    - by user319771
    I have a graph (with nodes and edges) containing symmetry and a group of permutations to label the nodes so no edges are changed (automorphisms). Now I would like to determine for which nodes a permutation exchanges two equivalent (i.e. nodes with the same color or symmetry class) neighboring nodes. When the nodes with equivalent neighbors stay the same, simply checking if the neighbors are exchanged in the permutation is enough. However, when the nodes with equivalent neighbors are also permuted (i.e. there are multiple nodes with the same color/symmetry class with the same equivalent neighbors), the problem becomes more complex. Is there any known algorithm for such a problem? Some remarks: The graph has no coordinates, it's a topology only

    Read the article

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