Report Problem need to fix the code

Hello Expert
I am new to apex, I was given a task to interpret the code and fix the problem.
This Apex application has a list of value where the user select the institution as a drop down list menu. After selecting the institution the main report below the drop down list will be populated based on the selection. The problem is that when the user insert record for standalone program, this insert don't appear on the report when the user select the instituion.
can someone look at the code below and explain to me line by line what it does and how can I twick it to solve this problem? I am cloue less and I need expert help
select dt.* 
         ,case when dt.delivery_location is null then null
                  else htf.anchor ('javascript:void(0);'
                                          ,'<img src=#APP_IMAGES#location.png
                                            title=''' ||dt.delivery_location || '''
                                            alt=''' ||dt.delivery_location || '''
                                            height=24 width=24/>'
          end dl_hover
  from (
select
        CASE WHEN INDEP_DEGREE = 'Y' THEN
        CASE WHEN Dt.DEGREE_ACRONYM IN ('AACC','ASCC') then
          da.DESCRIPTION   || ' with an Emphasis Area of ' ||
                 NVL(Mt.DESCRIPTION,cC.DESCRIPTION)
            ELSE    
         nvl(dt.description, da.DESCRIPTION)
         END
         ELSE
            CASE WHEN Dt.DEGREE_LEVEL IN ('V','A') THEN
                 nvl(dt.description, da.DESCRIPTION )  || ' with an Option in ' ||
                 NVL(Mt.DESCRIPTION,Cc.DESCRIPTION)
            WHEN Dt.DEGREE_LEVEL IN ('E','C','Z','F')  THEN
                 nvl(dt.description, da.DESCRIPTION )  || ' in ' ||
                 NVL(Mt.DESCRIPTION,Cc.DESCRIPTION)
            ELSE    
                 nvl(dt.description, da.DESCRIPTION )  || ' with a Major in ' ||
                 NVL(Mt.DESCRIPTION,Cc.DESCRIPTION)
            END
    END
degree_name
--,'???' emphasis_area
,nvl(mt.cip_code,dt.cip_code) cip_code
,nvl(mt.hours, dt.hours) total_credit_hours
-- ,dt.deactivated status
,case when nvl(mt.deactivated,dt.deactivated)  = 'A' then 'Active'
          when nvl(mt.deactivated,dt.deactivated) = 'D' then 'Deactivated'
          when nvl(mt.deactivated,dt.deactivated) = 'T' then 'Terminated'
      WHEN NVL(mt.deactivated,dt.deactivated) = 'I'
      THEN 'Inactive'
          else null
   end status
--,dt.degree_level program_type
,dl.description program_type
,dt.coop_indicator coop_indicator
,nvl(mt.approval_date,dt.approval_date) approval_date
,nvl(mt.implemented,dt.implemented) implemented
,nvl(mt.implementation_date, dt.implementation_date) implementation_date
,nvl(mt.delivery_mode ,dt.delivery_mode) delivery_mode
,(select rtrim(replace(replace(xmlagg(xmlelement("C" ,c.cixxvext_name)).getclobval() ,'<C>' ,'') ,'</C>' ,'&#xD; ') ,'&#xD; ') C
  from degree_transaction_details dtd
         ,cixxvext c
  where (dtd.degree_transaction_id = case when INDEP_DEGREE= 'Y' then dt.degree_id else mt.major_id end )
      and c.cixxvext_ext_site_cd = dtd.detail_value
and dtd.record_type= case when INDEP_DEGREE = 'Y' then 'DEGREE' else 'MAJOR' end ) delivery_location
,dt.degree_id degree_id
,'Comparison Report' comparison_report
,apex_util.prepare_url ('f?p=&APP_ID.:2:&SESSION.::&DEBUG.:2:P2_FICE_CODE,P2_DEGREE_ID:&P1_FICE_CODE.,'||dt.degree_id) edit_link
,apex_util.prepare_url ('f?p=&APP_ID.:4:&SESSION.::&DEBUG.:RP,4:P4_DEGREE_ID:'||dt.degree_id) cr_link
,dt.description
,mt.major_id major_id
,nvl(mt.online_percentage,dt.online_percentage) online_percent
,nvl(mt.last_inst_review,dt.last_inst_review) last_inst_review
from degree_transactions dt,
    degree_acronyms da,
    major_transactions mt,
    degree_levels dl,
    cip_codes cc
where dt.degree_id = mt.degree_id
  and mt.cip_code = cc.cip_code
  and dl.degree_level = nvl(mt.degree_level,dt.degree_level)
  and dt.degree_acronym = da.degree_acronym
  and dt.Fice_code = da.fice_code
  and dt.degree_level = da.degree_level
  and dt.deactivated in ('A','D')
  and mt.deactivated in ('A','D')
  and dt.fice_code = :P1_FICE_CODE
  and dt.show_inst = 'Y'
) dt
order by dt.description nulls first

You said:
"I was able to debug the code in SQL Developer."  Does this mean that you:
ran the code, got results
then set indep_degree to 'Y' on a row in your database
ran the code again and saw the results you are looking for?
If true, your code is working and should operate the same in APEX.
So if your code is working, we need to understand what processes are running on the form and when they are firing.
Jeff

Similar Messages

  • Need to fix the width of a column in interactive report

    Hi,
    I have a column named 'Comment'. Its have a huge data due to which the lenght of that column in interactive report get increased. I need to fix the length to a desired value.
    I used following code in Region Footer:
    <style>
    table.apexir_WORKSHEET_DATA td[headers=COMMENTS] {
      _width: 300px;
      min-width: 50px;
      max-width: 300px }
    </style>
    Its solved the problem by fixing the width of the column but the column is not showing the full data now. It is hiding most of its part to fit it in that column.
    Please give some idea.
    Thanks,
    Chandru

    Hi,
    I believe you will want to add a height specification to allow for multiple lines.  And you may want/need to specifiy how you want lines to wrap.
    Add (for example):
      height: 60px; 
      white-space: nowrap; 
      word-wrap: break-word;
    There are defaults and several options for white-space and word-wrap.  You may want to look them up and give them a try for comparison.
    Howard

  • ITunes needs to fix the problem with there gift cards not being activated this is not up to the retailer and they will not return scratched coded cards! There is thousands of people having this problem please fix it

    iTunes needs to fix the problem with there iTunes cards not activating properly! This is not the retailers fault and they will not return iTunes cards that have had the code area scratched there for apple needs to credit and or activated the cards there is thousands of people having this problem please bite the bullet and fix it already I will not be using iTunes until this is corrected...

    If you haven't received the item then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • When trying to install Aid Virtual Instruments I get a warning no mountable file systems. I need help fixing the problem.

    When trying to install Pro Tools 10.3.3 Aid Virtual Instruments I get a warning no mountable file systems. I need help fixing the problem.

    Thanks Linc for responding to my post. I searched a little further and found I was missing a file. Once I downloaded the fix, I was able to install the software from the original download.

  • Need help fixing my code...

    I'm currently working on a problem for school where you have to make a game called Pig.
    I worked on it but need help on fixing it because it won't work the way I want it to, and I'm not sure what the problem is.
    public class Pig
        public static void main (String[] args)
          int num1, num2, num3 = 0, num4, num5, num6 =0;
          String answer="y";
          PairOfDice die1 = new PairOfDice(); // die # 1
          PairOfDice die2 = new PairOfDice(); // die # 2
          while (num3 <= 100 || num6 <= 100)
          // rolls dice
          while (answer.equalsIgnoreCase("y"))
              num1 = die1.roll();
              num2 = die2.roll();
              if (num1 == 1 || num2 == 1) // when either face is 1
                {num3 = num3;
                 answer = "n";}
              else  
                if (num1 == 1 && num2 == 1) // when both faces are 1
                    {num3 = 0;
                     answer = "n";}
                else
                    num3 += num1 + num2; // sum of two faces
          System.out.println (num1 +" "+ num2); // shows both faces
          System.out.println (num3); // shows the sum of faces
          System.out.println ("Do you want to roll again? (y/n)");
          answer = Keyboard.readString();
          if (answer.equalsIgnoreCase("n"))
            answer = "1";
          while (answer.equalsIgnoreCase("1"))
              while (num6 <= 20)
                 num4 = die1.roll();
                 num5 = die2.roll();
                 if (num4 == 1 || num5 == 1) // when either face is 1
                     {num6 = num6;
                      answer = "2";}
                 else  
                    if (num4 == 1 && num5 == 1) // when both faces are 1
                        {num6 = 0;
                         answer = "2";}
                    else
                        num6 += num4 + num5; // sum of two faces
              System.out.println (num4 +" "+ num5); // shows both faces
              System.out.println (num6); // shows the sum of faces
              answer = "y";
          Here is my code. It runs okay, but when the dice rolls a 1, it doesn't jump to the next while loop. I need the program to go to the "while loop answer = 1" when the dice rolls a 1 from the "while loop answer = y". If you see my code, I did it by making the answer = "n" to make it jump to the next while loop. I'm sorry if my explanation is confusing. It's my first time asking for help here...
    You don't have to fix the code for me, as long as you tell me what I'm doing wrong.
    Please help me...Thank you for your help.
    Edited by: nakatsu on Nov 12, 2007 7:03 PM

    Hint: all your code does NOT have to be in one method. You have numerous loops some nested inside others. This is starting to get mighty messy and can be tidied up if you think about how you can break some of the code down into smaller chunks and place these into their own methods.
    while (answer.equalsIgnoreCase("1"))What other case is there?

  • Need help improve the code

    I have this file but I need to improve the code on some method. The methods are addNode, deleteNode, saveNode, findLader and are they anyway for me to iliminate the findsmallest method?
    here is the code
    import java.io.*;
    import java.util.LinkedList;
    import java.util.Stack;
    import javax.swing.*;
    public class Graph {
    private LinkedList graph;
    private BufferedReader inputFile;
    public Graph() {
    graph = new LinkedList();
    // read the words from the given file
    // create a GraphNode
    // Add the node to the graph
    public void createGraph(String fileName) throws IOException {
    inputFile = new BufferedReader(
    new InputStreamReader(new FileInputStream("word.txt")));
    // Convert the linkedlist to an array 'a'
    // sort the array 'a'
    // create a string from all elements in 'a'
    // return the string
    public String printGraph() {
    String output = new String();
    // will contain String objects
    // ... do some work with the list, adding, removing String objects
    String[] a = new String[graph.size()];
    graph.toArray(a);
    // now stringArray contains all the element from linkedList
    quickSort(a, 0, a.size() - 1);
    for(int i=0;i<a.length;++i)
    output = output + new String(a.toString())+"\n";
    return output;
    private static void quickSort(Comparable[] theArray,
    int first, int last) {
    // Sorts the items in an array into ascending order.
    // Precondition: theArray[first..last] is an array.
    // Postcondition: theArray[first..last] is sorted.
    // Calls: partition.
    int pivotIndex;
    if (first < last) {
    // create the partition: S1, Pivot, S2
    pivotIndex = partition(theArray, first, last);
    // sort regions S1 and S2
    quickSort(theArray, first, pivotIndex-1);
    quickSort(theArray, pivotIndex+1, last);
    } // end if
    } // end quickSort
    private static int partition(Comparable[] theArray,
    int first, int last) {
    // Partitions an array for quicksort.
    // Precondition: theArray[first..last] is an array;
    // first <= last.
    // Postcondition: Returns the index of the pivot element of
    // theArray[first..last]. Upon completion of the method,
    // this will be the index value lastS1 such that
    // S1 = theArray[first..lastS1-1] < pivot
    // theArray[lastS1] == pivot
    // S2 = theArray[lastS1+1..last] >= pivot
    // Calls: choosePivot.
    // tempItem is used to swap elements in the array
    Comparable tempItem;
    // place pivot in theArray[first]
    //choosePivot(theArray, first, last);
    Comparable pivot = theArray[first]; // reference pivot
    // initially, everything but pivot is in unknown
    int lastS1 = first; // index of last item in S1
    // move one item at a time until unknown region is empty
    for (int firstUnknown = first + 1; firstUnknown <= last;
    ++firstUnknown) {
    // Invariant: theArray[first+1..lastS1] < pivot
    // theArray[lastS1+1..firstUnknown-1] >= pivot
    // move item from unknown to proper region
    if (theArray[firstUnknown].compareTo(pivot) < 0) {
    // item from unknown belongs in S1
    ++lastS1;
    tempItem = theArray[firstUnknown];
    theArray[firstUnknown] = theArray[lastS1];
    theArray[lastS1] = tempItem;
    } // end if
    // else item from unknown belongs in S2
    } // end for
    // place pivot in proper position and mark its location
    tempItem = theArray[first];
    theArray[first] = theArray[lastS1];
    theArray[lastS1] = tempItem;
    return lastS1;
    } // end partition
    // Given a new word, add it to the graph
    public void addNode(String word) {
    GraphNode node = new GraphNode(word);
    if(graph.contains(node)){
    JOptionPane.showMessageDialog(null,"Duplicate Word, operation terminated");
    for(int i=0; i<graph.size(); ++i) {
    if(isAnEdge((String)(((GraphNode)graph.get(i)).getVertex()),(String)(node.getVertex()))) {
    EdgeNode e1 = new EdgeNode((String)node.getVertex(),1);
    EdgeNode e2 = new EdgeNode((String)((GraphNode)graph.get(i)).getVertex(),1);
    node.addEdge(e2);
    ((GraphNode)graph.get(i)).addEdge(e1);
    graph.add(node);
    public boolean deleteNode(String word) {
    GraphNode node = new GraphNode(word);
    EdgeNode n = new EdgeNode(word,1);
    if(!graph.contains(node)) {
    return false;
    else {
    for(int i=0; i<graph.size();++i) {
    ((GraphNode)graph.get(i)).getEdgeList().remove(n);
    graph.remove(node);
    return true;
    public void save(String fileName) {
    try {
    PrintWriter output = new PrintWriter(new FileWriter("word.txt"));
    for(int i=0; i< graph.size();++i) {
    output.println(((GraphNode)graph.get(i)).getVertex());
    output.close();
    catch (IOException e) {
    // given two word, find the ladder (using dijkstra's algorithm
    // create a string for the ladder and return it
    public String findLadder(String start,String end) {
    String ladder = new String();
    GraphNode sv = new GraphNode(start);
    GraphNode ev = new GraphNode(end);
    if(!graph.contains(sv)) {
    JOptionPane.showMessageDialog(null,start + " not in graph");
    return null;
    if(!graph.contains(ev)) {
    JOptionPane.showMessageDialog(null,end + " not in graph");
    return null;
    LinkedList distance = new LinkedList(((GraphNode)graph.get(graph.indexOf(sv))).getEdgeList());
    LinkedList visited = new LinkedList();
    visited.add(start);
    LinkedList path = new LinkedList();
    path.add(new PathNode(start,"****"));
    for(int i=0; i<distance.size();++i) {
    PathNode p = new PathNode((String)((EdgeNode)distance.get(i)).getKey(),start);
    path.add(p);
    while(!visited.contains(end)) {
    EdgeNode min = findSmallest(distance,visited);
    String v = (String)min.getVertex();
    if(v.equals("****"))
    return null;
    visited.add(v);
    // for(int i=0;i<graph.size();++i) {
    // String u = (String)(((GraphNode)(graph.get(i))).getVertex());
    GraphNode temp1 = new GraphNode(v);
    int index = graph.indexOf(temp1);
    LinkedList l = new LinkedList(((GraphNode)graph.get(index)).getEdgeList());
    for(int i=0;i<l.size();++i)
    String u = (String)(((EdgeNode)(l.get(i))).getVertex());
    if(!visited.contains(u)) {
    int du=999, dv=999, avu=999;
    dv = min.getCost();
    EdgeNode edge = new EdgeNode(u,1);
    if(distance.contains(edge)) {
    du = ((EdgeNode)(distance.get(distance.indexOf(edge)))).getCost();
    GraphNode temp = new GraphNode(v);
    GraphNode node = ((GraphNode)(graph.get(graph.indexOf(temp))));
    LinkedList edges = node.getEdgeList();
    if(edges.contains(edge)) {
    avu = ((EdgeNode)(edges.get(edges.indexOf(new EdgeNode(u,1))))).getCost();
    if( du > dv+avu) {
    if(du == 999) {
    distance.add(new EdgeNode(u,dv+avu));
    path.add(new PathNode(u,v));
    else {
    ((EdgeNode)(distance.get(distance.indexOf(u)))).setCost(dv+avu);
    ((PathNode)(path.get(path.indexOf(u)))).setEnd(v);
    if(!path.contains(new PathNode(end,"")))
    return null;
    LinkedList pathList = new LinkedList();
    for(int i=0;i<path.size();++i) {
    PathNode n = (PathNode)path.get(path.indexOf(new PathNode(end,"****")));
    if(n.getEnd().compareTo("****") != 0) {
    pathList.addFirst(end);
    n = (PathNode)path.get(path.indexOf(new PathNode(n.getEnd(),"****")));
    end = n.getStart();
    pathList.addFirst(start);
    for(int i=0;i<pathList.size()-1;++i) {
    ladder = ladder + ((String)(pathList.get(i))) + " --> ";
    ladder = ladder + ((String)(pathList.get(pathList.size()-1)));
    return ladder;
    private EdgeNode findSmallest(LinkedList distance, LinkedList visited) {
    EdgeNode min = new EdgeNode("****",999);
    for(int i=0;i<distance.size();++i) {
    String node = (String)(((EdgeNode)distance.get(i)).getVertex());
    if(!visited.contains(node)) {
    if(((EdgeNode)distance.get(i)).getCost()<min.getCost()) {
    min = (EdgeNode)distance.get(i);
    return min;
    // class that represents nodes inserted into path set
    private class PathNode {
    protected String sv;
    protected String ev;
    public PathNode(String s,String e) {
    sv = s;
    ev = e;
    public String getEnd() {
    return ev;
    public String getStart() {
    return sv;
    public void setEnd(String n) {
    ev = n;
    public boolean equals(Object o) {
    return this.sv.equals(((PathNode)o).sv);
    public String toString() {
    return "("+sv+":"+ev+")";
    thank you

    let me fix my misstake which was point out by some one in here and thank you ofr do so because I'm new at this.
    I have this file but I need to improve the code on some method. The methods are addNode, deleteNode, saveNode, findLader and are they anyway for me to iliminate the findsmallest method?
    here is the code
    import java.io.*;
    import java.util.LinkedList;
    import java.util.Stack;
    import javax.swing.*;
    public class Graph {
    private LinkedList graph;
    private BufferedReader inputFile;
    public Graph() {
    graph = new LinkedList();
    // read the words from the given file
    // create a GraphNode
    // Add the node to the graph
    public void createGraph(String fileName) throws IOException {
    inputFile = new BufferedReader(
    new InputStreamReader(new FileInputStream("word.txt")));
    // Convert the linkedlist to an array 'a'
    // sort the array 'a'
    // create a string from all elements in 'a'
    // return the string
    public String printGraph() {
    String output = new String();
    // will contain String objects
    // ... do some work with the list, adding, removing String objects
    String[] a = new String[graph.size()];
    graph.toArray(a);
    // now stringArray contains all the element from linkedList
    quickSort(a, 0, a.size() - 1);
    for(int i=0;i<a.length;++i)
    output = output + new String(a.toString())+"\n";
    return output;
    private static void quickSort(Comparable[] theArray,
    int first, int last) {
    // Sorts the items in an array into ascending order.
    // Precondition: theArray[first..last] is an array.
    // Postcondition: theArray[first..last] is sorted.
    // Calls: partition.
    int pivotIndex;
    if (first < last) {
    // create the partition: S1, Pivot, S2
    pivotIndex = partition(theArray, first, last);
    // sort regions S1 and S2
    quickSort(theArray, first, pivotIndex-1);
    quickSort(theArray, pivotIndex+1, last);
    } // end if
    } // end quickSort
    private static int partition(Comparable[] theArray,
    int first, int last) {
    // Partitions an array for quicksort.
    // Precondition: theArray[first..last] is an array;
    // first <= last.
    // Postcondition: Returns the index of the pivot element of
    // theArray[first..last]. Upon completion of the method,
    // this will be the index value lastS1 such that
    // S1 = theArray[first..lastS1-1] < pivot
    // theArray[lastS1] == pivot
    // S2 = theArray[lastS1+1..last] >= pivot
    // Calls: choosePivot.
    // tempItem is used to swap elements in the array
    Comparable tempItem;
    // place pivot in theArray[first]
    //choosePivot(theArray, first, last);
    Comparable pivot = theArray[first]; // reference pivot
    // initially, everything but pivot is in unknown
    int lastS1 = first; // index of last item in S1
    // move one item at a time until unknown region is empty
    for (int firstUnknown = first + 1; firstUnknown <= last;
    ++firstUnknown) {
    // Invariant: theArray[first+1..lastS1] < pivot
    // theArray[lastS1+1..firstUnknown-1] >= pivot
    // move item from unknown to proper region
    if (theArray[firstUnknown].compareTo(pivot) < 0) {
    // item from unknown belongs in S1
    ++lastS1;
    tempItem = theArray[firstUnknown];
    theArray[firstUnknown] = theArray[lastS1];
    theArray[lastS1] = tempItem;
    } // end if
    // else item from unknown belongs in S2
    } // end for
    // place pivot in proper position and mark its location
    tempItem = theArray[first];
    theArray[first] = theArray[lastS1];
    theArray[lastS1] = tempItem;
    return lastS1;
    } // end partition
    // Given a new word, add it to the graph
    public void addNode(String word) {
    GraphNode node = new GraphNode(word);
    if(graph.contains(node)){
    JOptionPane.showMessageDialog(null,"Duplicate Word, operation terminated");
    for(int i=0; i<graph.size(); ++i) {
    if(isAnEdge((String)(((GraphNode)graph.get(i)).getVertex()),(String)(node.getVertex()))) {
    EdgeNode e1 = new EdgeNode((String)node.getVertex(),1);
    EdgeNode e2 = new EdgeNode((String)((GraphNode)graph.get(i)).getVertex(),1);
    node.addEdge(e2);
    ((GraphNode)graph.get(i)).addEdge(e1);
    graph.add(node);
    public boolean deleteNode(String word) {
    GraphNode node = new GraphNode(word);
    EdgeNode n = new EdgeNode(word,1);
    if(!graph.contains(node)) {
    return false;
    else {
    for(int i=0; i<graph.size();++i) {
    ((GraphNode)graph.get(i)).getEdgeList().remove(n);
    graph.remove(node);
    return true;
    public void save(String fileName) {
    try {
    PrintWriter output = new PrintWriter(new FileWriter("word.txt"));
    for(int i=0; i< graph.size();++i) {
    output.println(((GraphNode)graph.get(i)).getVertex());
    output.close();
    catch (IOException e) {
    // given two word, find the ladder (using dijkstra's algorithm
    // create a string for the ladder and return it
    public String findLadder(String start,String end) {
    String ladder = new String();
    GraphNode sv = new GraphNode(start);
    GraphNode ev = new GraphNode(end);
    if(!graph.contains(sv)) {
    JOptionPane.showMessageDialog(null,start + " not in graph");
    return null;
    if(!graph.contains(ev)) {
    JOptionPane.showMessageDialog(null,end + " not in graph");
    return null;
    LinkedList distance = new LinkedList(((GraphNode)graph.get(graph.indexOf(sv))).getEdgeList());
    LinkedList visited = new LinkedList();
    visited.add(start);
    LinkedList path = new LinkedList();
    path.add(new PathNode(start,"****"));
    for(int i=0; i<distance.size();++i) {
    PathNode p = new PathNode((String)((EdgeNode)distance.get(i)).getKey(),start);
    path.add(p);
    while(!visited.contains(end)) {
    EdgeNode min = findSmallest(distance,visited);
    String v = (String)min.getVertex();
    if(v.equals("****"))
    return null;
    visited.add(v);
    // for(int i=0;i<graph.size();++i) {
    // String u = (String)(((GraphNode)(graph.get(i))).getVertex());
    GraphNode temp1 = new GraphNode(v);
    int index = graph.indexOf(temp1);
    LinkedList l = new LinkedList(((GraphNode)graph.get(index)).getEdgeList());
    for(int i=0;i<l.size();++i)
    String u = (String)(((EdgeNode)(l.get(i))).getVertex());
    if(!visited.contains(u)) {
    int du=999, dv=999, avu=999;
    dv = min.getCost();
    EdgeNode edge = new EdgeNode(u,1);
    if(distance.contains(edge)) {
    du = ((EdgeNode)(distance.get(distance.indexOf(edge)))).getCost();
    GraphNode temp = new GraphNode(v);
    GraphNode node = ((GraphNode)(graph.get(graph.indexOf(temp))));
    LinkedList edges = node.getEdgeList();
    if(edges.contains(edge)) {
    avu = ((EdgeNode)(edges.get(edges.indexOf(new EdgeNode(u,1))))).getCost();
    if( du > dv+avu) {
    if(du == 999) {
    distance.add(new EdgeNode(u,dv+avu));
    path.add(new PathNode(u,v));
    else {
    ((EdgeNode)(distance.get(distance.indexOf(u)))).setCost(dv+avu);
    ((PathNode)(path.get(path.indexOf(u)))).setEnd(v);
    if(!path.contains(new PathNode(end,"")))
    return null;
    LinkedList pathList = new LinkedList();
    for(int i=0;i<path.size();++i) {
    PathNode n = (PathNode)path.get(path.indexOf(new PathNode(end,"****")));
    if(n.getEnd().compareTo("****") != 0) {
    pathList.addFirst(end);
    n = (PathNode)path.get(path.indexOf(new PathNode(n.getEnd(),"****")));
    end = n.getStart();
    pathList.addFirst(start);
    for(int i=0;i<pathList.size()-1;++i) {
    ladder = ladder + ((String)(pathList.get(i))) + " --> ";
    ladder = ladder + ((String)(pathList.get(pathList.size()-1)));
    return ladder;
    private EdgeNode findSmallest(LinkedList distance, LinkedList visited) {
    EdgeNode min = new EdgeNode("****",999);
    for(int i=0;i<distance.size();++i) {
    String node = (String)(((EdgeNode)distance.get(i)).getVertex());
    if(!visited.contains(node)) {
    if(((EdgeNode)distance.get(i)).getCost()<min.getCost()) {
    min = (EdgeNode)distance.get(i);
    return min;
    // class that represents nodes inserted into path set
    private class PathNode {
    protected String sv;
    protected String ev;
    public PathNode(String s,String e) {
    sv = s;
    ev = e;
    public String getEnd() {
    return ev;
    public String getStart() {
    return sv;
    public void setEnd(String n) {
    ev = n;
    public boolean equals(Object o) {
    return this.sv.equals(((PathNode)o).sv);
    public String toString() {
    return "("+sv+":"+ev+")";
    }thank you

  • Do we need to compile the code migrating from JDK 1.4.2.11. to 1.4.2.15

    Hi
    Currently our application is running in JDK 1.4.2.11 and because of the SSL vulnerability issues we are planning to upgrade the JDK to 1.4.2.15 version.
    Just wanted to know do we need to complie the code for this change.

    In general, no. However, if your code depends on code that was changed as part of a bugfix, you may have to make source changes, and then recompile.
    Test and see. And review the release documents for the versions involved.

  • I need to retrieve the code I was given to activate my creative suite design & web premium.

    PLEASE can someone help me. I need to retrieve the code I was given to activate my creative suite design & web premium. I have got a new mac and it is only saying I have a 30 day trial.

    Sign in, activation, or connection errors | CS5.5 and later
    Find your serial number quickly
    Mylenium

  • Hi , i'm new here and i would like to ask a question about iPad 2 . Well , actually when i hold my finger on any icon , its not jiggling , i need to fix the icons . May i know what can i do in this case ? thank you in advance ,

    Hi , i'm new here and i would like to ask a question about iPad 2 . Well , actually when i hold my finger on any icon , its not jiggling , i need to fix the icons . May i know what can i do in this case ? thank you in advance ,

    Try a reset. Hold the Sleep and Home button down for about 10 seconds until you see the Apple logo. Ignore the red slider.

  • What will be the peoplesoft query to calculate voluntary termination count and involuntary termination count? I am working on OBIA HR analytics workforce deployment reports and need to validate the reports

    what will be the peoplesoft query to calculate voluntary termination count and involuntary termination count? I am working on OBIA HR analytics workforce deployment reports and need to validate the reports. I also want to know the tables involved

    Hi Andrew,
    Part A:
    I've done some restating of the question, and distributed the calculations among several fields, not all of which need to be included on the visible layout. Other than formatting the Date fields and moving the 'Completed Date' field and its label, I've left this in the default "Layout 1" produced by AppleWorks.
    Field List:
    Priority: Popup menu with six items: 00, J, D, 1, 2, 3  Defaults to 00
    TL (time limit in months): Calculation:  CHOOSE('Priority',0,1,3,4,6,12)
    Received: Date. Option: Automatically insert today's date (ie. Date Record created) (may be edited)
    Target Date: Calculation:
    DATE(YEAR('Received')+INT(MONTH('Received')+'TL')/12,MOD(MONTH('Received')+'TL', 12),DAY('Received'))
    Remaining (Days): Calculation: INT('Target Date'+1-NOW())  (see revision below)
    Completed: Checkbox. Set default value to Unchecked.
    Completed Date: Date: Entered manually
    OnTarget: Calculation: IF('Completed',IF('Completed Date'<'Target Date',"On Target","Over"),IF(INT(NOW())>'Target Date',"Over","On Target"))
    The On Target field shows the current status of the case while still open, and the state on the closing date when it was closed.
    Having done that, I was unhappy with the Remaining field continuing to calculate an ever larger negative number after the case had been closed. Hence this revision below:
    Remaining: Calculation: IF('Completed','Target Date'-'Completed Date',INT('Target Date'+1-NOW()))
    Shows the number of days remaining while the case is open, the days remaining at completion if the case has been marked Completed and the completion date entered.
    Rsults (and some further formatting of the Layout) below.
    Part B:
    You will need Subsummary parts when sorted on Completed and on On Target. Fields can appear on  a Layout only once, so each subsummary part will need a separate Summary type field for each field to be summarized.
    Regards,
    Barry

  • HT3951 I just can't find the question...  I need to fix the app that I downloaded & it's not completing the download even on Wi-Fi???  Please help!!,!!,!,!,!!,!,!!

    I just can't find the question...  I need to fix the apps that I downloaded &amp; it's not completing the download even on Wi-Fi???  Please help!!!!!!!!!

    iOS: About File Sharing

  • I need to cancel the code that I redeem and restart the code

    I went to use another email and pass word to redeem my gift card. I did not relize I could use my email. so I need to have the code canceled from the [email protected] so I can use it on my [email protected] can some one help me. this is my first time using itunes

    Click here and request assistance.
    (63314)

  • HT1937 Hi I'm Ronald Macatangay. I use IPad to, my problem is I forget the code that I enter in a restriction and I can't delete some of my apps. Can you halp me. Thanks

    Hi I'm Ronald Macatangay, I using iPad2 and I'm having a problem with restrictions I forgot the code that I enter. And I can't delete some of my apps. Can you help me? Thanks

    You will need to connect it to the computer you sync with and Restore it as a new device then rebuild everything manually. If you restore from your backup it will restore the restrictions password.

  • Same problem that wont fix the same way i fixed it the first time.

    I need to upload music from itunes to my ipad for an event!! My problem is that when i try to open itunes it wont open (i search the internet and did what they suggested but it still wont open), btw i have windows 7. I tried to transfer the music by opening the itunes file and using drag and drop but when i drop the file it says that my device has been disconnected, but it hasnt really been diconnected. Can i please get some help before January 1 2014? I recently fixed this problem by going on the uninstaller and repairing it (there is also an option to repair it there). It started working fine after that. Then i closed it and now it wont reopen. Any suggestions?

    Hello Richieb786,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/ts1717
    Best of luck,
    Mario

  • Help needed in correcting the code

    <html>
    <head>
    <script language="LiveScript">
    function WinOpen() {
    if (document.form1.cap.value == "")
    alert("Enter value in text box");
    return;
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    msg.document.write("<HTML><HEAD><TITLE>Yo!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>This is really cool!</B></h1></CENTER>");
    msg.document.write('<BODY><form name="form2">');
    for(var i =0; i < document.form1.cap.value; i++)
    msg.document.write("<INPUT type=text name=tbAlphaNumeric>");
    msg.document.write("<br>");
    msg.document.write('<input type="button" name="Button2" value="Steal" onClick="WinShow()">');
    msg.document.write('</form></BODY></HTML>');
    function WinShow() (
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    msg.document.write("<HTML><HEAD><TITLE>Great!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>Display of second page text elements!</B></h1></CENTER>");
    for(var j =0; j < document.form1.cap.value; j++)
    msg.document.write(document.form2.tbAlphaNumeric[j].value);
    msg.document.write("<br>");
    msg.document.write('</form></BODY></HTML>');
    </script>
    </head>
    <body>
    <form name="form1">
    <INPUT type= "text" name=cap>
    <input type="button" name="Button1" value="Push me" onClick="WinOpen()">
    </form>
    </body>
    </html>
    I am having problem in running the above mentioned code sucessfully.
    I am not able to display the second page after clicking the push button!!!
    Any help would be welcome indeed:)

    Hi,
    The code did work. But I am not sucessfully able to display the values entered in 2nd page in the 3rd page.Please find the code below:
    <html>
    <head>
    <script language="LiveScript">
    function WinOpen() {
    if (document.form1.cap.value == "")
    alert("Enter value in text box");
    return;
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    msg.document.write("<HTML><HEAD><TITLE>Yo!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>This is really cool!</B></h1></CENTER>");
    msg.document.write('<BODY><form name="form2">');
    for(var i =0; i < document.form1.cap.value; i++)
    msg.document.write("<INPUT type=text name=tbAlphaNumeric>");
    msg.document.write("<br>");
    msg.document.write('<input type="button" name="Button2" value="Steal" onClick="javascript:window.opener.WinShow();">');
    msg.document.write('</form></BODY></HTML>');
    function WinShow() {
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    msg.document.write("<HTML><HEAD><TITLE>Great!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>Display of second page text elements!</B></h1></CENTER>");
    msg.document.write('<BODY><form name="form3">');
    for(var j =0; j < document.form1.cap.value; j++)
    msg.document.write(document.form2.tbAlphaNumeric[j].value);
    msg.document.write("<br>");
    msg.document.write('</form></BODY></HTML>');
    </script>
    </head>
    <body>
    <form name="form1">
    <INPUT type= "text" name=cap>
    <input type="button" name="Button1" value="Push me" onClick="WinOpen()">
    </form>
    </body>
    </html>

Maybe you are looking for