Graph maker

i compiled a little graph making app for a school project but i don't know java too much and i think i made some mistake
the app is supposed to read the data(numerical values) from an ASCII file and use it to build a graph (each coupple of values is the x and the y of a point in the graph) and the data of the file are refreshed constantly by a fortran program that i don't know (my teacher will do it and i don't know notting about it).... that's the code
import java.io.*;
import java.awt.*;
import javax.swing.*;
int record1 = new int [3000]
class graficatore {
     public class MyCanvas extends Canvas {
          public void paint {
               for ( ; i < 300; i++) { // per disegnare pi di 300 cerchi aumentare il valore della condizione
               graphics.setColor(Color.white);
               graphics.fillOval(xcentro, ycentro[i], raggio1[raggio_cerchio], raggio2[raggio_cerchio]);
                    /*vedere se questo basta oppure ci vuole anche quello sotto
               graphics.setColor(Color.blue);
               graphics.drawOval(xcentro[i], ycentro[i], raggio1[raggio_cerchio], raggio2[raggio_cerchio]); */
     public static void main (String[] args) {
          int i = 0;//variabile di controllo del ciclo while per il disegno dei cerchi
          int j = 0;
          MyCanvas canvas = new MyCanvas();
JFrame frame = new JFrame();
frame.setSize(400, 400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(canvas);
frame.setVisible(true); // questo blocco di codice ? per fare il frame
          //FileReadTest t = new FileReadTest();
//t.readMyFile(); questo blocco di codice per lanciare il File Reader
          double xcentro = new int[2000];
          double ycentro = new int[2000];// array per i cerchi per disegnare pi di 300 cerchi aumentare il valore della condizione
          int raggio_cerchio = 5;
          for (; j>300; j+5) {
               xcentro[] = record(j);
               FileReadTest t = new FileReadTest();
               t.readMyFile(); //questo blocco di codice per lanciare il File Reader
               graphic_create g = new graphic_create();
               g.paint();
     void readMyFile() {
String record = null;
int recCount = 0;
try {
               FileReader fr FileReader("data file location");
               BufferedReader br = new BufferedReader(fr);
               record = new String();
               while ((record = br.readLine()) != null) {
                    recCount++;
                    System.out.println(recCount + ": " + record);
               record = record1[]
          catch (IOException e) {
               // catch possible io errors from readLine()
               System.out.println("Uh oh, got an IOException error!");
               e.printStackTrace();
     } // end of readMyFile()
} // end of classi hope that you could help me and say thank you to all who reply me
Edited by: filopelor92 on Sep 12, 2010 3:06 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

filopelor92 wrote:
wait if i could ask my teacher help i would have done it but unfortunately he doesn't know it so i can't do it he's not computing teacher but a math and phisics one Then what the hell is the program for? What is the course? What were the course requirements (or as many people like to say "prequirements")?
and of course i'm going to learn java (at the university)So, either this is a course were Java (or some other language) was required and you either lied about that or ignored it. Both of which is your fault, correct it or live with the consequences. Or this is a Java course and you're just interested in someone doing your homework for you which spells danger for your college "aspirations".
but now i don't have neither the time (i'm in the last year of study in italy of high school and this year we have a really tough exam to prepare and i can't spend time in other things) nor some teacher or someone to ask for helpYou can ask for "help", right here. Unfortunately you're not asking for help, you're asking for a handout that will only hurt you in the future. Two very different things.
so at the moment i Wont learn java i'll Wait for next year's university courseWell, my second reply in this post spells out what I think of this remark.

Similar Messages

  • SVG graph maker

    I am working on a program that will generate 'clean' svg (vector graphics) graphs from data sets.
    It is still very much in it's infancy - so much so that I would not even yet announce it except for the fact that it came up in another discussion.  I figured I could open this thread to move the svg discussion here.
    My current plans are for relatively simple barplots and scatter/line plots.  I'd like them to remain simple as they are created in such a way that they can be easily edited by the user after the fact.
    This is in contrast to other tools I have used to create svg image files.  The R statistical package will create svg graphs, and programs like inkscape (or illustrator) can "trace" most image files to produce a vector image.  I see two major drawbacks of these methods.  First they create *enormous* files due to an extensive and unnecessary use of svg 'paths'.  Secondly, the resulting files may look good, but they are very hard to edit because 1) they are huge, and 2) they are quite 'convoluted' - if one looks at the resulting code, it is essentially unreadable.
    I don't really see this as a criticism of the existing methods - as they do what they are supposed to.  My goal is to create a tool that does something different: create the skeleton of svg code that is easily human-readable and human-editable.
    Prior to starting this tool I would make my svg's "by hand" with just a text editor.  By doing it this way I had complete control over the results, and my graphs would be several orders of magnitude smaller than similar ones generated by R or inkscape.
    A bar graph, for example, can be some CSS styling, a couple axes, and some '<rect>'s for bars.  This could be just a dozen lines of svg code.  R, in contrast, would generate thousands of lines of svg '<path>'s for the same  result.
    Later today I will get what I have so far up on my drop-box.  But I want to warn, again, that due to the expedited posting of this topic, the program is far from even "beta" ready.   I have tested it to generate some nice simple bar graphs currently with no axis labels, no error bars, nothing: just an x + y axis, and the data bars.
    I'll put the dropbox link here, and post updates here.  I'd love to get feedback or feature requests once this gets rolling.
    EDIT: here's the source
    Last edited by Trilby (2012-01-14 21:33:10)

    To follow up - I still suspect when this tool is doing what I want it to, I will still edit my svg's by hand in a text editor.  The primary goal of this tool is to automate many of the repetitive steps of coordinate conversions, and laying out the groups and tags appropriately.

  • How can I use a graph make with ppt for Window on a ppt for Mac

    Dear Sir,
    A colleague of me is working with a Window PC. He make a powerpoint presentation which contain graphic.
    He sent it to another colleague who work with a Mac and Office 2011 for Mac. He can open the file, bur some sientific caratere are "damaged".
    However, if he open the same file with Office 2008 for mac, it's work.
    Do you have an idea how to make the Office 2011 for make able to read sientific caratere from a powerpoit file which come from the Window powerpoint?
    Is there a plugin for that?
    many thank

    Try "Save as" and save it in Office 2008 format.

  • How can I easily make a screen shot of a polar graph?

    Hi everyone,
    I am using the very simple VI I have attached to display points (up to 50000 points) on a polar graph. When the screen moves over to the area where there is the graph, the big number of dots included in the graph makes everything become very very slow. I would like to know if there is an easy way to make a print screen of the graph so that I initialize back the graph to no points (or make it invisible) and just display the print screen shot of the graph.
    I have already used the print screen function (+ cutting off the parts of the picture I don’t want) but this is a bit fastidious to do. Would an already made print screen function exist for this kind of graph?
    Thanks a lot,
    User
    Solved!
    Go to Solution.
    Attachments:
    Forum 29 07 10.vi ‏27 KB
    Forum 29 07 10.doc ‏85 KB

    This example show how to do it in two ways
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    Forum 29 07 10_v2.vi ‏31 KB

  • How to make file associations in my java apps

    I am making a Graph maker in Java. Just give x = 1,2,3,4,5 and corresponding y = f(x) and get the discreate graph.
    The graph can then be saved as a file of extention .grf (say) on the hard disk, and can be opened in my graph maker software for editing, viewing e.t.c.
    Now my problem is that I want that when I dubble click on a file xyz.grf my graph maker should open automatically with this file opened in it, like other applications on windows say Notepad - dubble click on xyz.txt it will automatically launch Notepade with this file.
    In other way I want that any .grf file gets associated to my graf maker.
    Please help me and tell me the way, how should I proceed and how can I do this.

    aashishjava wrote:
    Yes Yes Yes It is 99% what I wanted to have. Thanks a lot ....You're welcome.
    But now I want some thing more,(hand to forehead) They always want more. ;)
    (a) There is a splash screen in my app. but JNLP always show its own splash screen, ...Webstart splash screens work differently to those of plain Jar files (which is unfortunate). A webstart splash screen has to be not included in the Jar, but available as a separate resource. The splash is defined in the JNLP launch file. For further details see the [JNLP File Syntax|http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html].
    <quote>
    The optional kind="splash" attribute may be used in an icon element to indicate that the image is to be used as a "splash" screen during the launch of an application. If the JNLP file does not contain an icon element with a kind="splash" attribute, but does contain another icon tag, Java Web Start will display a splash screen consisting of the image specified by the icon element on the left and the application's title and vendor on the right.
    The first time an application is launched following the addition or modification of the icon element in the JNLP file, the old splash image will still be displayed. The new splash image will appear on the second and subsequent launches of the application.
    </quote>
    The 'ignored first time' is because the webstart client is more focused on getting the app. downloaded, cached and launched, than showing splashes. Once the app. is on-screen, it will download the splash in the background.
    One other 'gotcha' of splash screens is that the JNLP file must define a href in the JNLP element for the splash to be used. The webstart client assumes that a JNLP with no href is dynamically generated, and will not be the same twice. Because of that it ignores the splash!
    Edit 1:
    Unfortunately, I do not have any direct examples of using splash screens A splash is usually on my 'To Do' list for projects, but it is a very low priority.
    Edited by: AndrewThompson64 on Dec 10, 2009 11:35 AM

  • Reversing the Make Current Values Default command

    Hi,
    I was working with a labview program this evening and had been using the 'Reinitialize all to default' command under the operate menu to clear all of the waveforms on my screen.  However, I accidentally chose the 'Make current values default' command and cannot erase what shows up in the waveforms.  I am sure there is a simple fix to my problem but I couldn't figure it out.  I tried rewiring parts of my block diagram do exclude the waveform graphs with the hope that the waveforms would go away but realized that the graphs weren't wired so nothing was going to change.  Any help would be appreciated.
    Thank You,
    bsteinma
    Solved!
    Go to Solution.

    There are a few simpler ways than closing and reopening the VI.
    If you realized the mistake right (or soon) after you did it, a ctrl+z will undo the operation and you have your old defaults back.
    If you are past that stage, a simple "menu...file...revert" will revert the VI to the last saved version. No need to exit and reload.
    If you accidentally saved it with the new defaults, "right-click the graph...data operations...clear graph", make default, save VI again.
    Good luck!
    LabVIEW Champion . Do more with less code and in less time .

  • Need to improve speed when graphing large arrays

    My app generates several arrays of 500.000 elements which I want to display in a graph. Sending this array directly to a graph makes everything go very slow, I guess because of large memory allocations (LV is obviously not very good at handling large data unless having very good insight in how LV handles memory etc). It has been suggested in other posts and in App notes to decimate the data before displaying, since the graph can't display more points than the pixel-width anyway. The question is how to implement a decimation algorithm in order to get the same graph as if no decimation was made, and to preserve resolution when zooming into the graph. which require doing a new decimation with a new subset of the data. I think this graph decimation algo should have been implemented as a VI in LV, to put between the data and the graph. Since this is inherent in Labview when trying to graph more data points than pixelwidth, it should be hard to implement such a feature in LV. I would think this is  quite common problem and would like to get some comments , especially from NI people, about this issue. Any work-arounds are also appreciated.

    You are probably going to need the following sub vi's as well.
    Thank You,
    Earl
    Attachments:
    Contrast Bright Controls.vi ‏24 KB
    AI Read config.vi ‏28 KB
    Read Line.vi ‏21 KB

  • Not enough memory to complete operation

    I've looked through the forums for the "not enough memory to complete operation" error and despite following the advice I found, the error still occurs.
    I'm using LabVIEW 2012 to try and continuously monitor our system, recording temperature, power, etc vs time (values obtained from USB-6008 DAQ).  The data being saved to file, is done every 60 seconds using a small array (no problems here).  The typical run/time memory allocation to LabVIEW is about 180MB (4GB RAM on computer).
    The issue I feel is related to our wish to display this data on graphs for extended periods of time.  The current iteration of the code works as follows.  
    1) we have 2 XY graphs with 2 plots each.  
    2) for each plot, I am initializing clusters of 2 arrays of 100,000 (XY pairs) which are wired to shift registers.  I know this is larger than can be displayed on a graph but I am currently more concerned with reducing the number of data copies.  
    3)  Every 10th data point is added into the arrays using an In Place Element Unbundle/Bundle along with a "Replace Array Subset".  This means there are approximatly 8640 points per day. (A single day is the shortest time span typically viewed)
    4)  For two plots on an XY graph, two clusters are combined in an array (using Build Array).  I think this is my problem right here.  Since everytime I update the graphs Labview has to allocate memory for the 4 XY plots. ( Am I correct here?)
    Decimating the data further when looking over multiple days will reduce the amount written to the plots.  However this operation creates data copies.  Is it worthwhile in this case? 
    Instead of initializing 4 clusters (1 for each plot) and combining into arrays later, would it be better to initialize Array of cluster of arrays (2 plots per graph) and update the data by "index / unbundle / replace array subset / bundle replace array subset" series of operations?
    Solved!
    Go to Solution.

    Hooovahh wrote:
    But what I think is more important is your middle loop is unbounded in size for its arrays.  Memory will continue to grow until it crashes.  You removed the write VI but I'm guessing you are essentially overwritting the old file with all the same data but with 1 extra data point.  Why not just write that one extra data point by appending to the existing file?  Look at the Write To Spreadsheet which shows how to append to file (it is an optional input).
    If you'll notice the section where I comment that the save VI is deleted, there is a null array wired to the shift register.  While this probably isn't the best practice, the array builds to 60, appended to the text file, and overwritten with the null array.  This is to avoid opening/closing the file every second.
    The other array there stores power and time for every data point when the sun is up for the day (probably near 50,000 data points).  This is done to calculate the days insulation by integration.  This array could probably stand some improvement using an initialized array.  (i got tunnel vision on the other part of the code and missed this).
    In regards to the graphs containing multiple days worth of data to be viewed at any time, yes this is a requirement (the more the better).  This is for monitoring a solar array at our University and, once free from bugs, will be linked to a web page using the Web Server.  So individuals may view data within the past 1,2, or even 3 weeks.  Normally, I would just have a separate VI for viewing data when desired but 24/7 access to view the updated data is a requirement.
    Am I correct in that the Build Arrays (just prior to the graphs) makes a data copy of each cluster?  Could it be this large data copy that's the cause of the error?  My understanding from other posts is that this error is generally linked to non-continuous memory allocation for arrays/clusters.  

  • For all the Illustrator chart gurus

    I work in the financial industry and I have to add data labels to all bars that appear in my performance graphs (see http://fundinvestor.calamos.com/ClosedEndFunds/CEFund.aspx?name=CHI under the "Performance" tab as an example). What's a way to do this without keying these numbers in per data point? I saw there's this technique that Adobe offers for column totals: http://livedocs.adobe.com/en_US/Illustrator/13.0/help.html?content=WS714a382cdf7d304e7e07d 0100196cbc5f-619e.html but that's not working. What am I doing wrong? Adding data labels to bars is ridiculously simple in Excel, why can't I find the way to do it easily in Illustrator?

    Not a guru, but that link does explain it, in all its relative rube goldberginess.
    draw a rectangle for the column, color it etc; using the text tool, type % and then 0 followed by a digit that represents how many numbers you wish to appear after the decimal (%03 would get you 4.123 for instance); format the text as you will; place the text where you want it relative to the rectangle; group the rectangle and the text; select design under object>graph; make new design.
    make graph; enter data; close data window; select graph; under object>graph>column select column design and column type (I like sliding the best)
    You can color individual columns using direct select tool.
    Excel probably works better

  • Questions regarding: 1) Photoshop and Illustrator softwares 2) .eps file formats.

    I'm using a DELL PC running Win7. I have Adobe Photoshop CS (i.e. the first CS version from 2003).
    I do not yet have Adobe Illustrator.
    I'm creating images for a science publication. It includes graphs, chemical structures, color photos of lab
    equipment. I use ChemBioDraw (Cambridgesoft, http://scistore.cambridgesoft.com) to draw chemical
    structures and schematics. I've been using MS Powerpoint to draw graphs, make composites of photos, label
    panels, and add annotation.
    1) The publishing company wants line drawings to be in .eps format. I can copy and paste ChemBioDraw
    and Powerpoint figures into Photoshop and then save them in .eps format. They look identical to me when in
    .eps format. Will this be suitable for publication?
    2) The ChemBioDraw figure file size increases more than tenfold when converted to .eps format. Is this
    expected?
    3) I have used Photoshop a lot in the past but not for my recent work. My coauthor uses Adobe Illustrator on
    a PowerMac G5-9.1. He creates .eps files for line drawings. Are the drawing tools in Illustrator much
    better than those in Photoshop? If I get Illustrator will I be able to manipulate photo images (create
    composites, add annotation etc.) as I have with Photoshop in the past?
    4) My coauthor has sent me some .eps line drawings. When I open them with Photoshop there is a gray and
    white checkerboard pattern in the background. I believe this is because the background layer has been
    eliminated (the image is in layer 1). Can such a file be opened in a way that the background is solid white?
    5) Is there a Windows-compatible software for viewing .eps files that is simpler than Photoshop or Illustrator  (i.e. no editing
    function)?
    Thanks,
    Thomas C.

    1) No. Photoshop does not create true vector files. Anyone asking for an EPS more than likely wants a true vector EPS file.
    2) No way of telling without seeing the results. But it could be perfectly normal. Increased file size in an EPS does not automatically mean there is a problem.
    3) Illustrator is a drawing tool. The tools in Illustrator are designed for object-oriented vector drawing. In many respects they are better than Photoshop's tools for those type of projects. And No, you can not edit photographs easily with Illustrator. While you can include photos or raster items within an Illustrator file, Illustrator is not inherently designed to edit iamges at a pixel level.
    4) Just add a new layer and fill it with white (or whatever color). Vector EPS files have no background.
    5) If you have Photoshop or Illustrator you have Bridge. You can view files in Bridge. I wouldn't know of any other Windows software. It may exist, I simply wouldn't know.

  • After zooming, how do I get x and y values?

    I have an instrument that saves data in a simple x and y format. When viewing this data I would like to determine the peak width, height, position and area. I have utilized the peak detector vi to pick the peak and set the threshold, however, I have not been successful at getting the peak width and area for a specific peak. I think my first step is to isolate the data range that my peak resides. So, after zooming on a specific peak, how do I extract the x and y values for that zoomed region and apply them to peak integration and fitting? Does anyone have a sample vi I could look at or is there already a canned vi in Labview to do this?
    Thanks
    Brian

    Have you tried to use the peak detector vi to search for *valleys* ? That could give you the peak start and end.
    If you decide to use manual positionning of peaks, you can get the x limits of the graph display using property nodes : Right click on the graph terminal then Create>>Property node. Right click on the property node then Properties>>X scale>>Range.
    You could also use graph cursors (wave form graph or XY graph) : make the cursor legend visible (right click on the graph), then give a name to cursor n°0 (peak start) and cursor n°1 (peak end). Set the cursor to "Lock to points". Get the x and y cursor coordinates using the cursor list property node, as illustrated in the attached example.
    Once you get the x start and end coordinates, data
    processing should not be too difficult, but depends on the data type you are dealing with (are the points equally spaced ? Are the data noisy ?..).
    If your start and end X coordinates do not correspond exactly to experimental data, you can either interpolate through the points or search for the index of the nearest points in the x array (use the Threshold 1D array vi for that, pass the x fractional value (that you got from your windowing zoom) as input, as shown in the second example.
    Ask if you need more help.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Cursors.tif ‏12 KB
    Peak_data.tif ‏8 KB

  • Simple core data problem--- please help

    hi all,
    I've done a few core data tutorials, can't say I understand all the switches and doodads, but I'm fairly comfortable with it. I can create almost any kind of "to many" relationship work, and its pure magic...
    the problem is that every "to one" relationship fails to work. I would have thought this was easy! but its apparently impossible.
    heres how to get exactly were i am:
    1. make a new xcode project... core data document based application.
    2. in the model graph make 1 entity with 1 attribute, say an int16 for arguments sake... it doesn't matter what it is the results are always the same.
    3. open up your myDocument.nib file in IB
    4. switch back to xcode, leaving the main window of you Doc visible.
    5. option click + drag your entity from the model graph in xcode, to the main window in IB (you'll see a green plus symbol if its working) and release it
    6. select one object from the resulting option window.
    7. save all files, compile the app, and run it.
    you will now see a control (usually a text box) that is grayed out, and reporting: "no selection". if we had picked "many objects" in #6, this app would be working. so what gives?
    well in the bindings, the item labeled "Controller Key" is set to "selection" and I guess that since there is just the one object, and were already bound to it, theres No need for a selection, thus breaking the binding. But what options do we have in that list? nothing that makes sense, and even though we can put in whatever we feel like, nothing makes any sense. And why would apple even bother letting you drag n drop an entity if it wasn't set up correct in the first place anyway?
    whats going on here? the docs and the tutorials all focus on repeating things I already know, none of them illuminate what the Controller Key is really looking at, and what I need to put in that box to make it aware that it doesn't have a selection, just attributes.

    ok.
    here is whats really happening...
    i set everything up correctly, but when we go to runtime, there is no instantiation of any data, at all. I have a controller, but it has nothing to control.
    with the "to many" relationships, you get an empty table, with add, remove buttons. So its the standard behavior to assume that you don't need the data in the beginning, leading me to a logistical problem, but one that I understand enough to begin formulating a plan.
    I can make a call that instantiates an instance of the data, from my document object, in the awake from nib method. which call? who knows. But I seem to recall that there is some sort of bug in the display anyway, so it may be more complicated than that.

  • Help in implementing interface

    I'm a newbie to Java Programming, and I'm faced with a assignment thats require me to implement in JAVA...help desperatly needed.
    I post the coding which i have to implement, and this is part of the many i needed to implement. I needed to sample solution to this and I will try to get on from there. Any reply is appreciated.
    package graphs;
    public interface Edge {
    // Returns node that this edge starts from.
    // Preconditions:
    // None.
    // Postconditions:
    // None.
    public Node fromNode();
    // Returns node that this edge points to.
    // Preconditions:
    // None.
    // Postconditions:
    // None.
    public Node toNode();
    // Set the label of this edge.
    // Precondtions:
    // None.
    // Postconditions:
    // None.
    public void setLabel(Object l);
    // Returns the label of this edge.
    // Precondtions:
    // None.
    // Postconditions:
    // None.
    public Object getLabel();
    package graphs;
    public interface Node {
    public void setLabel(Object l);
    public Object getLabel();
    e.g of calling class
    // Returns unique identity of edge e in the graph.
    // Preconditions:
    // + The edge e must be an edge of the graph ( hasEdge(e) == true )
    // => throws NoSuchEdge on violation.
    // Postconditions:
    // - The returned integer is in the range 0 ... numEdges() -1
    // ( Result >= 0 && Result < numEdges() ).
    public int id(Edge e);
    // Returns the edge with unique identity id in the graph.
    // Preconditions:
    // + The graph must contain at least one edge ( numEdges() > 0 )
    // throws NoEdges on violation.
    // + id must be in the range 0..numEdges() - 1 ( id >= 0 &&
    // id < numEdges() ) throws IdOutOfRange on violation.
    // Postconditions
    // - The returned edge is an edge in the graph ( hasEdge(Result) == true ).
    public Edge getEdge(int id);
    Regards

    package graphs;
    public interface Edge {
    // Returns node that this edge starts from.
    // Preconditions:
    // None.
    // Postconditions:
    // None.
    public Node fromNode();
    // Returns node that this edge points to.
    // Preconditions:
    // None.
    // Postconditions:
    // None.
    public Node toNode();
    // Set the label of this edge.
    // Precondtions:
    // None.
    // Postconditions:
    // None.
    public void setLabel(Object l);
    // Returns the label of this edge.
    // Precondtions:
    // None.
    // Postconditions:
    // None.
    public Object getLabel();
    package graphs;
    public interface Node {
    public void setLabel(Object l);
    public Object getLabel();
    package graphs;
    // Interface for the graph ADT.
    // Design by contract style assertions are used to specify semantic
    // properties for classes implementing this interface.
    // In the absence of language support for assertions, implementing
    // classes should check the assertions - implmenting classes extending
    // the GraphBase abstract class will automatically include such checks.
    // * Nodes within a graph are identified by ids that are unique for
    // all nodes in that graph.
    // * The ids for nodes with a graph are the integers from 0 to numNodes()-1
    // inclusive.
    // * A given node is a member of one and only one graph.
    // * Edges within a graph are identifed by the ids of the nodes associated
    // with the edge
    // and by ids that are unique for all edges in that graph.
    // * The ids for edges with a graph are the integers from 0 to numEdges()-1
    // inclusive.
    // * A given edge is a member of one and only one graph.
    // * There are no relationships between graphs.
    // ALTERNATIVE SPECIFICATION (DO NOT IMPLEMENT)
    // * Nodes within a graph are identified by ids that are unique for all
    // nodes in that graph.
    // * The ids for nodes within a graph are the integers from 0 to
    // numNodes()-1 inclusive.
    // * A node with id x is a member of any graph having at least x+1 nodes.
    // * Edges within a graph are identifed by the ids of the nodes associated
    // with the edge and by ids that are unique for all edges in that graph.
    // * The ids for edges with a graph are the integers from 0 to numEdges()-1
    // inclusive.
    // * A given edge e is a member of any graph having:
    // - the two nodes associated with e as members.
    // - an edge from the first of those two nodes to the second of those
    // two nodes.
    // * Relationships between graphs may be defined as for sets.
    // END OF ALTERNATIVE SPECIFICATION
    public interface Graph {
    // Number of vertices (nodes).
    // Preconditions:
    // None.
    // Postconditions:
    // - The return value >= 0 ( Result >= 0 ).
    public int numNodes();
    // Return number of edges in the graph.
    // Preconditions:
    // None.
    // Postconditions:
    // - The return value >= 0 ( Result >= 0 ).
    public int numEdges();
    // Indicates whether node n is in the graph.
    // Preconditions:
    // + The node n is non null ( n != null ).
    // Postconditions:
    // None.
    public boolean hasNode(Node n);
    // Indicates whether edge e is in the graph.
    // Preconditions:
    // + The edge e is non null ( e != null ) => throws NullEdge on violation.
    // Postconditions:
    // None.
    public boolean hasEdge(Edge e);
    // Indicates whether there is an edge from node n1 to node n2 in the graph.
    // Preconditions:
    // + Both nodes must be in the graph ( hasNode(n1) && hasNode(n2) )
    // => throws NoSuchNode on violation.
    // Postconditions:
    // None.
    public boolean hasEdge(Node n1, Node n2);
    // Returns unique identity of node n in the graph.
    // Preconditions:
    // + The node n must be a node of the graph ( hasNode(n) == true )
    // => throws NoSuchNode on violation.
    // Postconditions:
    // - The returned integer is in the range 0 ... numNodes() - 1
    // ( Result >= 0 && Result < numNodes() ).
    public int id(Node n);
    // Returns the node with unique identity id in the graph.
    // Preconditions:
    // + id must be in the range 0..numNodes() - 1 ( id >= 0 &&
    // id < numNodes() ) throws IdOutOfRange on violation.
    // Postconditions:
    // - The returned node is a node in the graph ( hasNode(Result) == true ).
    public Node getNode(int id);
    // Returns unique identity of edge e in the graph.
    // Preconditions:
    // + The edge e must be an edge of the graph ( hasEdge(e) == true )
    // => throws NoSuchEdge on violation.
    // Postconditions:
    // - The returned integer is in the range 0 ... numEdges() -1
    // ( Result >= 0 && Result < numEdges() ).
    public int id(Edge e);
    // Returns the edge with unique identity id in the graph.
    // Preconditions:
    // + The graph must contain at least one edge ( numEdges() > 0 )
    // throws NoEdges on violation.
    // + id must be in the range 0..numEdges() - 1 ( id >= 0 &&
    // id < numEdges() ) throws IdOutOfRange on violation.
    // Postconditions
    // - The returned edge is an edge in the graph ( hasEdge(Result) == true ).
    public Edge getEdge(int id);
    // Returns the edge from node n1 to node n2 in the graph.
    // Preconditions:
    // + Both nodes must be in the graph ( hasNode(n1) && hasNode(n2) )
    // => throws NoSuchNode on violation.
    // + There must be an edge from n1 to n2 in the graph
    // ( hasEdge(n1,n2) == true ) => throws NoSuchEdge on violation.
    // Postconditions:
    // - The returned edge is in the graph ( hasEdge(Result) == true ).
    public Edge getEdge(Node n1, Node n2);
    // Returns number of edges from node n.
    // Precondions:
    // The node n is in the graph ( hasNode(n) == true )
    // => throws NoSuchNode on violation.
    // Postconditions:
    // - The return value is in the range 0 ... number of nodes in
    // the graph ( Result >= 0 && Result <= numNodes() ).
    public int outDegree(Node n);
    // Returns number of edges to node n.
    // Precondions:
    // + The node n is in the graph ( hasNode(n) == true )
    // => throws NoSuchNode on violation.
    // Postconditions:
    // - The return value is in the range 0 ... number of nodes in the
    // graph ( Result >= 0 && Result <= numNodes() ).
    public int inDegree(Node n);
    // Returns first node in the graph (in order of addition).
    // Preconditions:
    // None.
    // Postconditions:
    // - The returned node is null if and only if there are no nodes in
    // the graph ( ( Result == null ) == ( numNodes() == 0 ) )
    // - The returned node is null or is contained in the graph
    // ( Result == null || hasNode(Result) == true ).
    // - The returned node has an id of 0
    // ( Result == null || id(Result) == 0 ).
    public Node firstNode();
    // Returns first edge in the graph (in order of addtion).
    // Preconditions:
    // None.
    // Postconditions:
    // - The returned edge is null if and only if there are no edges in the
    // graph ( ( Result == null ) == ( numEdges() == 0 ) )
    // - The returned edge is null or is an edge of the graph
    // ( Result == null || hasEdge(Result) == true ).
    // - The returned edge is null or has an id of 0
    // ( Result == null || id(Result) == 0 ).
    public Edge firstEdge();
    // Returns first edge from the node, n, which is the edge from source n
    // with destination node having the smallest id.
    // Preconditions:
    // + The node n must be a node of the graph
    // ( hasNode(n) == true ) => throws NoSuchNode on violation.
    // Postconditions:
    // - The returned edge is null if and only if there are no edges from
    // the node n ( ( Result == null ) == ( outDegree(n) == 0 ) )
    // - The returned edge is null or is an edge of the graph
    // ( Result == null || hasEdge(Result) == true ).
    // - The returned edge is null or points from the node n
    // ( Result == null || Result.fromNode() == n ).
    public Edge firstEdgeFrom(Node n);
    // Returns first edge to the node, n, which is the edge to destination
    // n with source node having the smallest id.
    // Preconditions:
    // + The node n must be a node of the graph
    // ( hasNode(n) == true ) => throws NoSuchNode on violation.
    // Postconditions:
    // - The returned edge is null if and only if there are no edges to
    // the node n ( ( Result == null ) == ( inDegree(n) == 0 ) )
    // - The returned edge is an edge of the graph
    // ( Result == null || hasEdge(Result) == true ).
    // - The returned edge points from the node n
    // ( Result == null || Result.fromNode() == n ).
    public Edge firstEdgeTo(Node n);
    // Returns last edge from the node, n, which is the edge from source n
    // with destination node having the largest id.
    // Preconditions:
    // + The node n must be a node of the graph
    // ( hasNode(n) == true ) => throws NoSuchNode on violation.
    // Postconditions:
    // - The returned edge is null if and only if there are no edges from
    // the node n ( ( Result == null ) == ( outDegree(n) == 0 ) )
    // - The returned edge is null or is an edge of the graph
    // ( Result == null || hasEdge(Result) == true ).
    // - The returned edge is null or points from the node n
    // ( Result == null || Result.fromNode() == n ).
    public Edge lastEdgeFrom(Node n);
    // Returns last edge to the node, n, which is the edge to destination
    // n with source node having the largest id.
    // Preconditions:
    // + The node n must be a node of the graph
    // ( hasNode(n) == true ) => throws NoSuchNode on violation.
    // Postconditions:
    // - The returned edge is null if and only if there are no edges to
    // the node n ( ( Result == null ) == ( inDegree(n) == 0 ) )
    // - The returned edge is an edge of the graph
    // ( Result == null || hasEdge(Result) == true ).
    // - The returned edge points from the node n
    // ( Result == null || Result.fromNode() == n ).
    public Edge lastEdgeTo(Node n);
    // Returns next node in the graph after node n or null if n is the last
    // node.
    // Preconditions:
    // + The node n must be a node of the graph
    // ( hasNode(n) == true ) => throws NoSuchNode on violation.
    // Postconditions:
    // - The returned node is null or is contained in the graph
    // ( Result == null || hasNode(Result) == true ).
    // - The returned node is null if and only if the node is the node
    // having the maximum id
    // ( ( Result == null) == ( id(Result) == numNodes() - 1 ) ).
    // - The returned node is null or the id of the returned node is
    // equal to the id of n + 1
    // ( Result == null || id(Result) == id(n) + 1 ).
    public Node nextNode(Node n);
    // Returns next edge after e or null if e is the last edge.
    // Preconditions:
    // + The edge e must be an edge of the graph ( hasEdge(e) == true )
    // => throws NoSuchEdge on violation.
    // Postconditions:
    // - The returned edge is null or is contained in the graph
    // ( Result == null || hasEdge(Result) == true )
    // - The returned edge is null if and only if e is the edge with the
    // maximum id
    // ( ( Result == null) == ( id(e) == numEdges() -1 ) ).
    // - The returned edge is null or the id of the returned edge is equal
    // to the id of e +1
    // ( Result == null || id(Result) == id(e) + 1 ).
    public Edge nextEdge(Edge e);
    // Returns next edge from node n after e or null if e is the last such edge.
    // Preconditions:
    // + The node n must be an edge of the graph ( hasNode(n) == true )
    // => throws NoSuchNode on violation.
    // + The edge e must be an edge of the graph ( hasEdge(e) == true )
    // => throws NoSuchEdge on violation.
    // + The edge e must be an edge from the node n ( e.fromNode() == n )
    // => throws NoSuchEdge on violation.
    // Postconditions:
    // - The returned edge is null or is contained in the graph
    // ( Result == null || hasEdge(Result) == true )
    // - The returned edge is null or is from the node n
    // ( Result == null || Result.fromNode() == n ).
    // - The returned edge is null or the id of the node to which the
    // returned edge points is greater than the id of the node to
    // which e points
    // ( Result == null || id(Result.toNode()) > id(e.toNode()) ).
    public Edge nextEdgeFrom(Node n, Edge e);
    // Returns next edge to node n after e or null if e is the last such edge.
    // Preconditions:
    // + The node n must be an edge of the graph ( hasNode(n) == true )
    // => throws NoSuchNode on violation.
    // + The edge e must be an edge of the graph ( hasEdge(e) == true )
    // => throws NoSuchEdge on violation.
    // + The edge e must be an edge to the node n ( e.toNode() == n )
    // => throws NoSuchEdge on violation.
    // Postconditions:
    // - The returned edge is null or is contained in the graph
    // ( Result == null || hasEdge(Result) == true )
    // - The returned edge is null or is to the node n
    // ( Result == null || Result.toNode() == n ).
    // - The returned edge is null or the id of the node from which the
    // returned edge points is greater than the id of the node
    // from which e points
    // ( Result == null || id(Result.fromNode()) > id(e.fromNode()) ).
    public Edge nextEdgeTo(Node n, Edge e);
    // Create and add a node to the graph with label l.
    // Preconditions:
    // None.
    // Postconditions:
    // - The number of nodes has increased by one
    // ( numNodes() == old( numNodes() + 1 ) ).
    // - The returned node is in the graph ( hasNode(Result) ).
    // - The id of the returned node is the maximum id for any node in
    // the graph ( id(Result) == numNodes()-1 ).
    public Node createNode(Object l);
    // Create and adds an edge from node n1 to node n2 with label l
    // Preconditions:
    // + Both nodes must be in the graph ( hasNode(n1) && hasNode(n2) )
    // => throws NoSuchNode on violation.
    // + There must not already be such an edge in the graph
    // ( hasEdge(n1,n2) == false ) => throws DuplicateEdge on violation.
    // Postconditions:
    // - The number of edges in the graph is increased by one
    // ( numEdges() == old(numEdges()) + 1 )
    // - The out degree of node n1 is increased by one
    // ( outDegree(n1) == old(outDegree(n1)) + 1 )
    // - The in degree of node n2 is increased by one
    // ( inDegree(n2) == old(inDegree(n2)) + 1 )
    // - The returned edge is from node n1 and to node n2
    // ( Result.fromNode() == n1 && Result.toNode() == n2 )
    // - The returned edge is in the graph ( hasEdge(Result) == true )
    // - The returned edge has label lbl ( Result.getLabel().equal(l) ).
    // - The id of the returned edge is the maximum id for any edge in
    // the graph ( id(Result) == numEdges()-1 ).
    // - The returned edge is either the last edge from node n1 or the next
    // edge from node n1 after the returned edge points to a node
    // having an id that is greater than the id of the node that
    // the returned edge points to.
    // ( ( nextEdgeFrom(n1,Result) == null ) ||
    // ( id((nextEdgeFrom(n1,Result)).toNode())
    // > id(Result.toNode()) ) )
    // - The returned edge is either the last edge to node n2 or the next
    // edge to node n2 after the returned edge points from a node
    // having an id that is greater than the id of the node that
    // the returned edge points from.
    // ( ( nextEdgeTo(n2,Result) == null ) ||
    // ( id((nextEdgeTo(n2,Result)).fromNode())
    // > id(Result.fromNode()) ) )
    // - The returned is either the first edge from node n1 or the id of the
    // node the returned edge points to is greater than the id of the
    // node the first edge from node n1 points to
    // ( ( firstEdgeFrom(n1) == Result ) ||
    // ( id((firstEdgeFrom(n1)).toNode())
    // < id(Result.toNode()) ) )
    // - The returned is either the first edge from node n1 or the id of the
    // node the returned edge points to is greater than the id of the
    // node the first edge from node n1 points to
    // ( ( firstEdgeTo(n2) == Result ) ||
    // ( id((firstEdgeTo(n2)).fromNode())
    // < id(Result.fromNode()) ) )
    public Edge createEdge(Node n1, Node n2, Object l);
    import graphs.*;
    public class Printer {
    private static Graph make() {
         Graph g = new GraphBase(new GraphImp());
         // Create some nodes
         Node first = g.createNode(new Integer(1));
         Node second = g.createNode(new Integer(2));
         Node third = g.createNode(new Integer(3));
         Node fourth = g.createNode(new Integer(4));
         // Create some edges between the nodes
         Edge fs = g.createEdge(first, second, new Integer(1));
         Edge ff = g.createEdge(first, first, new Integer(2));
         Edge ft = g.createEdge(first, third, new Integer(4));
         Edge ts = g.createEdge(third, second, new Integer(3));
         Edge sf = g.createEdge(second, first, new Integer(5));
         Edge s4 = g.createEdge(second, fourth, new Integer(8));
         return g;
    protected static void print(Graph g) {
         System.out.println("Nodes: " + g.numNodes() + " Edges: " + g.numEdges());
         // Print graph as a list of adjacency lists.
         System.out.println("\nAdjacency lists:");
         for ( Node node = g.firstNode(); node != null ; node = g.nextNode(node) ) {
         System.out.println("Node " + g.id(node) + " has:");
         // Print the node's out edges
         if ( g.outDegree(node) == 0 ) {
              System.out.println("\tNo out edges");
         } else {
              System.out.print("\t" + g.outDegree(node) + " out edge" + (g.outDegree(node) > 1 ? "s" : "") + ":");
              for ( Edge ed = g.firstEdgeFrom(node); ed != null ; ed = g.nextEdgeFrom(node,ed) ) {
              System.out.print(" (" + g.id(ed.fromNode()) + "->" + g.id(ed.toNode()) + ":" + ed.getLabel().toString() + ")");
              System.out.println("");
         // Print the node's in edges
         if ( g.inDegree(node) == 0 ) {
              System.out.println("\tNo in edges");
         } else {
              System.out.print("\t" + g.inDegree(node) + " in edge"+ (g.outDegree(node) > 1 ? "s" : "") +":");
              for ( Edge ed = g.firstEdgeTo(node); ed != null; ed = g.nextEdgeTo(node,ed) ) {
                   System.out.print(" (" + g.id(ed.fromNode()) + "->" + g.id(ed.toNode()) + ":" + ed.getLabel().toString() + ")");
              System.out.println("");
         // Print graph as an adjacency matrix.
         System.out.println("\nAdjacency matrix:");
         for(int col = 0; col < g.numNodes(); col++ ) {
         System.out.print("\t" + col);
         System.out.println("");
         for(int row = 0; row < g.numNodes(); row++ ) {
         System.out.print(row);
         for(int col = 0; col < g.numNodes(); col++ ) {
         if ( g.hasEdge(g.getNode(row), g.getNode(col)) ) {
         System.out.print("\t" + g.getEdge(g.getNode(row), g.getNode(col)).getLabel().toString());
         } else {
         System.out.print("\t-");
         System.out.println("");
         // Print graph as a list of edges
         System.out.println("\nEdge list:");
         for( int edgeId = 0; edgeId < g.numEdges(); edgeId++ ) {
         Edge edge = g.getEdge(edgeId);
         System.out.println("Edge " + edgeId + " from " + g.id(edge.fromNode()) + " to " + g.id(edge.toNode()) + " with label " + edge.getLabel().toString());
    public static void main(String[] args) {
         try {
         Graph g = make();
         print(g);          
         } catch(Error e) {
         System.err.println("### Execution terminated with errors ###");
    Sorry.. I think the questions that's I posted is not complete... I have input more codes to make it more complete. And many thanks to the person that replied... many thanks and hope you can reply to this. Thanks again.
    I need to implement only the GraphImp class and I think it should be
    public class GraphImp implements Graph, Node, Edge
    Implementing Node and Edge is onl used interally in GraphImp and need not to be public.
    Any help is appreciated.. and if possible... good programmers out there... please drop me an email to my problem.... million million thanks..

  • Determine blocking sessions and blocked sessions in 9iR2

    Hi,
    Running 9.2.0.7 on Solaris 2.
    We are trying to develop a query that can show us the blocked sessions and the session causing it. I have one working for 11 but for 9i, its a little more trickier. I am running these two so far:
    select s1.username || '@' || s1.machine || ' ( SID=' || s1.sid ||
           ' )  is blocking ' || s2.username || '@' || s2.machine || ' ( SID=' ||
           s2.sid || ' ) ' AS blocking_status
      from gv$lock l1, gv$session s1, gv$lock l2, gv$session s2
    where s1.sid = l1.sid
       and s2.sid = l2.sid
       and l1.BLOCK = 1
       and l2.request > 0
       and l1.id1 = l2.id1
       and l2.id2 = l2.id2;
    select do.object_name,
           row_wait_obj#,
           row_wait_file#,
           row_wait_block#,
           row_wait_row#,
           dbms_rowid.rowid_create(1,
                                   ROW_WAIT_OBJ#,
                                   ROW_WAIT_FILE#,
                                   ROW_WAIT_BLOCK#,
                                   ROW_WAIT_ROW#)
      from gv$session s, dba_objects do
    where sid = 543
       and s.ROW_WAIT_OBJ# = do.OBJECT_ID;Reason I need this is that lately we have been getting a lot of DEADLOCKS and we want to determine why this is happening a lot now and we want to start with who it is and what objects are causing it....any suggestions?

    mbobak wrote:
    There are a few critical pieces to interpreting a deadlock trace file. First, to be clear, you're getting ORA-00060, not ORA-04020 (which is a library cache deadlock), correct?
    If so, the tracefile will contain a deadlock graph. This will show the type of enqueue involved (TM or TX are the likely candidates), and the modes that locks and requests are being made.
    Then, there's the SQL which encountered the deadlock, and finally, the other SQL involved in the deadlock.
    All the above information is in the deadlock trace file.
    Using it, you ought to be able to determine root cause of the deadlock.
    If you need help understanding it, post here. If you post the deadlock graph, make sure you use code tags, or it will be unreadable.Yes we are getting the ORA-00060. This is what we get exactly from the AppTeam from the App:
    Available exception message: iims.ge.common.exception.IIMSTechnicalException : ORA-00060: deadlock detected while waiting for resourceFrom our latest Deadlock occurence we got a LMD Trace file generated. We can see the DeadLock graph and its SQL. We the enqueue of TX and it's modes. Basically everything you asked for we see it in the trace file. What we want to see is what is causing it or who is so we can fix it. Maybe I am not reading the trace file correctly. I appreciate your assistance in helping me interpret the trace file. As requested, here is the trace file.
    Dump file /var/local/oracle/logs/ora_prod_can1_lmd0_4432.trc
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning and Real Application Clusters options
    JServer Release 9.2.0.8.0 - Production
    ORACLE_HOME = /opt/oracle/9.2.0
    System name:    SunOS
    Node name:      can-clust01
    Release:        5.9
    Version:        Generic_118558-36
    Machine:        sun4u
    Instance name: ORA_PROD_CAN1
    Redo thread mounted by this instance: 0 <none>
    Oracle process number: 5
    Unix process pid: 4432, image: oracle@can-clust01 (LMD0)
    *** SESSION ID:(4.1) 2010-08-15 08:07:02.736
    open lock on RM 0 0
    *** 2010-08-15 08:07:31.353
    open lock on RM 0 0
    *** 2010-08-16 11:17:21.469
    user session for deadlock lock 40972c9c0
      pid=50 serial=6956 audsid=189500961 user: 61/IIMS_UWR
      O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.1] :
    BLOCKED 40972c570 5 [0x90014][0x19bb82],[TX] [131094,2] 1
    BLOCKER 40972bb98 5 [0x90014][0x19bb82],[TX] [65586,6177] 0
    BLOCKED 40972c9c0 5 [0x110014][0x12ec40],[TX] [65586,6177] 0
    BLOCKER 40972ba18 5 [0x110014][0x12ec40],[TX] [131094,2] 1
    user session for deadlock lock 40972c9c0
      pid=50 serial=6956 audsid=189500961 user: 61/IIMS_UWR
      O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.2] :
    BLOCKED 40972c9c0 5 [0x110014][0x12ec40],[TX] [65586,6177] 0
    BLOCKER 40972ba18 5 [0x110014][0x12ec40],[TX] [131094,2] 1
    BLOCKED 40972c570 5 [0x90014][0x19bb82],[TX] [131094,2] 1
    BLOCKER 40972bb98 5 [0x90014][0x19bb82],[TX] [65586,6177] 0
    *** 2010-08-16 11:17:42.495
    user session for deadlock lock 4098bcd08
      pid=59 serial=981 audsid=189501588 user: 61/IIMS_UWR
    O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.3] :
    BLOCKED 41228b128 5 [0x70001][0x178a52],[TX] [131100,2] 1
    BLOCKER 4098bade8 5 [0x70001][0x178a52],[TX] [65595,583] 0
    BLOCKED 4098bcd08 5 [0x130025][0x1475c9],[TX] [65595,583] 0
    BLOCKER 412275b78 5 [0x130025][0x1475c9],[TX] [131100,2] 1
    user session for deadlock lock 4098bcd08
      pid=59 serial=981 audsid=189501588 user: 61/IIMS_UWR
      O/S info: user: weblogic, term: unknown, ospid: , machine: can-prod03
                program: JDBC Thin Client
      application name: JDBC Thin Client, hash value=0
      Current SQL Statement:
      UPDATE T_POLICY_PROPERTY POP SET POP.PRP_EFFECTIVE_END_DATE = :B3 , POP.PRP_LAST_UPDATED_DATE = SYSDATE WHERE POP.PRP_POL_POLICY_ID = :B2 AND POP.PRP_
    PROPERTY_SEQ_NUM = 1 AND POP.PRP_EFFECTIVE_END_DATE = TO_DATE(:B1 , DATE_FORMAT)
    Global Wait-For-Graph(WFG) at ddTS[0.4] :
    BLOCKED 4098bcd08 5 [0x130025][0x1475c9],[TX] [65595,583] 0
    BLOCKER 412275b78 5 [0x130025][0x1475c9],[TX] [131100,2] 1
    BLOCKED 41228b128 5 [0x70001][0x178a52],[TX] [131100,2] 1
    BLOCKER 4098bade8 5 [0x70001][0x178a52],[TX] [65595,583] 0Let's see what we can get out of this now :)

  • Groups of independent knots

    Ol�!
    I am looking for an algorithm that gives me groups of knots in a net-structure.
    Every knot is connected to others ... etc ...
    But I want the groups in a way, that the knots in a group have no direct connection to each other!
    In the end every knot sould be in one group and the number of groups should be minimal.
    Where can i find Informations about that?

    I apologize for being so terse in my previous reply; you are indeed looking for cliques. Allow me to
    explain. For any graph, a graph complement exists. It can be constructed as follows --
    1) for any pair of vertices v_i v_j, ad an edge e_ij if it not already exists;
    2) remove all edges v_kl from the graph that were originally present.
    A graph plus its complement yield a 'complete graph'. If two vertices v_i and v_j didn't have an
    edge e_ij, the complement of the graph will contain this edge. A group of vertices not directly
    reachable in the original graph make up a clique in the graph complement.
    Finding those cliques, or '(maximal) complete sub-graphs' is an NP-complete problem though.
    Suppose n cliques exist C_1, C_2 ... C_n. Remove any clique C_i that is a subset of the union
    of one or more other cliques. Repeat this step until no clique can be remove anymore. The
    cliquest represent the disjoint groups you're looking for.
    kind regards,
    Jos

Maybe you are looking for