WordSearch Solver Algorithm Help

Hello, I am making a WordSearch solver. I have an algorithm, and I have it in code, but I can't figure out why it isn't working.
Basically, I have a `List<List<String>>` that contains the WordSearch. I store that in a class called Grid, and in my Finder method use Grid.look() to find the words. The code is below (sorry for not commenting my code), and I would appreciate it if someone could tell me what is going wrong. The first Point (where each correct letter is) is always right, but none of the other ones are.
Direction.java
package com.wordsearchsolver;
import java.awt.Point;
public final class Direction {
     public static Directions NORTH = Directions.NORTH;
     public static Directions NORTHEAST = Directions.NORTHEAST;
     public static Directions EAST = Directions.EAST;
     public static Directions SOUTHEAST = Directions.SOUTHEAST;
     public static Directions SOUTH = Directions.SOUTH;
     public static Directions SOUTHWEST = Directions.SOUTHWEST;
     public static Directions WEST = Directions.WEST;
     public static Directions NORTHWEST = Directions.NORTHWEST;
     private static enum Directions {
          NORTH, NORTHEAST, EAST, SOUTHEAST,
          SOUTH, SOUTHWEST, WEST, NORTHWEST
     public static Point getDirection(Directions d) {
          Point p = new Point();
          switch (d) {
          case NORTH:
               p.setLocation(0, 1);
               break;
          case NORTHEAST:
               p.setLocation(1, 1);
               break;
          case EAST:
               p.setLocation(1, 0);
               break;
          case SOUTHEAST:
               p.setLocation(1, -1);
               break;
          case SOUTH:
               p.setLocation(0, -1);
               break;
          case SOUTHWEST:
               p.setLocation(-1, -1);
               break;
          case WEST:
               p.setLocation(-1, 0);
               break;
          case NORTHWEST:
               p.setLocation(-1, 1);
               break;
          return p;
}Grid.java
package com.wordsearchsolver;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Grid {
     private List<List<String>> mapByCollumn;
     private Point index;
     public Grid(List<List<String>> mapByCollumn) {
          this.mapByCollumn = mapByCollumn;
          this.index = new Point(0,0);
     public String traverse(Point p) {
          if ((index.x+p.x) >= 0 && (index.y+p.y) >= 0 && (index.y+p.y) < mapByCollumn.size() && (index.x+p.x) < mapByCollumn.get((index.y+p.y)).size())
               index.setLocation(index.x+p.x, index.y+p.y);
          else return "";
          return mapByCollumn.get(index.y).get(index.x);
     public String look(Point p) {
          if ((index.x+p.x) >= 0 && (index.y+p.y) >= 0 && (index.y+p.y) < mapByCollumn.size() && (index.x+p.x) < mapByCollumn.get((index.y+p.y)).size())
               return mapByCollumn.get(index.y+p.y).get(index.x+p.x);
          return "";
     public List<Point> getStartingPoints(String letter) {
          Iterator<List<String>> mapIterator = mapByCollumn.iterator();
          List<Point> startingPoints = new ArrayList<Point>();
          int mapCount      = 0;
          while (mapIterator.hasNext()) {
               Iterator<String> wordIterator = mapIterator.next().iterator();
               int wordCount      = 0;
               while (wordIterator.hasNext()) {
                    String str = wordIterator.next();
                    if (str.equals(letter))
                         startingPoints.add(new Point(mapCount, wordCount));
                    wordCount++;
               mapCount++;
          return startingPoints;
     public Point getIndex() {
          return index;
     public void setIndex(Point p) {
          index.setLocation(p);
}Finder.java
package com.wordsearchsolver;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Finder {
     private Grid grid;
     private List<Point> answerList;
     private List<List<String>> mapByCollumn;
     private Point direction;
     protected String word = "";
     public Finder(List<List<String>> mapByCollumn) {
          this.mapByCollumn     = mapByCollumn;
          grid                     = new Grid(mapByCollumn);
          answerList               = new ArrayList<Point>();
     public void find() {
          List<Point> startingPoints = grid.getStartingPoints(""+word.charAt(0));
          Iterator<Point> startingIterator = startingPoints.iterator();
          System.out.println(startingPoints);
          while (startingIterator.hasNext()) {
               Point p = startingIterator.next();
               grid.setIndex(p);
               boolean go = false;
               for (int i = 1; i < word.length(); ++i) {
                    if (!go) {
                    if ((word.charAt(i)+"").equals(grid.look(Direction.getDirection(Direction.NORTH)))) {
                         grid.traverse(Direction.getDirection(Direction.NORTH));
                         answerList.add(grid.getIndex());
                         direction = Direction.getDirection(Direction.NORTH);
                         continue;
                    if ((word.charAt(i)+"").equals(grid.look(Direction.getDirection(Direction.NORTHEAST)))) {
                         grid.traverse(Direction.getDirection(Direction.NORTHEAST));
                         answerList.add(grid.getIndex());
                         continue;
                    if ((word.charAt(i)+"").equals(grid.look(Direction.getDirection(Direction.EAST)))) {
                         grid.traverse(Direction.getDirection(Direction.EAST));
                         answerList.add(grid.getIndex());
                         continue;
                    if ((word.charAt(i)+"").equals(grid.look(Direction.getDirection(Direction.SOUTHEAST)))) {
                         grid.traverse(Direction.getDirection(Direction.SOUTHEAST));
                         answerList.add(grid.getIndex());
                         continue;
                    if ((word.charAt(i)+"").equals(grid.look(Direction.getDirection(Direction.SOUTH)))) {
                         grid.traverse(Direction.getDirection(Direction.SOUTH));
                         answerList.add(grid.getIndex());
                         continue;
                    if ((word.charAt(i)+"").equals(grid.look(Direction.getDirection(Direction.SOUTHWEST)))) {
                         grid.traverse(Direction.getDirection(Direction.SOUTHWEST));
                         answerList.add(grid.getIndex());
                         continue;
                    if ((word.charAt(i)+"").equals(grid.look(Direction.getDirection(Direction.WEST)))) {
                         grid.traverse(Direction.getDirection(Direction.WEST));
                         answerList.add(grid.getIndex());
                         continue;
                    if ((word.charAt(i)+"").equals(grid.look(Direction.getDirection(Direction.NORTHWEST)))) {
                         grid.traverse(Direction.getDirection(Direction.NORTHWEST));
                         answerList.add(grid.getIndex());
                         continue;
                    else if (go) {
                         if ((word.charAt(i)+"").equals(grid.look(direction))) {
                              grid.traverse(direction);
                              answerList.add(grid.getIndex());
                              continue;
                    answerList.clear();
                    go = false;
                    break;
               if (!answerList.isEmpty()) {
                    answerList.add(0, p);
                    break;
     public List<Point> getAnswerList() {
          return answerList;
}

First, that's way too much code. You should be writing and testing individual small pieces independently, and then hooking them together once they work. It's much easier to find a problem in a small bit of code than in a lot of code. Narrow down where the problem is occurring and provide an [url http://sscce.org]SSCCE that demonstrates it.
Second, all you've said is "doesn't work." You need to provide details about exactly what is going wrong.

Similar Messages

  • Need algorithm help

    I need some help with my 3 class hangman program.
    whenever the program is run, it doesn't function as intended when a letter is entered. Any advice is greatly appreciated.
    Here's what I have so far:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    //<applet code="Hangman.class" width=400 height=400>
    //</applet>
    public class Hangman extends JApplet implements ActionListener
         private final int WIDTH = 400;
         private final int HEIGHT = 400;
         private JPanel panel,tools;
         private JLabel inputLabel;
         private Hang drawing;
         private JTextField guess;
         RandomWord t = new RandomWord();
         public String answer = t.getWord();
         public void init()
              tools = new JPanel();
              tools.setLayout(new BoxLayout(tools,BoxLayout.X_AXIS));
              tools.setBackground(Color.yellow);
              tools.setOpaque(true);
              guess = new JTextField(1);
              guess.addActionListener(this);
              inputLabel = new JLabel("Enter Guess:");
              tools.add(inputLabel);
              tools.add(guess);
              drawing = new Hang();
              panel = new JPanel();
              panel.add(tools);
              panel.add(drawing);
              getContentPane().add(panel);
              setSize(WIDTH,HEIGHT);
         public void actionPerformed(ActionEvent event)
              String g = guess.getText();
              int incorr = 0;
              int c = 0;
              int i;
              for(i = 0;i<answer.length();i++)
                   if((answer.substring(i,i+1)).equals(g))
                        c++;
                        drawing.setLetter(i,g);
              if(c == 0)
                   incorr++;
                   drawing.setIndex(incorr);
              repaint();
    // class number 2:
    import java.awt.*;
    import javax.swing.JPanel;
    public class Hang extends JPanel
         private final int PAN_HEI = 400;
         private final int PAN_WID = 400;
         private int index;
         private int posNum,corr = 0;
         private String print;
         public Hang()
              setBackground(Color.black);
              setPreferredSize(new Dimension(PAN_WID,PAN_HEI));
         public void setIndex(int v)
              index = v;
         public void setLetter(int y,String s)
              print = s;
              posNum = y + 1;
         public void drawBase(Graphics page)
              setBackground(Color.white);
              page.setColor(Color.black);
              page.fillRect(0,350,150,50);// base
              page.fillRect(0,150,25,200);
              page.fillRect(0,125,100,25);
              page.setColor(Color.gray);
              page.fillRect(84,125,7,50);// rope
              page.setColor(Color.black);
              page.drawOval(75,175,24,25);// head
              page.drawLine(250,55,255,55);
              page.drawLine(260,55,265,55);
              page.drawLine(270,55,275,55);
              page.drawLine(280,55,285,55);     
              page.drawLine(290,55,295,55);
              page.drawLine(300,55,305,55);
              page.drawLine(310,55,315,55);
         public void paintComponent(Graphics page)
              super.paintComponent(page);
              this.drawBase(page);
              if(index == 1)
                   page.drawLine(84,200,84,250);
              if(index == 2)
                   page.drawLine(84,215,34,175);
              if(index == 3)
                   page.drawLine(84,215,116,175);
              if(index == 4)
                   page.drawLine(84,250,50,300);
              if(index == 5)
                   page.drawLine(84,250,100,300);
                   page.drawString("You Lose",250,75);
              if(posNum == 1)
                   corr++;
                   page.drawString(print,250,50);
              if(posNum == 2)
                   corr++;
                   page.drawString(print,260,50);
              if(posNum == 3)
                   corr++;
                   page.drawString(print,270,50);
              if(posNum == 4)
                   corr++;
                   page.drawString(print,280,50);
              if(posNum == 5)
                   corr++;
                   page.drawString(print,290,50);
              if(posNum == 6)
                   corr++;
                   page.drawString(print,300,50);
              if(posNum == 7)
                   corr++;
                   page.drawString(print,310,50);
              if(corr == 7)
                   page.drawString("You Win",250,75);
    //last class :
    import java.util.Random;
    public class RandomWord
         Random g = new Random();
         String w1;
         String w2;
         String w3;
         String w4;
         String w5;
         String w6;
         String w7;
         String w8;
         public RandomWord()
              w1 = "freedom";
              w2 = "justice";
              w3 = "impulse";
              w4 = "destiny";
              w5 = "celsius";
              w6 = "ignited";
              w7 = "believe";
              w8 = "realize";
         public String getWord()
              String x = " ";
              int a = g.nextInt(6);
              if(a == 0) x = w1;
              if(a == 1) x =  w2;
              if(a == 2) x =  w3;
              if(a == 3) x = w4;
              if(a == 4) x = w5;
              if(a == 5) x = w6;
              if(a == 6) x = w7;
              if(a == 7) x = w8;
              return x;
    }I'm a very inexperiencd programmer as you can see.

    Darn, I thought you actually needed algorithm help. But instead all I see is:
    "Here's all my code. It doesn't work right. Let me plop it onto your virtual desk and ask that you just fix it for me. I'm going shopping (or whatever) and will be back soon."

  • After update iPhone4 to iOS6, its stuck, showing only USB to iTunes on the screen. What to do, how to solve problem, help

    after update iPhone4 to iOS6, its stuck, showing only USB to iTunes on the screen. What to do, how to solve problem, help 

    Connect your phone to iTunes on your computer like the diagram has indicated and restore the phone

  • "Solved" and "Helpful" options

    I've been posting on here for a while now, mostly offering help to others, rather than asking questions.
    Mostly I can work through issues myself.
    Recently I helped a poster and actually solved a problem, by their own admission. However they didn't tick the options "Solved" or "Helpful" so I prompted them to do so.
    My request for them to do so was removed by moderators.
    I do not feel this is constructive and more effort should be put in by the moerator to make the forum work correctly and to give people like myslef more incentive to carry on helping people where possible.
    Obviously it's always nice to be able to solve an issue somebody is having, that's actually the business I'm in, but I think it's unreasonable to see that people aren't using the points system and then not allowing that fact to be brought to their attention.
    I help...they say I've helped...my profile increases...everyone is happy.

    Dave --
    IMHO, this iteration of the AD Boards (last 4-5 years or so, since Jive), has been evolving ever since it was established.
    The Hosts rarely respond directly to concerns, but they do pay attention.
    There have been lots of improvements made that came from the posters here.
    I believe that the "new" version of the AD Boards will more effectively encourage posters to remember to become more active in awarding ratings. Have you read this post by Eric W, at the top of the Feedback Forum Start Page? http://discussions.apple.com/thread.jspa?threadID=2540747
    +- Score!+
    +It’s Easy to Earn your Apple Support Communities Rep. +
    +The Apple Support Communities reputation system helps increase community participation. When you recognize another community member for providing helpful advice or a solution to a question, you help increase his or her status level within the community. And they can do the same for you. While it may be better to give (an answer) than to receive (reputation points), at Apple Support Communities, rewards come in both forms.+
    +Want Status? Answer. Recognize. Reward. Learn More.+

  • Error messages when trying to mark response as "solved" or "helpful"

    For about 3 weeks I receive error messages when I try to mark any responses to my questions as "helpful" or "solved." I've posted the error message below.
    Is there a way for me to solve this? I have been unable to find contact info for a system admin.
    Error
    An error in the system has occurred. Please contact the system administrator if the problem persists.
    Useful links :
    * Forum Home -- browse the forums here.
    * Search Forums -- visit the search page to query all forum content.

    The Hosts are aware of the problem and have posted an announcement at the top of this Forum, promising the problem will be fixed this week.

  • Color Picker scripting or Levels algorithm help

    First question is: Does anyone know of a good explanation of the Levels algorithm as in how each setting affects a pixel in an image. If I change the midpoint of the levels, how would a specific pixel change in relation to that? I've been experimenting for hours and can't figure a common factor other than it seems to be a binary type relationship. The reason I ask this is because I'm trying to script something that will balance colors.
    If that method isn't practical, I can go to the old fashioned trial and error method but this way also presents a roadblock to me. I set a color picker point and the script can obtain the values from that point exactly as it is in the Info panel. If I put a levels adjustment layer over top and adjust it, I now see the original color value and the adjusted color value in the Info panel, but I can't figure out how to obtain the adjusted value with a script. It still returns the original value. Does anyone know a way to obtain the adjusted value?
    I hope I explained this right.

    Thanks, Michael.
    I'll have to look through that post on ps-scripts.com in more detail. That might be what I need.
    This little snippet you wrote:
    Michael L Hale wrote:
    This thread may help with the levels part. http://ps-scripts.com/bb/viewtopic.php?t=2498
    As for the adjustment layer you need to get the color twice. Once with the adjustment layer visible then again with it not visible.
    var csColor = activeDocument.colorSamplers[0].color;
    activeDocument.layers.getByName('Levels').visible = false;
    var csColor2 = activeDocument.colorSamplers[0].color;
    alert( csColor2.rgb.red + " : " + csColor.rgb.red );
    doesn't get me the before and after values. Example: The point I selected has a red value of 226. I added a Levels adj layer on top and moved the midpoint so the red value at that point (adjusted) was 234. I ran your code and it came back with 225.591439688716 : 225.591439688716. It isn't showing the adjusted value of that point.

  • [SOLVED :)] Need help with adf table row selection

    Hi,
    In my application I am displaying results in a table. The DisplayRow property of table is set to Selected
    There are Next and Back buttons which help user to view details associated to the next/previous rows.
    I am using ADF 11g
    When user clicks Next or Previous button, then the selection of the row should also gets updated
    To achieve this i wrote below piece of code:
    this.tblS.getSelectedRowKeys().clear();+
    this.tblS.setRowIndex(count);+
    RowKeySet rks =  tblS.getSelectedRowKeys();+
    rks.add(tblS.getRowKey());+
    rks =  tblS.getSelectedRowKeys();+
    ISSUE:_
    When i run application and click Next/Previous Button, all functionalities do take place properly, but a null pointer exception is also thrown._+
    If i remove DisplayRow property of table from Selected to Default, every thing works good and no Exception is thrown_+       
    But as records in my table are going to be around 50-60 everytime, i need to set DisplayRow property of table to Selected.
    Is there any way to achieve this? Solve this problem?
    Some more details:_
    I am using a POJO class to create DataController. This DataController is having a view Object which is used to create results table.
    I have defined Primary key for my POJO Data Controller.
    Here is code of xml file:*
    +<?xml version="1.0" encoding="UTF-8" ?>+
    +<JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="11.1.1.52.5"+
    id="ProductListBean" Package="xxadf.mm.resources"
    BeanClass="xxadf.mm.resources.ProductListBean"
    isJavaBased="true">
    +<Attribute Name="Product" Type="java.lang.String" PrimaryKey="true"/>+
    +<Attribute Name="Stock" Type="java.lang.String"/>+
    +<Attribute Name="Rate" Type="java.lang.String"/>+
    +<Attribute Name="Accuracy" Type="java.lang.String"/>+
    +<Attribute Name="Details" Type="java.lang.String"/>+
    +<ConstructorMethod IsCollection="true"+
    Type="xxadf.mm.resources.ProductListBean"
    BeanClass="xxadf.mm.resources.ProductListBean"
    id="ProductListBean"/>
    +</JavaBean>+
    Error Log:*
    SEVERE: Server Exception during PPR, #1
    java.lang.NullPointerException
    at oracle.adfinternal.view.faces.model.binding.RowDataManager.getRowIndex(RowDataManager.java:200)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.getRowIndex(FacesCtrlHierBinding.java:506)
    at org.apache.myfaces.trinidad.component.UIXIterator._fixupFirst(UIXIterator.java:414)
    at org.apache.myfaces.trinidad.component.UIXIterator.__encodeBegin(UIXIterator.java:392)
    at org.apache.myfaces.trinidad.component.UIXTable.__encodeBegin(UIXTable.java:168)
    at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:517)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeHorizontalChild(PanelGroupLayoutRenderer.java:458)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$100(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:618)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:560)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:317)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:392)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:641)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:560)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:317)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer.access$100(ShowDetailItemRenderer.java:31)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer$ChildEncoderCallback.processComponent(ShowDetailItemRenderer.java:491)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer$ChildEncoderCallback.processComponent(ShowDetailItemRenderer.java:464)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer._encodeChildren(ShowDetailItemRenderer.java:406)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer.encodeAll(ShowDetailItemRenderer.java:114)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:1523)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer.access$500(PanelTabbedRenderer.java:38)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer$BodyEncoderCallback.processComponent(PanelTabbedRenderer.java:969)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer$BodyEncoderCallback.processComponent(PanelTabbedRenderer.java:920)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer._renderTabBody(PanelTabbedRenderer.java:519)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer.encodeAll(PanelTabbedRenderer.java:233)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:221)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:820)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1494)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:771)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:685)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:261)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:193)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
    at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please Help I have been struggling with this issue for long.
    Thanks and Regards
    Manav Ratra
    Edited by: user11255144 on Feb 8, 2010 5:33 AM

    Hi Arun,
    Thanks for replying.
    Actually in my application there is one result table and a section that is displaying complete details of the product selectd in result table.
    The next/previous buttons are not binded with result table.
    What I am doing is, I am puuliing data from VO and displaying it on form, whenever any of these buttons is clicked.
    As soon as these buttons are clicked data is coming up, but selection state of table is not getting updated.
    So to update selection state i wrote piece of code described in my previous post.
    Everything works fine if displayRow property of table is not set to selected.
    If i set display row property of table to selected, then i get a null pointer exception with message log defined in previous post.
    Although NPE is thrown, yet all data is properly fetched and table selection is also updated. But am not able to get how this NPE is coming and hpw to fix it .
    (I need to keep displayRow = selected, for all other cases NPE is not thrown)
    Please help..
    Thanks and Regards
    Manav Ratra

  • BGP decision algorithm - help needed - stumped

    Hello gurus!  hoping for a BGP expert to chime in here. Im studying for my CCIE, and there is something in Jeff Doyle's Routing TCP/IP vol2 book that I just cant seem to figure out and its really stalling my understanding of the BGP path selection algorithm.  
    Its on pg 195, example 3-57, attached as an image in this post (Ive also attached the network diagram that this output refers to). Basically its an output of "show ip bgp" and whats stumping me is simply: for the aggregate route 192.168.192.0/21, why has this router selected as best (>) the one via next hop 192.168.1.254?? I would have thought based on the presence of the LocalPref = 100 on the 192.168.1.237 route that would have been selected.  But apparently not! Heres a walk through of the path selection logic as i understand it:
    1/WEIGHT: both 0, so skipped. 
    2/LOCAL_PREF: this is my problem, .237 should win, but ignoring for now...
    3/ORIGINATED LOCALLY: neither are they are learnt from BGP peers, so skipping.
    4/AS_PATH: both identical, AS100 only, so skipping
    5/ORIGIN CODE: both are 'i' (IGP), both were created from "aggregate-address" statements on their originating routers downstream in AS100
    6/MED: both empty, so skipping
    7/PREFER [eBGP] over [confedBGP] over iBGP: so the .254 route apparently wins on this condition... which in isolation, i agree with (clearly the eBGP .254 route is better than the .237 iBGP candidate).
    .... however what about step 2/LOCAL_PREF!?  
    looking forward to some expert guidance here to help me squash this one :) 
    thank in advance, 
    Keiran

    Hello,
    Keiran are you talking about "Orgin" attribute or ORIGINATED LOCALLY as this attribute i am not able to find it...that attribute anywhere:
    http://netcerts.net/bgp-path-attributes-and-the-decision-process/
    Path Attributes:
    Attribute
    Class
    ORIGIN
    Well-know mandatory
    AS_PATH
    Well-know mandatory
    NEXT_HOP
    Well-know mandatory
    LOCAL_PREF
    Well-know discretionary
    ATOMIC_AGGREGATE
    Well-know discretionary
    AGGREGATOR
    Optional transitive
    COMMUNITY
    Optional transitive
    MULTI_EXIT_DISC (MED)
    Optional nontransitive
    ORGINATOR_ID
    Optional nontransitive
    ORGINATOR_ID
    Optional nontransitive
    CLUSTER_LIST
    Optional nontransitive
    Also there is similar question on learning forums:
    https://learningnetwork.cisco.com/thread/36845
    From the forum:
    "Locally Originated means that the local router is the one that generated the route with either a network statement, and aggregate statement, redistribution, or conditional route injection.  It's not an attribute that is included in the UPDATE messge, instead it's just used by the local process as part of the path selection, where the router will prefer its own locally originated routes over someone else's origination of the same prefix."
    Hopefully this will help.
    BTW i am reading same book and too bad Mr. Doyle did not include full configs for all routers, as i am trying to simulate his scenarios sometimes it is not working as in his book, now i have issue on next page 197 why Orgin IGP is not taking precedence over Incomplete even if one is learned via EBGP and other over iBGP...driving me nuts.
    Regards,
    Lukasz

  • Combination Algorithm Help

    I have a basic outline of an algorithm that produces combinations of 1-8 but I would like to produce the combination 8C3. What changes need to occur with this problem to get the answer that I'm looking for. Your help will be greatly appreciated. Thanks a lot.
    import java.io.*;
    import java.util.*;
    import java.util.Vector;
    public class Combs
         public static void main(String[] args)
              System.out.println(get("1 2 3 4 5 6 7 8"));
         public static String get(String s)
              StringTokenizer st = new StringTokenizer(s);
              Vector v = new Vector();
              while(st.hasMoreTokens())v.add(st.nextToken());
              String a = "";
              for(int i=v.size()-1; i>=0; i--)
                   for(int j=0; j<v.size(); j++)
                        if(j != i)
                             a += (String)v.get(j);
                   a += "\n";
              return a;
    PS if anything is unclear please ask and I will try to clear up my questions. Thanks again

    I have posted a related code in the following.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=382917&start=0&range=15#1647420

  • Algorithm Help: Adjustable scale marks

    I'm writing an app which displays a scale which is movable and resizable. It might display a range from 0.127 to 0.516, or 10,657 to 100,453.
    1 - I know from the size of the font and window, number number of marks which I want drawn across that range. A value nominally between 10 and 15.
    2 - I want the marks to be on sensible boundaries, 0.1, 0.25, 0.5 etc.
    An example is that for a range 0.089 to 1.272 I'd want ticks 0.1, 0.2 ... 1.1, 1.2
    Can anyone offer me any help with an algorithm to work out the ticks.
    Thanks.
    Dave.

    I have always had to brute force this kind of thing. But I would try the following. Subtract the smaller number from the larger number and divide by the number of ticks. (or the number of ticks + 1, whichever works!) This gives you units per tick. Adjust the lower tick to be the nearest sensible number below your minimum.
    This is tricky and there will be lots of special cases. If your ranges are in any way consistent, it might be best to use a bunch of canned ranges.

  • I need an algorithm, HELP!

    If I input something like this:
    a->b,
    a->c,
    b->d,
    d->a,
    and so on, could be many,
    the the output is this: a->b->d->a, which is a circle from the input.
    I need such a algorithm to help me find out all the circles from the input.

    Cross post of [http://forums.sun.com/thread.jspa?threadID=5447698&tstart=0|http://forums.sun.com/thread.jspa?threadID=5447698&tstart=0].
    Please don't post the same question in multiple forums since people may waste their time answering in one forum when a perfectly good response has been posted in another forum. If you feel the need to get a wider exposure of your problem then create a thread that links to the master thread and request responses be made only in the master thread.
    I shall lock this thread.

  • Genetic Algorithm help please!!!!

    Hi people, i really need help badly with a project im doing as im not very good at programming yet,
    The project is as follows
    Project Allocation
    This project will develop a Genetic Algorithm that will evolve project allocations, with the aim of maximising several criteria: giving every student the highest ranked project possible, spreading the project load between lecturers etc. It should work for a single group of students, and for several groups. This project could be coded in any suitable language.
    Any help in coding this would be really welcomed!
    Thanks

    kennalan wrote:
    your right warneja but what can i do, Start by learning English: that should be "you're", as in "you are".
    What can you do? Do what all students are expected to do - work hard, struggle with difficult material until you achieve some measure of mastery, and accept the result.
    i just need some source code Our source code? Something that you'll steal and pass off as your own? In my universe, that's called "cheating". What do you call it?
    or anything to help!Here's some advice: Don't come back here unless you have problems with code that you've written, with specific questions about the problems.
    Google for something and get started. I recommend "Java genetic algorithms" as a search criterion.
    %

  • Logic Execution Algorithm - Help

    Help for me - Logic Execution Algorithm
    Considering the Execution Sequence 1: Consider the following information in the table GBI_PAR_DEFINE_ROTA parameterized.
    The required fields are filled in by users: Required_Res_1 and one of the fields:
    Product_id, customer_id or Sales_Order_No.
    Off the field will only be filled with the value N if you want to disable the rule. If the value of the rule is N, the routine being developed disregard the rule.
    REQUIRED_RES_1 PRODUCT_ID SALES_ORDER_NO CUSTOMER_ID OFF
    P_P_LAM2 P_289874 18669437-20 WHGA
    Step 1: Find Table MP_WO_REP which records have sales order number 18669437-20.
    Step 2: Within these sales orders, search through the table Works_Operation which ones have the field Product_ID = P_289874.
    Step 3: Restrict further data selection Sales_Order searching the table, which of them belong to the client WHGA.
    Step 4: In the records remaining in the table Works_Operation verify which code Alternate_Pref whose field Required_Res_1 equals P_P_LAM2. If more than one return Alternate_Pref (different) for the same product_id Required_Res_1 and generate a table of error called GBI_ERR_ALTERNATE_PREF, containing the following information: Required_Res_1, Works_Order and product_id. If this error occurs, the following steps should not be performed.
    Step 5: In the remaining records, delete those records whose field Alternate_Pref is different from the value returned in Step 4. IMPORTANT NOTE: The records can only be deleted if they exist for the same product_id Alternates_Prefs different. These same deleted records should be inserted in the table Works_Operation_Rota_Excluida.
    Step 6: Deleted records Works_Operation table must also be deleted from the table Works_Op_Char. Fields of connection between these two tables are: Works_Order_No, Version_No, Works_Op_No, Alternate_Pref and Op_Proc_No. Deleted records will be recorded in the table Works_OP_Char_Rota_Excluida.

    I did not offer an opinion.
    You have what is called a technical or program specification. It describes the programming steps that need to be designed and written. This is exactly what programmers do. And your seeming inability to do this, points to the fact that you are not a programmer. That is the issue you need to address - instead of looking for so-called algorithmic logic.
    Simple and basic approach. Take step 1. Write SQL code that satisfies the requirements and outputs of that step. E.g.
    Step 1: Find Table MP_WO_REP which records have sales order number 18669437-20.
    Code: select * from mp_wo_rep where sales_order = '18669437-20'
    Do the same for step 2. And the remaining steps
    You now have the basic code template required to perform these steps. The next actions are:
    Modularising the code (instead of a hardcoded sales order number, support specifying it as a parameter).
    Simplify the code (by combining and integrating processing steps). Real programming is said to be the act of removing program source code statements, and not writing them.

  • [SOLVED]please help me with Broadcom Corporation BCM4312 wifi driver

    [SOLVED] see the 4th reply by me:D
    Please friends some one tell me exact steps to make Broadcom Corporation BCM4312 wifi card work in my laptop.
    I want to
                   1)successfully install Broadcom Corporation BCM4312 driver and load it when system boots
                   2)install a good network manager to work with my wifi networks and it should be able to work with my wifi card.
    I just migrated from ubuntu to arch, I really want to know each steps for above issues.
    here is my lspci details
    04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)
    (note:I have a broadband internet working, which is connected by LAN port.)
    Last edited by rohu1990 (2010-04-04 03:17:31)

    rohu1990 wrote:
    [SOLVED] I just solved my issue by installing the driver from the broadcom linux driver site here are the steps i followed
    1-Download the driver from http://www.broadcom.com/support/802.11/linux_sta.php
    2-Extract it to a folder in home
    3-Read readme and understand the depedencies and follow the steps to disable the other wifi   modules
                       for me solved with installing :kernal26-headers and base-devel
    4-follow the steps in the read me and make then make install
    5-insert module into kernal
    6-make it automatic to load on startup
    Hope some one find this usefull cheers !!!:)
    I know this will help many people, even though I don't use this card.
    Thing to add to 5 and 6:
    5 - Command: modprobe XXXXX (module name)
    6- Add module name to MODULES=() in /etc/rc.conf

  • ***READ*** iTunes Download and Launch for XP Solved, May Help Others*******

    Well after hours of scouring my computer I have found the answer and solved my problem. People might want to make a note of this because it was simple and much less frustrating then some of the other instructions I have found on here:
    1st- After downloading Itunes I was getting the "itunes encountered a problem and must shut down" error when trying to launch it. I was also getting the "buffer overrun" error when attempting to start Quick Time.
    2- I hit ctrl, Alt, delete to bring up the task manager. I noticed 3 processes running in the background- "iPodService.exe", "iTunesHelper.exe" and "AppleMobileDevic...". this was a surprise to me since I never downloaded iTunes before....HOWEVER I discovered by searching my computer that my 17 year old son had about a year ago. He attempted to uninstall the programs BUT these processes remained even though nothing showed up in the installed programs from start>all programs. Also did not show up in the add/remove installed software. In any event here is what I did:
    I first ended all three processes in task manager. I second went into Start>Search and ran 3 seperate searches for "iPod", "Apple" and "iTunes". Deleted any and all references and dll's. Be careful with the Apple search do not simply select all of your findings and hit delete because applets shows up in the search and u need them for your other programs. Simply delete anything from Apple Computer. Then I ran CCleaner which is available free from www.ccleaner.com. Click on issues and it will give u a laundry list of missing dll's and unused ones. Then by hitting Fix selected issues it safely deletes the registry entries no longer being used. For safety it gives you the option of backing up your registry entries but i have had zero problems doing it. Run that a few times till u get the "No Issues" found message. Then I closed all and redownloaded the new iTunes with quick time and all seems to be working!!! I just got my iPod so im gonna test further but as far as the downloading and opening of the programs on my XP that solved the issue. Hope this helps others.

    teshlachris,
    iTunes, like other applications, will sometimes have issues trying to install from a different admin user than the one used to first install it.
    Did your son install iTunes with a different account? If so, your previous post did not include the fact your son had previously installed iTunes, or I would have suggested trying the install while logged in under his account.
    Hope this helps,
    Nathan C.

Maybe you are looking for

  • Why doesn't yahoo page fill my new 20 inch display?

    I have used and loved firefox for about two years, have just bought a new computer with a larger 20 inch monitor and the content of my yahoo homepage only fills about 60% of the display. It is centered, just not large enough. This was never an issue

  • JComboBox

    Hi All Can anyone tell how to set the background color of an editable combobox Setting it using setBackground only sets the down arrow buttton colr Rgrds Sharmila

  • Need help wrt query

    Hi , I have table A with below data : Name Sal Ram

  • HTTPS adf application ----urgent !!!!!!

    Hi all, I need to have my application run on HTTPS rather than http .i have used jdev 10 for my adf application and deployed on oracle application server 10 g . so can someone help me out how to run or get my url in https. Do i need to make settings

  • Tcode for Infotype log in Personnel Administration

    Tcode for Infotype log in Personnel Administration