A Little Help Needed (Date Class)

I have the following three classes:
Solution.as
package
   public class Solution implements IDateCreator
         public function Solution()
public function releaseToLastDate(d:Date):Date
IDateCreator.as
package
   public interface IDateCreator
         function releaseToLastDate(d:Date):Date;
DateTest.as
package {
    import flash.display.Sprite
   private var a1:Date  = new Date (2009, 10, 6);
   private var  a2:Date = new Date(2010 , 12);
private var b1:Date  = new Date (1987, 11, 6);
private var b2:Date  = new Date (1988, 12);
private var solution:Solution;
public function DateTest()
solution = new Solution();
var yearTestPassed:Boolean;
var monthTestPassed:Boolean;
yearTestPassed = (solution.releaseToLastDate(a1).fullYearUTC = a2.fullYearUTC) && (solution.releaseToLastDate(b1).fullYearUTC == b2.fullYearUTC);
monthTestPassed = (solution.releaseToLastDate(a1).fullMonthUTC = a2.fullMonthUTC) && (solution.releaseToLastDate(b1).fullMonthUTC == b2.fullMonthUTC);
trace(“Year Test Passed:” + yearTestPassed);
trace(“Month Test Passed:” + monthTestPassed);
I need to figure out what goes in the releeaseToLastDate function in the Solution class order for both boolean expressions to be true. These classes are what i have written so far, and i just need assistance on what needs to go in place of those question marks.

UseOneAsMany is the function you need to use.
It takes three parameters:
1 --- The node you want to duplicated
2 --- How many times you want to duplicated
3 --- The context you want to place for it.
Regards
Liang

Similar Messages

  • A little help needed in message mapping

    a little help needed in message mapping
    I have to map one of the idoc header segments as many times as it occurs to each Idoc when using the split message funcionality
    let us say we have the segment seg1 and there is a QUALF in it
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    then we use the vbeln to split the idoc into 2.
    so if we have
    <vbeln> 1 </vbeln>
    and
    <vbeln>2 </vbeln>
    then 2 Idocs should be created like this
    <Idoc>
    <vbeln> 1 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    <Idoc>
    <vbeln> 2 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    it is easy to create the segment by using createif with the QUALF field but my problem how to map the qualf twice for each idoc
    Thanks.

    UseOneAsMany is the function you need to use.
    It takes three parameters:
    1 --- The node you want to duplicated
    2 --- How many times you want to duplicated
    3 --- The context you want to place for it.
    Regards
    Liang

  • Urgent Need help on DATE Class

    i have written the code
    <page language="java">
    <%@page import="java.util.Date" %>
    <%
         String mydate="10/25/03";
         Date d=new Date(mydate);
         int mon=d.getMonth();
         int day=d.getDay();
         int year=d.getYear();
         out.println(d+","+mon+","+day+","+year);
    %>
    when i execute
    Sat Oct 25 00:00:00 GMT+05:30 2003,9,6,103
    can some one help me, why i am getting different month day and year

    Be aware that you're using deprecated methods of the Date class. If you read the javadoc for those methods you'll discover that the results are correct. The getMonth method returns a zero-offset month with zero representing January. The getDay method returns a zero-offset day of the week (0 = Sunday...6 = Saturday) not the day of the month. Use the getDate method to return day of the month. The getYear method returns a value that is the result of subtracting 1900 from the year.

  • Little help needed on utl_file

    Hi
    I am trying to write a small stored procedure for recording some information to a text file, and I need a little help. However, beforehand, let me give you what I have done:
    procedure create_record (order_id IN VARCHAR2) IS
    l_dir VARCHAR2(10) 'c:/orders';
    l_filename VARCHAR2(25) := 'orderlist';
    l_datetime DATE := sysdate;
    l_output utl_file.file_type;
    begin
    l_output := utl_file.fopen(l_dir, l_filename, 'w');
    if !utl_file.fopen(l_output) THEN
    utl_file.put_line(l_output, l_datetime || order_id);
    utl_file.fclose(l_output);
    else
    utl_file.fclose(l_output);
    l_output := utl_file.fopen(l_dir, l_filename, 'a');
    end if;
    end;
    Now for questions, firstly, I am not entirely sure that the if statement for checking to see if an existing text file exists is the correct way, and would welcome some help on this, and correction.
    Secondly, I need to add a second statement to the if, which if the file exists and the date on that file is the same as the system date, then to open and append some information to it, else create a new file.
    Unfortunately, for me, I am not sure how to do this.
    Can anyone show me how this can be done?
    Thanks

    Hope you can read my coding correctly.
    ps: not tested
    DECLARE
    myFileExist BOOLEAN;
    myFileLength NUMBER;
    myFileBlockSize BINARY_INTEGER;
    myText VARCHAR2(1000):= NULL;
    myInstr NUMBER;
    l_dir VARCHAR2(10) 'c:/orders';
    l_filename VARCHAR2(25) := 'orderlist';
    l_datetime DATE := trunc(sysdate);
    l_output utl_file.file_type;
    BEGIN
    utl_file.fgetattr(l_dir, l_filename, myFileExist, myFileLength, myFileBlockSize);
    if not myFileExist then -- file not exist
    <ul>l_output := utl_file.fopen(l_dir, l_filename, 'w');
    utl_file.put_line(l_output, l_datetime || order_id);</ul>
    else --file exist
    <ul>
    l_output := utl_file.fopen(l_dir, l_filename, 'r');
    LOOP
    <ul>
    --------------------------------------------------------------------start loop
    UTL_FILE.GET_LINE(l_output,myText) ;
    SELECT instr(UPPER(myText),UPPER(trunc(SYSDATE))) into myInstr FROM dual;
    IF myText IS NULL THEN
    <ul>
    EXIT;
    </ul>
    END IF;
    if myInstr > 0 then
    <ul>
    utl_file.fclose(l_output);
    l_output := utl_file.fopen(l_dir, l_filename, 'a');
    </ul>
    else
    <ul>
    utl_file.fclose(l_output);
    l_filename:='newfilename';
    l_output := utl_file.fopen(l_dir, l_filename, 'w');
    </ul>
    end if;
    --------------------------------------------------------------------end loop
    </ul>
    END loop;
    utl_file.put_line(l_output, l_datetime || order_id);
    </ul>
    end if;
    utl_file.fclose(l_output);
    END;
    Edited by: Lie Ching Te on 12-Feb-2010 12:34 PM
    Edited by: Lie Ching Te on 12-Feb-2010 1:01 PM

  • A little help needed with AppleScript

    Hi:
    I need a little help with AppleScript.
    I created an AppleScript application to copy some files to a LAN disk that I always have mounted. The application works fine, except that it creates some sort of a lock that prevents me from doing other work with the Finder until the copy process is completed.
    If anyone has any ideas for how I can disable this lock, please let me know. I have included the source code of my script below.
    Thanks,
    -AstraPoint
    ===== source code =====
    with timeout of 1500 seconds
    tell application "Finder"
    activate
    set current_date to (do shell script "date '+%Y-%m-%d at %H-%M-%S'") as string
    set name_p to "Personal Data " & current_date & ".dmg"
    set name_d to "Documents " & current_date & ".dmg"
    (* copy the target files to another local disk - to create an extra backup *)
    duplicate file "Personal Data.dmg" of folder "File Backups" of disk "Macintosh HD" to folder "Ad Hoc Backups" of disk "Macintosh HDx" replacing yes
    set the name of file "Personal Data.dmg" of folder "Ad Hoc Backups" of disk "Macintosh HDx" to name_p
    duplicate file "Documents.dmg" of folder "File Backups" of disk "Macintosh HD" to folder "Ad Hoc Backups" of disk "Macintosh HDx" replacing yes
    set the name of file "Documents.dmg" of folder "Ad Hoc Backups" of disk "Macintosh HDx" to name_d
    (* mount remote disk/folder using the alias file on our desktop *)
    open alias file "disk HD5"
    (* copy the target files to a remote disk - to create an extra backup *)
    duplicate file name_p of folder "Ad Hoc Backups" of disk "Macintosh HDx" to folder "Bkup" of disk "HD5" replacing yes
    duplicate file name_d of folder "Ad Hoc Backups" of disk "Macintosh HDx" to folder "Bkup" of disk "HD5" replacing yes
    end tell
    end timeout

    Try:
    ignoring application responses
    Documented [here|http://developer.apple.com/library/mac/#documentation/AppleScript/Concept ual/AppleScriptLangGuide/reference/ASLRcontrolstatements.html].
    Message was edited by: xnav

  • A little help needed for card drawing

    i was told to write a program in java for a friend, i know almost nothing of java, and came here for help
    -i need a class that draws 1 card from a 52 card deck and displays the value of the card.
    -a class that will draw 5 cards from a deck of cards 9 ? A (single deck) and displays them.
    thanks in advance.
    again, im not a programmer, but any suggestions are helpful maybe some code to start me out.

    HermTheWorm wrote:
    i was told to write a program in java for a friend, i know almost nothing of java, and came here for help
    -i need .....
    again, im not a programmer, but any suggestions are helpful maybe some code to start me out.From your Nov 1 post: http://forum.java.sun.com/thread.jspa?threadID=5232501
    hello, i am making a hall pass program for my computer programming class. i am having issues with my jcheckboxes. first off. this file reads from a .txt that just has
    greg
    john
    ...Sorry, but something about all this strikes me as being a bit odd. Maybe it's just me.

  • Report Script Help Needed - Data Extract

    Hi,
    I have a cube with 11 dims: Account, Period, Resource, Facility, SSSS, CCCC, Activity, Years, Version, Scenario, Charges
    I need a report script that will extract data for a certain year and scenario only. I have not written a report script in a long time and have the following thus far. However it's not extracting data that I know exists. Can anyone help? Thanks is advance. This runs but I just get a blank screen or file....
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    // This report script extracts data from cube
    "FY11"
    {DECIMAL 4}
    {NAMEWIDTH 25}
    {SUPCOMMAS}
    {SUPBRACKETS}
    {SUPPAGEHEADING}
    {NOINDENTGEN}
    {SUPMISSINGROWS}
    {SUPZEROROWS}
    {TABDELIMIT}
    {SUPFEED}
    {ROWREPEAT}
    "JAN"
    "FEB"
    "MAR"
    //"APR"
    //"MAY"
    //"JUN"
    //"JUL"
    //"AUG"
    //"SEP"
    //"OCT"
    //"NOV"
    //"DEC"
    "BUDGET"
    // This is the members of the CCCC dimension to extract
    // This is the members or the ACCOUNT dimension to extract
    !

    Hello -
    You can try/modify the code below and see if this works -
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    { SUPMISSINGROWS }
    { SUPZEROROWS }
    { SUPFEED, SUPBRACKETS, SUPCOMMAS }
    { NOINDENTGEN }
    { DECIMAL 4}
    { NAMEWIDTH 30 }
    { ROWREPEAT }
    { TABDELIMIT }
    {MISSINGTEXT "-" }
    <PAGE ("Scenario", "Resource", "Facility" ,"SSSS", "Activity", "Version", "Charges")
    "Budget"
    "Resource"
    "Facility"
    "SSSS"
    "Activity"
    "Version"
    "Charges"
    <COLUMN ("Year","Period")
    "FY11"
    "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
    <ROW ("Account", "CCCC")
    <LINK (<DESCENDANTS ("ACCOUNT") AND <LEV("ACCOUNT",0))
    <LINK (<DESCENDANTS ("RT9_CCCC") AND <LEV("CCCC",0))
    Here you may want to change teh combination in the Page dimensions for eg -
    I know for Scenario you want Budget
    But for Version should it be "Version" or may be "Working" Or "Final" or any other version dimension member ...?
    Same way modify the dimension memebres for other dimensions.
    Regards
    Edited by: Rosi on Aug 24, 2009 10:01 AM
    Edited by: Rosi on Aug 24, 2009 10:02 AM

  • Help needed in class. cant figure out distance

    i have declared 3 variables in a class, x and y are coordiantres
    public class Robot
    private double X;
    private double Y;
    private double Orientation;     
    public Robot()
    X = 0;
    Y = 0;
    Orientation = 0;
    public (double pX, pY, double pOrientation)
    iX = pX;
    iY= pY;
    iOrientation = pOrientation;
    public double getX()
    return iXCoordinate;
    public double getY()
    return iY;
    public double getOrientation()
    return iOrientation;
    public void turnRight (double pDeg) //Degrees
    iOrientation= iOrientation + pDeg;
    public void moveForward (double pDis)
    double d=0;
    double dx=0;
    double dy=0;
    double radians=0;
    radians = Math.toRadians(A); //A is converted to radians     
    dx=d* Math.sin(radians); //distance travelled in x
    dy=d* Math.cos(radians);//distance travelled in y
    how do i get the moveforward i have been given the code written above. in the method also been given dx = d*sin(A) and dy = d*cos(A)
    aprreciate the help thanks

    Damn, I love NetBeans' code reformatting macro...
    public void moveForward(double pDis) {
      double d=0;
      double dx=0;
      double dy=0;
      double radians=0;
      radians = Math.toRadians(A); //A is converted to radians
      dx=d* Math.sin(radians); //distance travelled in x
      dy=d* Math.cos(radians);//distance travelled in y
    }If you read the comments in this method it quite clearly tells you that it is giving you the distances travelled in both dimensions. All you need to do is add those to the objects current position and voila, you have displacement.
    (This is why courses on Newton's laws of motion should be required education for all students)
    McF

  • A little help needed with Dijkstra's algorithim

    Hi I'm trying to implement Dijkstra's algorithm. I have a class GraphMaker
    which creates the graph, and is the main console. And then a second class for Dijkstra's algorithm. Overall it works alright but, I can't to figure out how to get it to find the shortest path for all the cities.
    Here's a sample output:
    BOSTON To NEW YORK: Cost of: 22 MIAMI: Cost of: 122
    NEW YORK To MIAMI: Cost of: 50 HONOLULU : Cost of: 422
    DETROIT To CHICAGO: Cost of: 22 PHOENIX: Cost of: 62
    MIAMI To HONOLULU : Cost of: 402
    CHICAGO To
    PHOENIX To
    HONOLULU To DETROIT: Cost of: 302 PHOENIX: Cost of: 102
    [BOSTON ----> ]
    [BOSTON ----> , NEW YORK------>]
    [BOSTON ----> , NEW YORK------>, HAWAII------>, DETROIT------>]
    [BOSTON ----> , NEW YORK------>, MIAMI------>]
    [BOSTON ----> , NEW YORK------>, HAWAII------>,CHICAGO------>]
    [BOSTON ----> , NEW YORK------>, HAWAII------>, PHOENIX------>]
    [BOSTON ----> , NEW YORK------>, HAWAII------>]
    I know its not the most efficient looking output, I'm intermediate coder at best. But at the top you have 7 cities from BOSTON to HONOLULU, and the cities they connect to. Where I'm really having the problem is at the bottom part. It shows the shortest paths from Boston to other the cities. But I want it show not only the shortest paths from Boston but also the shortest paths from the other cities, to their destination.
    Here's my code:
    The GraphMaker Class:
    public class GraphMaker {
       private int [][]  edges;  // The adjacency matrix
       private Object [] Cities; // Cities
       public static int count;
       public GraphMaker (int n) {
          edges  = new int [n][n];
          Cities = new Object[n];
       public int GetSize()
            return Cities.length;
       public void   SetCities (int vertex, Object label)
            Cities[vertex]=label;
       public Object GetCities (int vertex)             
            return Cities[vertex];
       public void AddEdge  (int source, int target, int w)
            edges[source][target] = w;
       public boolean IsEdge (int source, int target) 
            return edges[source][target]>0;
       public void  RemoveEdge (int source, int target) 
            edges[source][target] = 0;
       public int GetWeight (int source, int target) 
            return edges[source][target];
       public int [] Neighbors (int vertex) {
          count = 0;
          for (int i=0; i<edges[vertex].length; i++) {
          if (edges[vertex]>0) count++;
    final int[]answer= new int[count];
    count = 0;
    for (int i=0; i<edges[vertex].length; i++) {
         if (edges[vertex][i]>0) answer[count++]=i;
    return answer;
    public void print () {
    for (int j=0; j<edges.length; j++) {
         System.out.print (Cities[j]+" To ");
         for (int i=0; i<edges[j].length; i++) {
         if (edges[j][i]>0) System.out.print (Cities[i]+": Cost of: " +
                   " " + edges[j][i]+" ");
         System.out.println (" ");
    public static void main (String args[]) {
    GraphMaker t = new GraphMaker (7);
    t.SetCities (0, "BOSTON");
    t.SetCities(1, "NEW YORK");
    t.SetCities (2, "DETROIT");
    t.SetCities (3, "MIAMI");
    t.SetCities (4, "CHICAGO");
    t.SetCities (5, "PHOENIX");
    t.SetCities (6, "HAWAII");
    t.AddEdge (0,1,22);
    t.AddEdge (1,6,422);
    t.AddEdge (0,3,122);
    t.AddEdge (2,4,22);
    t.AddEdge (2,5,62);
    t.AddEdge (6,5,102);
    t.AddEdge (3,6,402);
    t.AddEdge (6,2,302);
    t.AddEdge (1,3,50);
    t.print();
    final int [] pred = Dijkstra.dijkstra (t, 0);
    for (int n=0; n<7; n++) {
         Dijkstra.PrintPath (t, pred, 0, n);
    And my Dijkstra class
    import java.util.LinkedList;
    public class Dijkstra {
       public static int [] dijkstra (GraphMaker G, int s) {
          final int [] dist = new int [G.GetSize()];  // shortest known distance from "s"
          final int [] pred = new int [G.GetSize()];  // the node that preceeds it in the path
          final boolean [] visited = new boolean [G.GetSize()]; // all false initially
          for (int i=0; i<dist.length; i++) {
          dist[i] = Integer.MAX_VALUE;
          dist[s] = 0;
          for (int i=0; i<dist.length; i++) {
               final int next = SmallestVertex (dist, visited);
               visited[next] = true;
               final int [] n = G.Neighbors (next);
                    for (int j=0; j<n.length; j++) {
                         final int v = n[j];
                         final int d = dist[next] + G.GetWeight(next,v);
                              if (dist[v] > d) {
                                   dist[v] = d;
                                   pred[v] = next;
          return pred;
       private static int SmallestVertex (int [] dist, boolean [] v) {
          int x = Integer.MAX_VALUE;
          int y = -1;  
          for (int i=0; i<dist.length; i++) {
          if (!v[i] && dist<x) {y=i; x=dist[i];}
    return y;
    public static void PrintPath (GraphMaker G, int [] pred, int s, int e) {
    final LinkedList path = new LinkedList();
    int x = e;
    while (x!=s) {
         path.add (0, G.GetCities(x) + "------>");
         x = pred[x];
    path.add (0, G.GetCities(s) + " ----> ");
    System.out.println (path);

    These are the actual results I get.:
    BOSTON To NEW YORK: Cost of: 22 MIAMI: Cost of: 122
    NEW YORK To MIAMI: Cost of: 50 HONOLULU : Cost of: 422
    DETROIT To CHICAGO: Cost of: 22 PHOENIX: Cost of: 62
    MIAMI To HONOLULU : Cost of: 402
    CHICAGO To
    PHOENIX To
    HONOLULU To DETROIT: Cost of: 302 PHOENIX: Cost of: 102
    [BOSTON ----> ]
    [BOSTON ----> , NEW YORK------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>, DETROIT------>]
    [BOSTON ----> , NEW YORK------>, MIAMI------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>,CHICAGO------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>, PHOENIX------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>]
    BOSTON To NEW YORK: Cost of: 22 MIAMI: Cost of: 122
    NEW YORK To MIAMI: Cost of: 50 HONOLULU : Cost of: 422
    DETROIT To CHICAGO: Cost of: 22 PHOENIX: Cost of: 62
    MIAMI To HONOLULU : Cost of: 402
    CHICAGO To
    PHOENIX To
    HONOLULU To DETROIT: Cost of: 302 PHOENIX: Cost of: 102
    ^
    ^
    ^
    This part is what I expected I'm fine with that.
    [BOSTON ----> ]
    [BOSTON ----> , NEW YORK------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>, DETROIT------>]
    [BOSTON ----> , NEW YORK------>, MIAMI------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>,CHICAGO------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>, PHOENIX------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>]
    ^
    ^
    ^
    This is where I'm having the problem, it shows the shortest paths from Boston to other cities,which fine right there those are accurate, but I also need it to show the same for the other cities
    for example something this:
    [NEW YORK----> ]
    [NEW YORK ----> , MIAMI------>]
    [NEW YORK ----> , NEW YORK------>, HAWAII------>, DETROIT------>]
    [NEW YORK ----> , NEW YORK------>, MIAMI------>]
    [NEW YORK ----> , NEW YORK------>, HAWAII------>,CHICAGO------>]
    [NEW YORK----> , HONOLULU------>]
    This would be the results from New York to other cities, although the actual routes for NY would probably be a little different. It would also do the same all the other cites
    like DETROIT
    [DETROIT ----> ]
    [DETROIT  ----> , CHICAGO------>]
    [DETROIT ----> , CHICAGO------>, HAWAII------>,]
    [DETROIT  ----> , NEW YORK------>]
    [DETROIT  ----> ,CHICAGO------>]
    [DETROIT ----> , HONOLULU------>]
    It should produce a overall chart similar to this:
    BOSTON ----> ]
    [BOSTON ----> , NEW YORK------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>, DETROIT------>]
    [BOSTON ----> , NEW YORK------>, MIAMI------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>,CHICAGO------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>, PHOENIX------>]
    [BOSTON ----> , NEW YORK------>, HONOLULU------>]
    [NEW YORK----> ]
    [NEW YORK ----> , MIAMI------>]
    [NEW YORK ----> , NEW YORK------>, HAWAII------>, DETROIT------>]
    [NEW YORK ----> , NEW YORK------>, MIAMI------>]
    [NEW YORK ----> , NEW YORK------>, HAWAII------>,CHICAGO------>]
    [NEW YORK----> , HONOLULU------>]
    [DETROIT ----> ]
    [DETROIT  ----> , CHICAGO------>]
    [DETROIT ----> , CHICAGO------>, HAWAII------>,]
    [DETROIT  ----> , NEW YORK------>]
    [DETROIT  ----> ,CHICAGO------>]
    [DETROIT ----> , HONOLULU------>]
    and so on for the other cities
    Hopefully makes it a little clearer

  • A little help needed on divs etc

    ok this is my first time building a site using dw tbh and im still getting to grips with it and learning new code etc as i go.
    Ive been asked to design a site for a friend of mines escort business lol kinky i know.
    But im having a few probs aligning things properly, here is the site http://www.oldskoolbeats.com/rach   (using temp domain until i find other hosting)
    the main page is ok as it is i think .. ?
    the aboutus.php page is where im getting a bit stuck i cant seem to get anything in the centre as im wanting to put images down the middle.
    (btw text size is a little diff as it needs changing anyways as its off an older site)
    if anyone can help that will be great.

    Looking at the code on the aboutus page.
    You have links to 2 stylesheets:
    <link href="default.css" rel="stylesheet" type="text/css" />
    <link href="/default.css" rel="stylesheet" type="text/css" /> 
    The above link is probably the one that shouldn't be there.
    You have 2 instances where you use id=pagewrap
    <div id="pagewrap">
      <div id="left">
    and again here:
    <div id="pagewrap">
    <div id="right">
    An ID can only be used once per page.
    I'm assuming that the pagewrap rule is supposed to center all of your page corect?
    In that case, you need to remove both of the pagewrap divs
    and only insert one div and that encloses all of the content
    Like so:
    <body>
    <div id="pagewrap">
    <div id="topnav"><div id="menu-wrap">
    the rest of the code here
    then at the bottom of the page:
    </div> <!-- / pagewrap -->
    </body>
    </html>
    As for the top banner image, there is just too much banding on the actual body of the 'model',
    particularly on her backend. Did you try and over optimise the image to make
    the file size smaller possibly - but this has only degraded the image quality quite a lot by doing so.

  • Help needed with class accessing

    Hey, i have ran into another problem again.. The problem is accessing a class variable created in a different class from another class.
    Im reading an XML file with let's say
    class readXML(){
        Items item = new Items();
             //here im setting the variables.
        item.name = "something";
        item.level = "something else";
    class Items(){
        Vector<String> name = new Vector<String>();
        Vector<String> level = new Vector<String>();}And now a sepparate class what creates me an object of those variable with a loop.
    class makeTable(){
    //here i need to get the variables for the loop and to create object.
    readXML readXML = new readXML("test.xml");
    Object[][] data = new Object[3][24]; public void createObjects(){
    for (int j = 0; j < items.length; j++){
    data[j][0] = readXML.item.name.get(j); //<--- this does not work. But how can i do it?
    data[j][1] = exps[j];
    data[j][2] = levels[j];
    data[j][3] = getAmount(exps[j]);
    //System.out.println("itemname: " + data[j][0]);

    Ok, i explained it a bit wrong, ill copy the whole code.
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import java.io.*;
    import java.util.Vector;
    public class ReadItems extends DefaultHandler{
              ReadItems(String filename){
              File input = new File(filename);
              SAXParserFactory factory = SAXParserFactory.newInstance();
              factory.setValidating(true);
              try{
                   SAXParser sax = factory.newSAXParser();
                   sax.parse(input, new ItemHandler());
              }catch (ParserConfigurationException pce){
                   System.out.println("Could not create parser.");
                   System.out.println(pce.getMessage());
              }catch (SAXException se){
                   System.out.println("Problem with SAX parser.");
                   System.out.println(se.getMessage());
              }catch (IOException ie){
                   System.out.println("Error reading file.");
                   System.out.println(ie.getMessage());
    class ItemHandler extends DefaultHandler{     
         static int READING_NAME = 1;
         static int READING_LEVEL = 2;
         static int READING_EXPPER = 3;
         static int READING_NOTHING = 0;
         int currentActivity = READING_NOTHING;
         Item item = new Item();
         ItemHandler(){
              super();
         public void startElement(String uri, String localname, String qName, Attributes attributes){
              if(qName.equals("name")){
                   currentActivity = READING_NAME;
              }else if (qName.equals("level")){
                   currentActivity = READING_LEVEL;
              }else if (qName.equals("expper")){
                   currentActivity = READING_EXPPER;
         public void characters(char[] ch, int start, int length){
              String value = new String(ch,start,length);
              if (currentActivity == READING_NAME){
                   item.name.add(value);
              if (currentActivity == READING_LEVEL){               
                   item.level.add(value);
              if (currentActivity == READING_EXPPER){
                   item.expper.add(value);
         public void endElement(String uri, String localname, String qName){
              /*if(qName.equals("item")){
                   System.out.println("Name: " + item.name);               
              }else if(qName.equals("level")){
                   System.out.println("Level: " + item.level);
    class Item {
         Vector<String> name = new Vector<String>();
         Vector<String> level = new Vector<String>();
         Vector<String> expper = new Vector<String>();     
    }Now i need to access the data from another class where i build a swing table.
    It has a method:
    public void createObjects(){
              for (int j = 0; j < items.length; j++){
                        data[j][0] = these should be the values of that name variable;
                        data[j][1] = this should be expper and so on.;
                        System.out.println("itemname: " + ih.item.name.get(0));
         }Im a bit confused on this

  • Little help needed with SNR reset

    Hi, until june we had been getting 3/3.5meg line speed. After a line fault (noisey line out side) which we are told is fixed our speed droped to around 1.5megs.
    We have been waiting and waiting for the speed to return to normal but no such luck. So here I am asking for some help with the SNR which I assume is the problem.
    From reading other posts I understand you need the speed test and hub stats, so have included. Also using one of the old white hubs if thats anything u need to know.
    1. Best Effort Test:  -provides background information.
    Download  Speed
    1.34 Mbps
    0 Mbps
    2 Mbps
    Max Achievable Speed
     Download speedachieved during the test was - 1.34 Mbps
     For your connection, the acceptable range of speeds is 0.8 Mbps-2 Mbps.
     IP Profile for your line is - 1.44 Mbps
    2. Upstream Test:  -provides background information.
    Upload Speed
    0.22 Mbps
    0 Mbps
    0.45 Mbps
    Max Achievable Speed
    Upload speed achieved during the test was - 0.22Mbps
     Additional Information:
     Upstream Rate IP profile on your line is - 0.45 Mbps
    DSL Connection
    Link Information
    Uptime:
    3 days, 21:38:21
    Modulation:
    G.992.1 annex A
    Bandwidth (Up/Down) [kbps/kbps]:
    448 / 1,632
    Data Transferred (Sent/Received) [MB/GB]:
    353.88 / 5.56
    Output Power (Up/Down) [dBm]:
    12.5 / 17.0
    Line Attenuation (Up/Down) [dB]:
    31.5 / 59.0
    SN Margin (Up/Down) [dB]:
    15.0 / 15.5
    Vendor ID (Local/Remote):
    TMMB / IFTN
    Loss of Framing (Local/Remote):
    0 / 0
    Loss of Signal (Local/Remote):
    4 / 0
    Loss of Power (Local/Remote):
    0 / 0
    Loss of Link (Remote):
    0
    Error Seconds (Local/Remote):
    6 / 0
    FEC Errors (Up/Down):
    0 / 27,260
    CRC Errors (Up/Down):
    0 / 117
    HEC Errors (Up/Down):
    0 / 96
    Line Profile:
    Interleaved
    Solved!
    Go to Solution.

    Just this minute got an email from forum mod to infor he requested my SNR be reset to 6db.
    home hub rest itself a few seconds later.. new stats...
    DSL Connection
    Link Information
    Uptime:
    0 days, 0:00:27
    Modulation:
    G.992.1 annex A
    Bandwidth (Up/Down) [kbps/kbps]:
    448 / 2,976
    Data Transferred (Sent/Received) [KB/KB]:
    39.00 / 112.00
    Output Power (Up/Down) [dBm]:
    12.5 / 18.0
    Line Attenuation (Up/Down) [dB]:
    31.5 / 59.0
    SN Margin (Up/Down) [dB]:
    15.0 / 5.5
    Vendor ID (Local/Remote):
    TMMB / IFTN
    Loss of Framing (Local/Remote):
    0 / 0
    Loss of Signal (Local/Remote):
    7 / 0
    Loss of Power (Local/Remote):
    0 / 0
    Loss of Link (Remote):
    0
    Error Seconds (Local/Remote):
    12 / 0
    FEC Errors (Up/Down):
    0 / 0
    CRC Errors (Up/Down):
    0 / 151
    HEC Errors (Up/Down):
    0 / 45
    Line Profile:
    Fast

  • Newbie Help Needed: Data Binding

    Okay, lemme see if I can possibly explain this issue clearly
    enough... (The whole explanation of the object graph may very well
    be superfluous, so you can probably skip to the bottom.)
    I have a whole object graph that I've downloaded from my
    server to my Flex client. Here's the general gist of object
    relationships (and I have to lay it out this way because there's
    not really any way to sketch on a whiteboard the object graph):
    Object A is a parent of object B, and there is a one-to-many
    relationship between the two. That is, there is one A to many B's.
    There is a one-to-one relationship between Object B and
    Object C.
    There is a many-to-one relationship between Object C and
    Object D. That is, there are many C's to one D.
    There is a many-to-one relationship between Object D and
    Object E. That is, there are many D's to one E.
    There is a many-to-one relationship between Object E and
    Object F. That is, there are many E's to one F.
    Now, because I am only given information from the user as far
    as which object A is the chosen object (that is, I'm not told right
    off the bat which B's, C's, D's, E's, and F's to pull from the
    server), I have a series of events being fired and listened to, so
    the sequence of steps pretty much goes like this:
    User chooses a particular object A.
    I pull A from the server.
    I pull all of A's children (the B objects).
    I look at the keys stored in the B's and pull the
    corresponding C's.
    I look at the keys stored in the C's and pull their parents,
    the D's.
    I look at the keys stored in the D's and pull their parents,
    the E's.
    I look at the keys stored in the E's and pull their parents,
    the F's.
    Now, here's where I'm having an issue:
    The B objects store a Date object called startTime. The D
    objects store an integer called runTimeMillis (the runtime of the
    video, in milliseconds). I need to somehow present endTime, which
    is simply the sum of startTime + runTimeMillis. But I have to do it
    in a data binding because the D objects are downloaded later than
    the B objects. But I've tried so many different ways of coding it,
    and nothing seems to work. Here's where I'm at:
    <mx:DateFormatter id="hmmssaFormatter"
    formatString="L:NN:SSA"/>
    <mx:Label text="{hmmssaFormatter.format(B.startTime +
    B.C.D.runTimeMillis)}" fontWeight="bold"/>
    The only thing I get in my client is a blank label. What am I
    doing wrong? The following seems to work just fine in displaying
    the start time of the video:
    <mx:Label text="{hmmssaFormatter.format(B.startTime)}"
    fontWeight="bold"/>
    But adding a number of milliseconds doesn't seem to work at
    all. Can anyone shed some light on the matter? Thanks!

    "Noreaster76" <[email protected]> wrote in
    message
    news:[email protected]...
    > Okay, lemme see if I can possibly explain this issue
    clearly enough...
    > (The
    > whole explanation of the object graph may very well be
    superfluous, so you
    > can
    > probably skip to the bottom.)
    >
    > I have a whole object graph that I've downloaded from my
    server to my Flex
    > client. Here's the general gist of object relationships
    (and I have to
    > lay it
    > out this way because there's not really any way to
    sketch on a whiteboard
    > the
    > object graph):
    >
    > Object A is a parent of object B, and there is a
    one-to-many relationship
    > between the two. That is, there is one A to many B's.
    > There is a one-to-one relationship between Object B and
    Object C.
    > There is a many-to-one relationship between Object C and
    Object D. That
    > is,
    > there are many C's to one D.
    > There is a many-to-one relationship between Object D and
    Object E. That
    > is,
    > there are many D's to one E.
    > There is a many-to-one relationship between Object E and
    Object F. That
    > is,
    > there are many E's to one F.
    >
    > Now, because I am only given information from the user
    as far as which
    > object
    > A is the chosen object (that is, I'm not told right off
    the bat which B's,
    > C's,
    > D's, E's, and F's to pull from the server), I have a
    series of events
    > being
    > fired and listened to, so the sequence of steps pretty
    much goes like
    > this:
    >
    > User chooses a particular object A.
    > I pull A from the server.
    > I pull all of A's children (the B objects).
    > I look at the keys stored in the B's and pull the
    corresponding C's.
    > I look at the keys stored in the C's and pull their
    parents, the D's.
    > I look at the keys stored in the D's and pull their
    parents, the E's.
    > I look at the keys stored in the E's and pull their
    parents, the F's.
    >
    > Now, here's where I'm having an issue:
    > The B objects store a Date object called startTime. The
    D objects store an
    > integer called runTimeMillis (the runtime of the video,
    in milliseconds).
    > I
    > need to somehow present endTime, which is simply the sum
    of startTime +
    > runTimeMillis. But I have to do it in a data binding
    because the D
    > objects are
    > downloaded later than the B objects. But I've tried so
    many different
    > ways of
    > coding it, and nothing seems to work. Here's where I'm
    at:
    >
    > <mx:DateFormatter id="hmmssaFormatter"
    formatString="L:NN:SSA"/>
    > ...
    > <mx:Label text="{hmmssaFormatter.format(B.startTime +
    > B.C.D.runTimeMillis)}"
    > fontWeight="bold"/>
    >
    >
    > The only thing I get in my client is a blank label. What
    am I doing
    > wrong?
    > The following seems to work just fine in displaying the
    start time of the
    > video:
    >
    > <mx:Label
    text="{hmmssaFormatter.format(B.startTime)}" fontWeight="bold"/>
    >
    > But adding a number of milliseconds doesn't seem to work
    at all. Can
    > anyone
    > shed some light on the matter? Thanks!
    I still think there's something unexpected going on with your
    data. In the
    function where you set C and D, can you put a breakpoint and
    inspect the
    variables? You could also probably put a break point in the
    formatter and
    see shat has been passed in to it.
    HTH;
    Amy

  • Just a little help needed please!

    Hello all - My name is John, new poster here on the forums.
    I'm taking a Java class and I'm really really stuck - I took this 'TestScanner.java' right outta my text and it gives me an error when I compile it at cmd prompt; I checked and rechecked my coping from the text and it is correct. I polled 5 other people and for 2 of them it works when they compile yet all others it won't work.
    I'm running -
    Java version "1.6.0_07"
    Java SE Runtime Environment (Build 1.6.0_07-b06)
    Java Hotspot Client VM (build 10.0-b23, mixed mode, sharing)
    The Script i'm trying to run -
    import java.util.Scanner;
    public class TestScanner {
    public static void main(String args[]) {
    Scanner input = new Scanner(System.in);
    System.out.print("Enter an integer: ");
    int intValue = input.nextInt();
    System.out.println("You entered the integer " + intValue);
    System.out.print("Enter a double value: ");
    double doubleValue = input.nextDouble();
    System.out.println("You entered the double value " + doubleValue);
    System.out.print("Enter a string without space: ");
    String string = input.next();
    System.out.println("You entered the string " + string);
    When I run javac TestScanner.java I get 3 errors on the capital S in the lines -
    import java.util.Scanner;
    ^
    Scanner input = new Scanner(System.in);
    ^
    Scanner input = new Scanner(System.in);
    ^
    I'm really not sure what the deal is here and I really thank you for your help with this.
    - John

    I ran your code on this java version. It just ran perfect:
    java version "1.6.0_10-rc"
    Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28)
    Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
    I would suggest just remove all the code and just System.out.println("Test") then start adding the code one line at a time so you know where the problem is coming from..
    csr

  • SDTM Maintenance cycle - little help needed

    Hi all
    I am following the blogs of Dolores Correa (thank you for the blogs) and I have become a little stuck - I am hoping you can help me out.
    I have created an SDTM (test message) during my Test Phase.  In the blog there is a way to assign the project for the test phase (and therefore the MC) - I cannot find where to do this, how do I assign my test message to the correct maintenance cycle?
    Many thanks
    Marina

    Perhaps I am thinking this is more complicated than it is .... if I only have 1 maintenance cycle does the test message get automatically assigned to that maintenance cycle?  and only if I have multiple maintenance cycles do I have to assign  a cycle??
    I guess that there is also no way to have a test message associated with a particular change request - that would be helpful because then the developer would know what the test message is in relation to, but I can't see a way of connecting a SDTM to a SDMJ.
    Any ideas or musings are welcome

Maybe you are looking for