Int Object and Int val...

Can someone tell me what the difference is between an integer object instead of an int val? I'm working with a IntList where I have to change the program so that the nodes hold an integer object rather than an int val? So if I have this example:
public void addToEnd(int val)
     IntNode newnode = new IntNode(val,null);
     //if list is empty, this will be the only node in it
     if (list == null)
         list = newnode;
     else
          //make temp point to last thing in list
          IntNode temp = list;
          while (temp.next != null)
              temp = temp.next;
          //link new node into list
          temp.next = newnode;
         count++;
    }...would I have to merely specify the following -
public void addToEnd(int object)
     IntNode newnode = new IntNode(val,object);I don't know what the object really does, so if I'm merely just switching int val to object, what's the purpose of all that?

Can someone tell me what the difference is between an
integer object instead of an int val? I'm working
with a IntList where I have to change the program so
that the nodes hold an integer object rather than an
int val? So if I have this example:
public void addToEnd(int val)
     IntNode newnode = new IntNode(val,null);
//if list is empty, this will be the only node in
n it
     if (list == null)
         list = newnode;
     else
          //make temp point to last thing in list
          IntNode temp = list;
          while (temp.next != null)
              temp = temp.next;
          //link new node into list
          temp.next = newnode;
         count++;
}...would I have to merely specify the following -
public void addToEnd(int object)
     IntNode newnode = new IntNode(val,object);I don't know what the object really does, so if I'm
merely just switching int val to object, what's the
purpose of all that?Are you aware of Type-Wrapper Class? Hi Jeff!
Thank you. -Ronillo

Similar Messages

  • Oracle Objects and Domains in Java Server Pages

    We have defined this object in a Oracle 816 Enterprise:
    CREATE TYPE DESCRIPTOR AS OBJECT
    ( ID VARCHAR2(30),
    DESCRIPTOR VARCHAR2(80))
    create TYPE descriptor_table AS VARRAY(30) of DESCRIPTOR
    create table foo_test
    (foo_test_id varchar2(10),
    descrip descriptor_TABLE )
    ALTER TABLE foo_test
    ADD CONSTRAINT BIBL_test_PK PRIMARY KEY (foo_test_id)
    then we have created in JDeveloper 3.1 an Entity (footest) object and a Domain (DescriptorDom) for the type DESCRIPTOR; then set the type of attribute descript to mypackage.DescriptorDom
    After that, we created a JavaServer Page as follows:
    <jsp:useBean class="oracle.jbo.html.databeans.JSRowSetBrowser" id="abean" scope="request" >
    <% abean.setShowCurrentRow(true); abean.setVisibleRows(10); abean.setShowRecordNumbers(true); abean.setReleaseApplicationResources(false); abean.setDisplayAttributes("FooTestId,Descrip"); abean.initialize(pageContext,"ot_logics_LogicsModule.FooTestView");
    abean.render();%>
    </jsp:useBean>
    The execution of JSP shows the error:
    java.lang.ClassCastException
    void oracle.jbo.domain.Struct.convertArrayToStruct()
    java.lang.Object oracle.jbo.domain.Struct.getAttribute(int)
    java.lang.String oracle.jbo.domain.Struct.toString()
    void oracle.jbo.html.databeans.JSRowSetBrowser.internalInitialize()
    void oracle.jdeveloper.html.WebBeanImpl.initialize(javax.servlet.ServletContext, javax.servlet.http.HttpSession,
    javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.PrintWriter)
    void oracle.jdeveloper.html.DataWebBeanImpl.initialize(javax.servlet.ServletContext, javax.servlet.http.HttpSession,
    javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.io.PrintWriter, java.lang.String)
    void oracle.jdeveloper.html.DataWebBeanImpl.initialize(javax.servlet.jsp.PageContext, java.lang.String)
    void ot_pages_html.bibl_test._jspService(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse)
    void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void oracle.jsp.app.JspApplication.dispatchRequest(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse)
    void oracle.jsp.JspServlet.doDispatch(oracle.jsp.app.JspRequestContext)
    void oracle.jsp.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void oracle.lite.web.JupServlet.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.MimeServletHandler.handle(oracle.lite.web.JupApplication, java.lang.String, int,
    oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.JupApplication.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.JupAppHandler.handle(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.HTTPServer.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void oracle.lite.web.HTTPServer.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    boolean oracle.lite.web.HTTPServer.handleRequest(oracle.lite.web.JupInputStream, java.io.OutputStream)
    boolean oracle.lite.web.JupServer.handle(oracle.lite.web.JupInputStream, java.io.OutputStream)
    void oracle.lite.web.JupHTTPListener$JupHTTP.run()
    Please JTeam, could you illuminate me about how implement ORACLE objects in Entity object s and JavaServer Pages?
    ps The code generated by JPublisher seems be more complete that done by wizard of Domains. We sould use JPublisher?. How set the attribute type?
    Thank in advance.
    J Luis

    Hi,
    It looks like this might be a bug. I am going to use the information you supplied to file a bug so our QA team can investigate.
    We have had problems with arrays of structs, but hope to have them fixed with our next release.

  • Object and reference accessing for primitives, objects and collections

    Hi,
    I have questions re objects, primitives and collection accessing and references
    I made a simple class
    public class SampleClass {
         private String attribute = "default";
         public SampleClass()
         public SampleClass(SampleClass psampleClass)
              this.setAttribute(psampleClass.getAttribute());
              if (this.getAttribute() == psampleClass.getAttribute())
                   System.out.println("INSIDE CONSTRUCTOR : same object");
              if (this.getAttribute().equals(psampleClass.getAttribute()))
                   System.out.println("INSIDE CONSTRUCTOR : equal values");
         public void setAttribute(String pattribute)
              this.attribute = pattribute;
              if (this.attribute == pattribute)
                   System.out.println("INSIDE SETTER : same object");
              if (this.attribute.equals(pattribute))
                   System.out.println("INSIDE SETTER : equal values");
         public String getAttribute()
              return this.attribute;
         public static void main(String[] args) {
    ...and another...
    public class SampleClassUser {
         public static void main(String[] args) {
              SampleClass sc1 = new SampleClass();
              String test = "test";
              sc1.setAttribute(new String(test));
              if (sc1.getAttribute() == test)
                   System.out.println("SampleClassUser MAIN : same object");
              if (sc1.getAttribute().equals(test))
                   System.out.println("SampleClassUser MAIN : equal values");
              SampleClass sc2 = new SampleClass(sc1);
              sc1.setAttribute("test");
              if (sc2.getAttribute() == sc1.getAttribute())
                   System.out.println("sc1 and sc2 : same object");
              if (sc2.getAttribute().equals(sc1.getAttribute()))
                   System.out.println("sc1 and sc2 : equal values");
    }the second class uses the first class. running the second class outputs the following...
    INSIDE SETTER : same object
    INSIDE SETTER : equal values
    SampleClassUser MAIN : equal values
    INSIDE SETTER : same object
    INSIDE SETTER : equal values
    INSIDE CONSTRUCTOR : same object
    INSIDE CONSTRUCTOR : equal values
    INSIDE SETTER : same object
    INSIDE SETTER : equal values
    sc1 and sc2 : equal values
    ...i'm just curios why the last 3 lines are the way they are.
    INSIDE SETTER : same object
    INSIDE SETTER : equal values
    sc1 and sc2 : equal values
    how come while inside the setter method, the objects are the same object, and after leaving the setter method are not the same objects?
    Can anyone point a good book that shows in detail how objects, primitives and collections are referenced, especially when passed to methods. Online reference is preferred since the availability of books can be a problem for me.
    Thanks very much

    You are confusing references with objects.
    This compares two object references:
    if( obj1 == obj2 ) { // ...Whereas this compares two objects:
    if( obj1.equals(obj2) ) { // ...A reference is a special value which indicates where in memory two objects happen to be. If you create two strings with the same value they won't be in the same place in memory:
    String s1 = new String("MATCHING");
    String s2 = new String("MATCHING");
    System.out.println( s1 == s2 ); // false.But they do match:
    System.out.println( s1.equals(s2) ); // trueIf you're using a primitive then you're comparing the value that you're interested in. E.g.
    int x = 42;
    int y = 42;
    System.out.println(x == y); // trueBut if you're comparing references you're usually more interested in the objects that they represent that the references themselves.
    Does that clarify matters?
    Dave.

  • Why is the Integer wrapper class object and primitive object equal ?

    This is my code :
    package obectorientation;
    public class oo3 {
         public static void main(String[] args) {
              int x=1; float y=1.0F;
              int x1=1;
                                    Integer y1= new Integer(1);
              if(x1==y1)
                   System.out.println("Equal");
              else
                   System.out.println("NOT Equal");
    O/P : EqualMy question is why are x1 and y1 equal ? Won't y1 be a different object and x1 just a primitive variable ?
    Thanks in Advance.

    Specifically, it's because y1 gets unboxed before the comparison. What's really happening is effectively: if ( x1 == y1.intValue() )

  • How to compare 2 Objects( and )?

    Should I write an interface?

    Java has 2 interfaces that would be of interest to you.
    They both are designed to return an integer that describes the relationship between two objects.
    Suppose you have two objects: objectA and objectB
    The return value is as following:
    if (returnValue < 0) then objectA precedes objectB. (A < B)
    if (returnValue > 0) then objectA follows objectB. (A > B)
    if (returnValue == 0) then objectA and objectB are equivalent (A == B).
    It is up to you to do the comparing and determine which is the correct return value...
    Here are the two interfaces:
    1) Comparable interface (java.lang.Comparable)
    You would use this interface when you have a class that exhibits some natural order..
    You add this interface to the class, and, within the class, implement the following method:
       public int compareTo( Object obj )
       The variable obj in this case refers to the "other" object that you want to compare.
       public class MyClass implements Comparable // <--- notice the last two words!!
              other methods.
          public boolean isTallerThan( MyClass mc )
             // just some method i made up to compare...
          public int compareTo( Object objectB )
             // You are comparing "this" object with the "otherObject"...
             // Note that objectA is "this".
             MyClass otherObject = (MyClass)objectB;
             // Do whatever you need to compare the two.
             if (this.isTallerThan(otherObject) )
                 return -1;
             else if ( otherObject.isTallerThan(this) )
                 return +1;
             else
                 return 0; // they are of equal height...whatever...
       2) Comparator interface (java.util.Comparator)
    You could use this interface if you have a different set of standards with which to compare two different objects. Usually, it is it's own class, designed for only this purpose. You implement the following method:
       public int compare( Object objA, Object objB )
       Notice that in this case you have to explicitly pass in both objects to be compared, whereas in the Comparable interface, objA is implicitly assumed to be the object on which the method is called (or as I like to call it, this).
    Here is an example:
       public class MyComparator implements Comparator
          public int compare( Object objA, Object objB )
             do whatever comparisons you need to determine whether
             objA < objB (-1 is returned)
             objA > objB (+1 is returned)
             or
             objA == ObjB (0 is returned)

  • Date objects and prepared statements

    Hi, I am trying to parse a String into a Date object with format "dd/MM/yyyy hh/mm/ss". Anyway, i have a method in a separate class which reads in a String and converts it to a formatted Date object.
    static public Date convertToDate(String t) throws ParseException {
    Date dd = new Date();
    ParsePosition p = new ParsePosition(0);
    SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");
    //y, M, etc are retrieved as substrings of String t. I know these methods are deprecated as well
    dd.setYear(y);
    dd.setMonth(M);
    dd.setDate(d);
    dd.setHours(h);
    dd.setMinutes(m);
    dd.setSeconds(s);
    String formattedDate = formatter.format(dd);
    Date theDate = formatter.parse(formattedDate);
    return theDate;
    Anyway, I am trying to use this in an SQL statement because I am using an Access DB which has a field of Date/Time value. Is this correct to use a Date object then? I have a prepared statement -
    PreparedStatement query = connection.prepareStatement(
    "SELECT FText FROM wnioutput WHERE Id = ? AND Section = ? AND Start = " +
    "? AND Field = ?");
    //start is the Date object returned from the previous method in a separate class
    query.setInt(1, id);
    query.setInt(2, section);
    query.setDate(3, formattedStart); - with this part, i get a setDate method not found, or something
    query.setString(4, ch);
    Can anybody tell me what the problem is? I know there are Date objects of java.util and java.sql. Should i be using an sql Date object? And if so, how, and where do I do this? Thank you!

    ok, i just tried
    query.setTimestamp(3, new java.sql.Timestamp(formattedStart.getTime()));
    where formattedStart is a java.util.Date object
    and I get the following error message -
    Error occured in getting endDateAndTime: java.sql.SQLException: Exception in databaseDisplay: the error message is:java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
    java.lang.NullPointerException
    where endDateAndTime is
    // takes in the startDateAndTime as a formatted String (before it is converted into a Date object)
    public String getEndTime(int s, int ID, String stDateAndTime) {
    String end = null;
    gui g = new gui();
    try {
    String sql = "SELECT End FROM wnioutput WHERE Id = " + ID +
    " AND Section = " + s +
    " AND Start = '" + stDateAndTime + "' AND Field = 'Wind50m'";
    ResultSet result = g.queryDatabase(sql);
    if (result.next())
    end = result.getString("End");
    } catch (SQLException sqlex) {
    System.out.println("Error occured in getting endDateAndTime: " + sqlex.toString());
    return end;
    Although this method worked fine before. So the error is in setting the date object in the prepared statement. Anymore suggestions??

  • How would i make an object and rotate it?

    ok, i'm trying to get java to make a graphics object, and then create an array of said objects (basically just a bunch of rectangles organized into rows/columns) with the end goal being that i be able to put this collection of rectangles into a JPanel and then move it around and rotate it without changing its dimensions (so each rectangle in the collection retains the same height and width but with a different placement/orientation angle )
    My java textbook (yes, college student) doesn't cover the Graphics2D stuff which SEEMS to be what i would use... but beyond that I'm finding the resources on the topic to be uniformly opaque. i think i just need some starting point to extrapolate from. could anyone reply me a crash course in the above...?

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Blocks extends JPanel {
        Block[][] blocks;
        int dx = 2;
        int dy = 2;
        public Blocks() {
            registerKeys();
            setFocusable(true);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(blocks == null) initBlocks();
            g2.setPaint(Color.red);
            for(int j = 0; j < blocks.length; j++)
                for(int k = 0; k < blocks[j].length; k++)
                    blocks[j][k].draw(g2);
        private void initBlocks() {
            int rows = 6;
            int cols = 3;
            Dimension d = new Dimension(200, 200);
            BlockMaker blockMaker = new BlockMaker(rows, cols, d);
            blocks = blockMaker.getBlocks();
        private void registerKeys() {
            getInputMap().put(KeyStroke.getKeyStroke("UP"), "UP");
            getActionMap().put("UP", up);
            getInputMap().put(KeyStroke.getKeyStroke("LEFT"), "LEFT");
            getActionMap().put("LEFT", left);
            getInputMap().put(KeyStroke.getKeyStroke("DOWN"), "DOWN");
            getActionMap().put("DOWN", down);
            getInputMap().put(KeyStroke.getKeyStroke("RIGHT"), "RIGHT");
            getActionMap().put("RIGHT", right);
        private void step(int x, int y) {
            for(int j = 0; j < blocks.length; j++)
                for(int k = 0; k < blocks[j].length; k++)
                    blocks[j][k].move(x, y);
            repaint();
        private Action up = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(0, -dy);
        private Action left = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(-dx, 0);
        private Action down = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(0, dy);
        private Action right = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(dx, 0);
        public static void main(String[] args) {
            Blocks blocks = new Blocks();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(blocks);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class BlockMaker {
        Block[][] blocks;
        int PAD = 20;
        public BlockMaker(int rows, int cols, Dimension size) {
            int w = (size.width  - (cols+1)*PAD)/cols;
            int h = (size.height - (rows+1)*PAD)/rows;
            blocks = new Block[rows][cols];
            for(int j = 0; j < rows; j++) {
                int y = PAD + j*(h + PAD);
                for(int k = 0; k < cols; k++) {
                    int x = PAD + k*(w + PAD);
                    blocks[j][k] = new Block(x, y, w, h);
        public Block[][] getBlocks() {
            return blocks;
    class Block {
        int x;
        int y;
        int w;
        int h;
        public Block(int x, int y, int w, int h) {
            this.x = x;
            this.y = y;
            this.w = w;
            this.h = h;
        protected void draw(Graphics2D g2) {
            g2.drawRect(x, y, w, h);
        protected void move(int dx, int dy) {
            x += dx;
            y += dy;
    }

  • How to set timer intervals for object + and a motion for entering stage

    Hi, I am making a simple game but I have a couple problems/queries.
    1) My game is a touch an object and you get a point game, currently the objects appear randomly over the screen, however I am trying to get it to slide into the screen similar to the Fruit Ninja game, but not limited to entering from one side, does anyone know how to set this?
    2) As I mentioned above my objects appear randomly, I have set a timer when I change the timer from 800 to another number, it just makes all the objects on the screen last for 800 milliseconds all at the same time then disappear and appear somewhere else on the screen for another 800 milliseconds and it repeats, what I am trying to do is make them come at different intervals, for example:
    Object 1 - constantly appears, so when the 800 millisecond is over, it comes back on a different part of the stage
    Object 2 - I want it to appear every 5 seconds, so when the 800 millisecond is over it will come back on the stage in 5 seconds, but not instantly like Object 1
    But I have no idea how to do this :/ anyone have the code needed for me to do this?
    Sorry for the long questions, I only asked because I really am stuck, I have been trying to do this for over 2 weeks now.
    Thanks very much.
    My Code
    [Code]
    //importing tween classes
    import fl.transitions.easing.*;
    import fl.transitions.Tween;
    import flash.utils.Timer;
    //hiding the cursor
    Mouse.hide();
    var count:Number = 60;
    var myTimer:Timer = new Timer(1000,count);
    myTimer.addEventListener(TimerEvent.TIMER, countdown);
    myTimer.start();
    function countdown(event:TimerEvent):void {
    myText_txt.text = String((count)-myTimer.currentCount);
    if(myText_txt.text == "0"){
    gotoAndStop(5)
    //creating a new Star instance;
    var star:Star = new Star();
    var box:Box = new Box();
    var bomb:Bomb = new Bomb();
    //creating the timer
    var timer:Timer = new Timer(800);
    var timerbox:Timer = new Timer(850);
    var timerbomb:Timer = new Timer(1000);
    //we create variables for random X and Y positions
    var randomX:Number;
    var randomY:Number;
    //variable for the alpha tween effect
    var tween:Tween;
    //we check if a star instance is already added to the stage
    var starAdded:Boolean = false;
    var boxAdded:Boolean = false;
    var bombAdded:Boolean = false;
    //we count the points
    var points:int = 0;
    //adding event handler to the timer;
    timer.addEventListener(TimerEvent.TIMER, timerHandler);
    //starting the timer;
    timer.start();
    function timerHandler(e:TimerEvent):void
              //first we need to remove the star from the stage if already added
              if (starAdded)
                        removeChild(star);
              if (boxAdded)
                        removeChild(box);
              if (bombAdded)
                        removeChild(bomb);
              //positioning the star on a random position
              randomX = Math.random() * 800;
              randomY = Math.random() * 1280;
              star.x = randomX;
              star.y = randomY;
              star.rotation = Math.random() * 360;
              box.x = Math.random() * stage.stageWidth;
              box.y = Math.random() * stage.stageHeight;
              box.rotation = Math.random() * 360;
              bomb.x = Math.random() * stage.stageWidth;
              bomb.y = Math.random() * stage.stageHeight;
              bomb.rotation = Math.random() * 360;
              //adding the star to the stage
              addChild(star);
              addChild(box);
              addChild(bomb);
              //changing our boolean value to true
              starAdded = true;
              boxAdded = true;
              bombAdded = true;
              //adding a mouse click handler to the star
              star.addEventListener(MouseEvent.CLICK, clickHandler);
              box.addEventListener(MouseEvent.CLICK, clickHandlerr);
              bomb.addEventListener(MouseEvent.CLICK, clickHandlerrr);
    function clickHandlerr(e:Event):void
              //when we click/shoot a star we increment the points
              points +=  5;
              //showing the result in the text field
              points_txt.text = points.toString();
                        if (boxAdded)
                        removeChild(box);
              boxAdded = false;
    function clickHandler(e:Event):void
              //when we click/shoot a star we increment the points
              points++;
              //showing the result in the text field
              points_txt.text = points.toString();
              if (starAdded)
                        removeChild(star);
              starAdded = false;
    function clickHandlerrr(e:Event):void
              gotoAndPlay(5);
    [/Code]

    The only thing that affects TopLink is the increment by, as increasing this is what allows TopLink to reduce the number of times it needs to go to the database to get additional numbers. Ie, an increment value of 1 means TopLink needs to go the database after each insert; an increment value of 50 allows it to insert 50 times before having to get a value from the sequence. The cache on the sequence object in the database affect the database access times. While it may improve the access times when the sequence number is obtained from the database, but I believe the network access to obtain the sequence is the greater concern and slow down for most applications. It all depends on the application usage and design though - an increment (and application cache) of 50 numbers seems to be the best default.
    I cannot say what effect the cache vs nocache settings will have on your application, as it will depend on the database load. Only performance testing and tuning will truly be able to tell you whats best for your application.
    Best Regards,
    Chris

  • What is the differences between object and other variables?

    For example:
    Object[ ] mm=new Object[10];
    int[ ] mm=new int[10];
    what are their differences??? How to use them correctly??
    Thank you very much!!

    Would you please explain deep about it ?????
    the most important is when to use object and when to
    use other primitive data type
    (int,float,long,double)??
    Thank you very much!!!Each type, whether primitive or object, models some idea or thing or abstraction.
    Use primtives when you just need raw values with no behavior. If you need an integer number, you'll generally use int, sometimes long, rarely short.
    Use objects when you need the concepts they model--String when you want a string of text, Date when you want to represent a date, whatever class you create (Person, Student, Car, Whatever) when you need to use or manipulate the concepts they model.
    Use the object wrappers for the primitives--Integer, Double, etc.--when you want to represent the number but you're using it in a context where objects are required--e.g. when adding them to a collection.

  • Iterating through master view objects and child view objects in same page

    I am working on a project using ADF UIX and Business Components.
    I have an application module with two view objects one the master view object and the second the detail object. They are related via a view link.
    I would like to iterate through the master view objects displaying a customer name as bold text and then below each customer name I'd like to display the detail records in a table via the detail view object i.e. a seprate table for each customer.
    Is this possible - I haven't had much luck!?
    Thanks in advance.

    That's because
    $(".ms-vb2 a").
    is bringing back all the pieces that have that class with an anchor on the whole page, not just the ones in the .ms-wpContentDivSpace
    I don't know the exact syntax, but I think you need to iterate through all the '.ms_vb2 a' items as well - there are multiple ones, and do something like this inside your other grouping
    $(".ms-vb2 a").each(function(index) {
        var val=$(this).html();
       var val2=val.replace(/_/g," ")
       $(this).html(val2);
    That's not quite right but maybe that will help.
    Robin

  • Difference between abap object and function

    hi all,
    i read the book on abap object of the difference between abap object and classical abap.
    i know that there is only 1 instance of a specific function group but somehow i still not so clear why subsequent vehicle cannot use the same function. i also can use the do and loop to call the function? if cannot then why?
    hope can get the advice.
    thanks
    using function *********
    function-pool vehicle.
    data speed type i value 0.
    function accelerate.
    speed = speed + 1.
    endfunction.
    function show_speed.
    write speed.
    endfunction.
    report xx.
    start-of-selection.
    *vehicle 1
    call function 'accelerate'.
    call function 'accelerate'.
    call function 'show_speed'.
    *vehicle 2
    *vehicle 3
    *****abap object*******
    report xx.
    data: ov type ref to vehicle,
             ov_tab type table of ref to vehicle.
    start-of-selection.
    do 5 times.
    create object ov.
    append ov to ov_tab.
    enddo.
    loop at ov_tab into ov.
    do sy-tabix times.
    call method ov->accelerate.
    enddo.
    call method ov->show_speed.
    endloop.

    Hi
    Now try this:
    REPORT ZTEST_VEHICLEOO .
    PARAMETERS: P_CAR   TYPE I,
                P_READ  TYPE I.
    *       CLASS vehicle DEFINITION
    CLASS VEHICLE DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA: MAX_SPEED   TYPE I,
                    MAX_VEHICLE TYPE I,
                    NR_VEHICLES TYPE I.
        CLASS-METHODS CLASS_CONSTRUCTOR.
        METHODS CONSTRUCTOR.
        METHODS ACCELERATE.
        METHODS SHOW_SPEED.
        METHODS GET_SPEED EXPORTING E_SPEED TYPE I.
      PRIVATE SECTION.
        DATA: SPEED      TYPE I,
              NR_VEHICLE TYPE I..
    ENDCLASS.
    *       CLASS vehicle IMPLEMENTATION
    CLASS VEHICLE IMPLEMENTATION.
      METHOD CLASS_CONSTRUCTOR.
        NR_VEHICLES = 0.
      ENDMETHOD.
      METHOD CONSTRUCTOR.
        NR_VEHICLES = NR_VEHICLES + 1.
        NR_VEHICLE  = NR_VEHICLES.
      ENDMETHOD.
      METHOD ACCELERATE.
        SPEED = SPEED + 1.
        IF MAX_SPEED < SPEED.
          MAX_SPEED   = SPEED.
          MAX_VEHICLE = NR_VEHICLE.
        ENDIF.
      ENDMETHOD.
      METHOD SHOW_SPEED.
        WRITE: / 'Speed of vehicle nr.', NR_VEHICLE, ':', SPEED.
      ENDMETHOD.
      METHOD GET_SPEED.
        E_SPEED = SPEED.
      ENDMETHOD.
    ENDCLASS.
    DATA: OV     TYPE REF TO VEHICLE,
          OV_TAB TYPE TABLE OF REF TO VEHICLE.
    DATA: V_TIMES TYPE I,
          FL_ACTION.
    DATA: V_SPEED TYPE I.
    START-OF-SELECTION.
      DO P_CAR TIMES.
        CREATE OBJECT OV.
        APPEND OV TO OV_TAB.
      ENDDO.
      LOOP AT OV_TAB INTO OV.
        IF FL_ACTION = SPACE.
          FL_ACTION = 'X'.
          V_TIMES = SY-TABIX * 2.
        ELSE.
          FL_ACTION = SPACE.
          V_TIMES = SY-TABIX - 2.
        ENDIF.
        DO V_TIMES TIMES.
          CALL METHOD OV->ACCELERATE.
        ENDDO.
        CALL METHOD OV->SHOW_SPEED.
      ENDLOOP.
      SKIP.
      WRITE: / 'Higher speed', VEHICLE=>MAX_SPEED, 'for vehicle nr.',
                VEHICLE=>MAX_VEHICLE.
      SKIP.
      READ TABLE OV_TAB INTO OV INDEX P_READ.
      IF SY-SUBRC <> 0.
        WRITE: 'No vehicle', P_READ.
      ELSE.
        CALL METHOD OV->GET_SPEED IMPORTING E_SPEED = V_SPEED.
        WRITE: 'Speed of vehicle', P_READ, V_SPEED.
      ENDIF.
    Try to repeat this using a function group and I think you'll undestand because it'll be very hard to do it.
    By only one function group how can u read the data of a certain vehicle?
    Yes you can create in the function group an internal table where u store the data of every car: in this way u use the internal table like it was an instance, but you should consider here the example is very simple. Here we have only the speed as characteristic, but really we can have many complex characteristics.
    Max

  • What's the difference between a not-initialed object and a null object

    hi guys, i wanna know the difference between a not-initialed object and a null object.
    for eg.
    Car c1;
    Car c2 = null;after the 2 lines , 2 Car obj-referance have been created, but no Car obj.
    1.so c2 is not refering to any object, so where do we put the null?in the heap?
    2.as no c2 is not refering to any object, what's the difference between c2 and c1?
    3.and where we store the difference-information?in the heap?

    For local variables you can't have "Car c1;" the compiler will complain.That's not true. It will only complain if you try to use it without initializing it.
    You can have (never used, so compiler doesn't care):
    public void doSomething()
       Car c1;
       System.out.println("Hello");
    }or you can have (definitely initialized, so doesn't have to be initialized where declared):
    public void doSomething(boolean goldClubMember)
       Car c1;
       if (goldClubMember)
           c1 = new Car("Lexus");
       else
           c1 = new Car("Kia");
       System.out.println("You can rent a " + c1.getMake());
    }

  • Anchored objects and first line in InDesign CS3

    Hi, thanks for reading. I know that when you want an achored object at the beginning of a text block to all push away ("wrap around") the text, including the first line, you have to put it into a line before that.
    What I don't like about it, is that I then have an empty first line and everything else is pushed one line down. Now I could move the whole textbox up, to fit to the rest of my layout, but that's not the way one should work in InDesign. Is there a way to get around the first line?

    T-
    Select the anchored object and put text wrap on it. Then select the anchored object and go to Object/Anchored Object/Options. Select Position: Inline and set the Y Offset to the negative number that aligns your text where you want it.

  • How to create dynamic View Object and Dynamic Table

    Dear ll
    I want to create a dynamic view object and display the output in a dynamic table on the page.
    I am using Jdeveloper 12c "Studio Edition Version 12.1.2.0.0"
    This what I did:
    1- I created a read only view object with this query "Select sysdate from dual"
    2- I added this View object to the application module
    3- I created a new method that change the query of this View object at runtime
        public void changeVoQuery(String dbViewName) {
            String sqlstm = "Select * From " + dbViewName;
            ViewObject dynamicVo = this.findViewObject("DynamicVo");
            if (dynamicVo != null) {
                dynamicVo.remove();
            dynamicVo = this.createViewObjectFromQueryStmt("DynamicVo", sqlstm);
            dynamicVo.executeQuery();
    4- I run the application module for testing the method and I passed "Scott.Emp" as a parameter and the result was Success
    5- Now I want to show the result of the view on the page, so I draged and dropped the method from the data control as a parameter form
    6- I dragged and dropped the view Object "DynamicVo" as a table and I choose "generate Column Dynamically at runtime". This is the page source
    <af:panelHeader text="#{viewcontrollerBundle.SELECT_DOCUMTN_TYPE}" id="ph1">
            <af:panelFormLayout id="pfl1">
                <af:inputText value="#{bindings.dbViewName.inputValue}" label="#{bindings.dbViewName.hints.label}"
                              required="#{bindings.dbViewName.hints.mandatory}"
                              columns="#{bindings.dbViewName.hints.displayWidth}"
                              maximumLength="#{bindings.dbViewName.hints.precision}"
                              shortDesc="#{bindings.dbViewName.hints.tooltip}" id="it1">
                    <f:validator binding="#{bindings.dbViewName.validator}"/>
                </af:inputText>
                <af:button actionListener="#{bindings.changeVoQuery.execute}" text="changeVoQuery"
                           disabled="#{!bindings.changeVoQuery.enabled}" id="b1"/>
            </af:panelFormLayout>
        </af:panelHeader>
        <af:table value="#{bindings.DynamicVo.collectionModel}" var="row" rows="#{bindings.DynamicVo.rangeSize}"
                  emptyText="#{bindings.DynamicVo.viewable ? 'No data to display.' : 'Access Denied.'}"
                  rowBandingInterval="0" selectedRowKeys="#{bindings.DynamicVo.collectionModel.selectedRow}"
                  selectionListener="#{bindings.DynamicVo.collectionModel.makeCurrent}" rowSelection="single"
                  fetchSize="#{bindings.DynamicVo.rangeSize}" filterModel="#{bindings.DynamicVoQuery.queryDescriptor}"
                  queryListener="#{bindings.DynamicVoQuery.processQuery}" filterVisible="true" varStatus="vs" id="t1"
                  partialTriggers="::b1">
            <af:iterator id="i1" value="#{bindings.DynamicVo.attributesModel.attributes}" var="column">
                <af:column headerText="#{column.label}" sortProperty="#{column.name}" sortable="true" filterable="true"
                           id="c1">
                    <af:dynamicComponent id="d1" attributeModel="#{column}"
                                         value="#{row.bindings[column.name].inputValue}"/>
                </af:column>
            </af:iterator>
        </af:table>
    when I run the page this error is occured
    <Nov 13, 2013 2:51:58 PM AST> <Error> <oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
    Caused By: java.lang.NullPointerException
    Can any body help me please
    thanks

    Have you seen Shay's video https://blogs.oracle.com/shay/entry/adf_faces_dynamic_tags_-_for_a
    All you have to do is to use the dynamic table to get your result.
    Timo

  • Is Active Directory's ExtensionAttributes9 a field in user object and how to retrieve it in the class type userprincipal?

    Hi, I'm using VS2012.
    I want to use this ExtensionAttributes9 field to store date value for each user object.  I use UserPrincipal class, a collection of these objects are then bind to a gridview control.  Is ExtensionAttributes9 a field in AD user object? 
    How can I access it and bind to the gridview?
    If this field isn't available then what other field can use?
    Thank you.
    Thank you

    UserPrincipal is basically a wrapper around DirectoryEntry:
    http://msdn.microsoft.com/en-us/library/system.directoryservices.directoryentry.aspx and only provides a subset of the Active Directory, although the most common, attributes that are available for the user object.  The attribute that you
    seek is not one of them.
    By utilizing the method that I provided you a link to, it will return the underlying DirectoryEntry that was used to build the UserPrincipal object and should allow you to access the attribute that you seek.
    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

Maybe you are looking for

  • Processing response message in webservice

    Hello, I'm quite a newbie with webservices and this question may seem quite stoopid but I'll ask it anyway... I have built a small web service with JAX-RPC. I know that, with the ServiceLifecycle I can process the whole request message, SOAPHeaders a

  • Migrating 10g report to Bi Publisher 11g

    Hello, I have an existing 10g report from BI Publisher. I would like to upgrade to 11g. in that process, i created a folder in 11g, with catalog menu option. But when i try to upload existing datamodel from 10g, my upload fails. Can any one advise on

  • Bridge or Lightroom wrecks my NEFs; How?  Why?

    I cannot tell if it is happening in Bridge or Lightroom2 but I am continually getting corrupted NEFs. Suddenly the files are only icons, unusable. Usually a "-1" alternate version is being created. What gives? The files show 0 kb content in finder Al

  • How to publish in my own domain and in a latin language?

    Hi, I have 2 questions that are related. I created a iWeb project in Portuguese and was able to publish it to MobileMe without any issues. But this MobileMe account it a trial one that I'm not wiling to keep for some reasons, but specially because of

  • 2-D Barcodes in Oracle Reports

    Hi All, I am trying to implement 2-D Barcodes on a text field in Oracle Reports 10G. Can someone please let me know how this can be acieved ? Thanks Fm