Search Results

Search found 2902 results on 117 pages for 'directed graph'.

Page 26/117 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Control flow graph & cyclometric complexity for folowing procedure

    - by softyGuy
    insertion_procedure (int a[], int p [], int N) { int i,j,k; for (i=0; i<=N; i++) p[i] = i; for (i=2; i<=N; i++) { k = p[i]; j = 1; while (a[p[j-1]] > a[k]) {p[j] = p[j-1]; j--} p[j] = k; } } I have to find cyclometric complexity for this code and then suggest some white box test cases and black box test cases. But I am having trouble making a CFG for the code. Would appreciate some help on test cases as well. Thanks a bunch in advance!

    Read the article

  • Top 10 Graph Charting Tools

    - by Daniel
    When charting information what is the best tool to use? Of course we call know if excel, but is there something better then that? I know if things like Google Chart Tools: http://code.google.com/apis/charttools/ But want to know what the best tools out there are.

    Read the article

  • How to create a "dependency graph" for IT assets

    - by p.marino
    One of my customers is trying to create an interactive "matrix" of interdependencies for the various applications used in their company (it's a travel&leisure company with around 2500 employees). The idea (still at the prototype stage) is to create a sort of Map, based on Visio or similar tool, which traces the communication and interdependencies between all the IT assets in the company, so that when someone asks for a change they can get an overview of the impacts. This was mentioned in a casual setting and it will not be my responsability to directly work on this, but I did contribute the little I know already in terms of vaguely related methodologies (Zachman Framework). I'd like to hear from the people in here if they know of methodologies, or tools, that may help this kind of effort, and if they have any specific experience to contribute. I'll digest the answers and send the result back to my customer, hoping this may be of some help with their task (which I consider a bit visionary and prone to all the pitfalls of any documentation project, but still well worth pursuing).

    Read the article

  • populate object graph from database

    - by Rama
    Hi, I would like to know the best way to populate an object that has a collection of child objects and each child object may inturn have a collection of objects, from database without making multiple calls to the database to get child objects for each object. basically in hierarchical format something like for example a customer has orders and each order has order items. is it best to retrieve the data in xml format (SQL server 2005), or retrieve a dataset by joining the related tables together and then map that the data to the object? thanks in advance for your help.

    Read the article

  • How can i bring pace to my Learning Graph?

    - by MSU
    I have been learning programming, mostly C# and .net stuff. And i have target to become a fulltime .NET developer. But i am feeling that learning Graph is very slow, i have been learning C# programming, doing some codes everyday, but how i can learn very fast and increase my skills rapidly. I know there should be a balace of coding and reading, as without reading i can't code and without coding i can't increase my skills. SO, I am requesting here suggestiong from experts on how i bring more pace to my learning graph, i intend to give 4-6 hours daily for this and on weekends 10+ hours ..

    Read the article

  • Difference between chart, plot and graph

    - by Pradyumna
    I'm thinking of what would be the right terms to use in the UI of my new program, when referring to graphical data representations - i.e., whether to call them "charts", "plots" or "graphs". I was wondering how these terms are different, and when is it appropriate to use each of them? Thanks, Pradyumna

    Read the article

  • Create event for another owner using Facebook Graph API

    - by David
    Hi, I'm at the moment working on a web page where the users who visit it should have the possibility to create an event in my web page's name. There is a Page on Facebook for the web page which should be the owner of the user created event. Is this possible? All users are authenticated using Facebook Connect, but since the event won't be created in their name I don't know if that's so much of help. The Python SDK will be used since the event shall be implemented server side. / D

    Read the article

  • R: Plotting a graph with different colors of points based on advanced criteria

    - by balconydoor
    What I would like to do is a plot (using ggplot), where the x axis represent years which have a different colour for the last three years in the plot than the rest. The last three years should also meet a certain criteria and based on this the last three years can either be red or green. The criteria is that the mean of the last three years should be less (making it green) or more (making it red) than the 66%-percentile of the remaining years. So far I have made two different functions calculating the last three year mean: LYM3 <- function (x) { LYM3 <- tail(x,3) mean(LYM3$Data,na.rm=T) } And the 66%-percentile for the remaining: perc66 <- function(x) { percentile <- head(x,-3) quantile(percentile$Data, .66, names=F,na.rm=T) } Here are two sets of data that can be used in the calculations (plots), the first which is an example from my real data where LYM3(df1) < perc66(df1) and the second is just made up data where LYM3 perc66. df1<- data.frame(Year=c(1979:2010), Data=c(347261.87, 145071.29, 110181.93, 183016.71, 210995.67, 205207.33, 103291.78, 247182.10, 152894.45, 170771.50, 206534.55, 287770.86, 223832.43, 297542.86, 267343.54, 475485.47, 224575.08, 147607.81, 171732.38, 126818.10, 165801.08, 136921.58, 136947.63, 83428.05, 144295.87, 68566.23, 59943.05, 49909.08, 52149.11, 117627.75, 132127.79, 130463.80)) df2 <- data.frame(Year=c(1979:2010), Data=c(sample(50,29,replace=T),75,75,75)) Here’s my code for my plot so far: plot <- ggplot(df1, aes(x=Year, y=Data)) + theme_bw() + geom_point(size=3, aes(colour=ifelse(df1$Year<2008, "black",ifelse(LYM3(df1) < perc66(df1),"green","red")))) + geom_line() + scale_x_continuous(breaks=c(1980,1985,1990,1995,2000,2005,2010), limits=c(1978,2011)) plot As you notice it doesn’t really do what I want it to do. The only thing it does seem to do is that it turns the years before 2008 into one level and those after into another one and base the point colour off these two levels. Since I don’t want this year to be stationary either, I made another tiny function: fun3 <- function(x) { df <- subset(x, Year==(max(Year)-2)) df$Year } So the previous code would have the same effect as: geom_point(size=3, aes(colour=ifelse(df1$Year<fun3(df1), "black","red"))) But it still does not care about my colours. Why does it make the years into levels? And how come an ifelse function doesn’t work within another one in this case? How would it be possible to the arguments to do what I like? I realise this might be a bit messy, asking for a lot at the same time, but I hope my description is pretty clear. It would be helpful if someone could at least point me in the right direction. I tried to put the code for the plot into a function as well so I wouldn’t have to change the data frame at all functions within the plot, but I can’t get it to work. Thank you!

    Read the article

  • AutoMapper: How to transform object graph to into?

    - by epitka
    If I have a one-to-many relationship and I want to transorm this into a list of flat Dto-s where some attributes of parent and some of child appear in a dto, is this something that is supported out-of-box with AutoMapper? For example if I have something like this Parent 1. ParentId 2. ParentAttr1 3. List<Child> Child 1. ChildId 2. ChildAttr1 2. ChildAttr2 Dto 1. ParentId 2. ChildId 2. ChildAttr1 3. ChildAttr2 How do I project Parent into a Dto where for each child in parent I will get an instace of Dto? I've setup two maps Parent-Dto and Child-Dto but just doing _mapper.Map(parentInstance) only projects parents attributes. Does this have to be done in two steps, where I would iterate children myself?

    Read the article

  • In DirectShow, what determines the graph source?

    - by Seva Alekseyev
    Hi all, I have two machines - A (XP SP2) and B (Win7). Machine B has trouble playing OGM files - enabling subtitles causes a crash in the player. Investigation shows that the DirectShow graphs are quite different. On A, the source is a file source, which produces a stream of subtype OGG, which goes into "Ogg Splitter". On B, the source is an instance of Haali Media Splitter, which produces video, audio, and subtitles as separate streams. Machine A has Haali splitter installed as well, but it is not invoked somehow. Question - what determines the source filter? Is there a file type to preferred source mapping, or does the system load and ask all suitable filters if they would take this file? On machine A, the merit of Haali splitter is higher than that of File source, so it's probably not about relative merits.

    Read the article

  • Flex graph printing

    - by vanzylv
    Hi Guys I'm looking for a way to print / save flex graphs, preferably without changing the flex code.Is this possible to to from the client with some kind of JavaScript library.If I need to change the flex,is ALIVEPDF the way to go (converting content to pdf first) or are there simpler solutions to this. Thanks

    Read the article

  • Graph of included files

    - by Dacav
    When I work on someone else's code, I tipically need to abuse of grep in order to find data types declarations etc, and this usually makes me confused. I'd like to have some tool which analyzes the source code and produces some graphviz-like drawing and allows me to follow dependencies. Also I've found this on the internet, but I think is taylored for the linux kernel only.

    Read the article

  • Graph generation on iPhone

    - by Parrots
    Anyone have experience with drawing graphs on the iPhone? Looks like GraphKit isn't an option, so it's up to the programmer to either write his own library (using OpenGL, I guess), or an existing library. I can't seem to find any libraries that are confirmed to work on the iPhone. If you've written your own how did you go about it (opengl, quartz, etc), or if you used a library which one?

    Read the article

  • How to serialize a Linq to Sql object graph without hiding the child's "Parent" member

    - by Richard B
    Without hiding the Child object's reference to the Parent object, has anyone been able to use an XmlSerializer() object to move a Linq to SQL object to an XML document, or is the only appropriate way of handling this to create a custom serialization/deserialization class to handle moving the data to/from the xml document? I don't like the idea of hiding the child object's reference to the parent object is why I'm asking. Thx.

    Read the article

  • javascript - query object graph?

    - by Scott
    Given an object like this: var obj = { first:{ second:{ third:'hi there' } } }; And a key like this "first.second.third" How can I get the value of the nested object "hi there"? I think maybe the Array.reduce function could help, but not sure.

    Read the article

  • fast load big object graph from DB

    - by Famos
    Hi I have my own data structure written in C# like: public class ElectricScheme { public List<Element> Elements { get; set; } public List<Net> Nets { get; set; } } public class Element { public string IdName { get; set; } public string Func { get; set; } public string Name { get; set; } public BaseElementType Type { get; set; } public List<Pin> Pins { get; set; } } public class Pin { public string IdName { get; set; } public string Name { get; set; } public BasePinType PinType { get; set; } public BasePinDirection PinDirection { get; set; } } public class Net { public string IdName { get; set; } public string Name { get; set; } public List<Tuple<Element,Pin>> ConnectionPoints { get; set; } } Where Elements count ~19000, each element contain =3 Pin, Nets count ~20000, each net contain =3 pair (Element, Pin) Parse txt (file size ~17mb) file takes 5 minutes. Serilization / Deserialization by default serializer ~3 minutes. Load from DB 20 minutes and not loaded... I use Entity Framework like public ElectricScheme LoadScheme(int schemeId) { var eScheme = (from s in container.ElectricSchemesSet where s.IdElectricScheme.Equals(schemeId) select s).FirstOrDefault(); if (eScheme == null) return null; container.LoadProperty(eScheme, "Elements"); container.LoadProperty(eScheme, "Nets"); container.LoadProperty(eScheme, "Elements.Pins"); return eScheme; } The problem is dependencies between Element and Pin... (for ~19000 elements ~95000 pins) Any ideas?

    Read the article

  • DGML viewer in VS 2010

    - by Fiona Holder
    I've started messing around with the DGML viewer in VS 2010 (which seems awesome). I know you can create diagrams from your code base. Is there any support for creating a directed graph from whatever I like, or is it purely a code analysis tool? I'd like something along the lines of 'Add Node' or something.

    Read the article

  • Versioned RDF store

    - by Mat
    Let me try rephrasing this: I am looking for a robust RDF store or library with the following features: Named graphs, or some other form of reification. Version tracking (probably at the named graph level). Privacy between groups of users, either at named graph or triple level. Human-readable data input and output, e.g. TriG parser and serialiser. I've played with Jena, Sesame, Boca, RDFLib, Redland and one or two others some time ago but each had its problems. Have any improved in the above areas recently? Can anything else do what I want, or is RDF not yet ready for prime-time? Reading around the subject a bit more, I've found that: Jena, nothing further Sesame, nothing further Boca does not appear to be maintained any more and seems only really designed for DB2. OpenAnzo, an open-source fork, appears more promising. RDFLib, nothing further Redland, nothing further Talis Platform appears to support changesets (wiki page and reference in Kniblet Tutorial Part 5) but it's a hosted-only service. Still may look into it though. SemVersion sounded promising, but appears to be stale.

    Read the article

  • retrieve events where uid is the creator and application id is the admin - Facebook API

    - by Anup Parekh
    I would like to know if there is a Facebook API call to retrieve the events (eids) for all the events a user has created using my facebook connect application. The events are created using the following REST api call: https://api.facebook.com/method/events.create?event_info=' . $e_i . '&access_token=' . $cookie['access_token'] $e_i is the event info array where the 'host' value is set to 'Me' as follows $event_info['host'] = 'Me'; On Facebook events under the "Created by:" section it lists "My user name,Application Name", I presume this is because I am the creator and the application is the admin as stated in the REST api documentation http://developers.facebook.com/docs/reference/rest/events.create/ Unfortunately I cannot seem to find out how (neither REST nor GPRAPH API) to return a list of events where I am the creator and the application is the admin as in the above scenario. If this is possible I would really appreciate some assistance with how it is done. So far I have tried: REST API events.get using uid=application_id. This only returns events created by the application not those including the user who created them GRAPH API https://graph.facebook.com/me/events?fields=owner&access_token=... this returns all the events for 'me' but not where the application is also the admin. It seems strange that there's no reference to the linkage between the event creator and the event admin through the API but in Facebook it is able to pull both and display them on the event details.

    Read the article

  • Facebook API - delete status

    - by Simon R
    In PHP, I'm using curl to send a delete to the fb graph api - and yet I'm getting the following error; {"error":{"type":"GraphMethodException","message":"Unsupported delete request."}} The code I'm using is; $ch = curl_init("https://graph.facebook.com/" . $status_id . ""); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 120); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $query); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_CAINFO, NULL); curl_setopt($ch, CURLOPT_CAPATH, NULL); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); $result = curl_exec($ch); echo $result; $query contains the access token.

    Read the article

  • Pecking order of pigeons?

    - by sc_ray
    I was going though problems on graph theory posted by Prof. Ericksson from my alma-mater and came across this rather unique question about pigeons and their innate tendency to form pecking orders. The question goes as follows: Whenever groups of pigeons gather, they instinctively establish a pecking order. For any pair of pigeons, one pigeon always pecks the other, driving it away from food or potential mates. The same pair of pigeons always chooses the same pecking order, even after years of separation, no matter what other pigeons are around. Surprisingly, the overall pecking order can contain cycles—for example, pigeon A pecks pigeon B, which pecks pigeon C, which pecks pigeon A. Prove that any finite set of pigeons can be arranged in a row from left to right so that every pigeon pecks the pigeon immediately to its left. Since this is a question on Graph theory, the first things that crossed my mind that is this just asking for a topological sort of a graphs of relationships(relationships being the pecking order). What made this a little more complex was the fact that there can be cyclic relationships between the pigeons. If we have a cyclic dependency as follows: A-B-C-A where A pecks on B,B pecks on C and C goes back and pecks on A If we represent it in the way suggested by the problem, we have something as follows: C B A But the above given row ordering does not factor in the pecking order between C and A. I had another idea of solving it by mathematical induction where the base case is for two pigeons arranged according to their pecking order, assuming the pecking order arrangement is valid for n pigeons and then proving it to be true for n+1 pigeons. I am not sure if I am going down the wrong track here. Some insights into how I should be analyzing this problem will be helpful. Thanks

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >