Need help with Data Structures!

I'm finally in Java 2nd year! I'm working on a problem- have been working for hours but cant seem to get the hang for it. Basically after determining that an integer is odd, and not more than 10- we are supposed to print it this way
    1
             333
          55555
       7777777
    999999999 This is what I've done so far!
public class Numbers {
           public  static int print (int x) {
         String [] L = new String [x.length];
       if (x <= 1) {
        return x;
        else if  (x >= 10 ||  x% 2 != 1)
         System.out.println("Number is greater than 10");
        else
        for (int i = 0;  i < L.length; i ++) {
        System.out.println(x);
        return print (x -2);
      now when I run this program my output is
9
9
9
9
9
9
9
9
7
7
7
7
7
7
7
and so on untill
1.
I cant figure out which approach to take next. Tips please!

it doesnt matter, I made it unrecursive, Ill just fix ur code up here:
public class Numbers
public  static int print (int x)
if (x <= 1)      
return x;       
else if  (x >= 10)                 
System.out.println("Number is greater than 10");
else if ( x% 2 != 1)    
System.out.println("Number is even"); 
else
int p = print(x-2);
for (int i = 0;  i < x; i ++)
System.out.print(x);       
System.out.println();           
return p;
}

Similar Messages

  • I need help with event structure. I am trying to feed the index of the array, the index can vary from 0 to 7. Based on the logic ouput of a comparison, the index buffer should increment ?

    I need help with event structure.
    I am trying to feed the index of the array, the index number can vary from 0 to 7.
    Based on the logic ouput of a comparison, the index buffer should increment
    or decrement every time the output of comparsion changes(event change). I guess I need to use event structure?
    (My event code doesn't execute when there is an  event at its input /comparator changes its boolean state.
    Anyone coded on similar lines? Any ideas appreciated.
    Thanks in advance!

    You don't need an Event Structure, a simple State Machine would be more appropriate.
    There are many examples of State Machines within this forum.
    RayR

  • Need Help with Dates

    I am printing a calendar and certain events will be helds on certain dates.
    One can edit the event if it has not passed the date. Events in the past can be viewed but not edited.
    When I query the database the date must be formatted dd-MMM-yy
    I am able to get today's date by doing this:
    java.util.Date today = new java.util.Date();
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    String today_str = sdf.format(today);
    My code for printing the calendar: I left out some of the table formatting in the JSP page.
    GregorianCalendar d = new GregorianCalendar();
    int today = d.get(Calendar.DAY_OF_MONTH);
    int month = d.get(Calendar.MONTH);
    d.set(Calendar.DAY_OF_MONTH,1);
    int weekday = d.get(Calendar.DAY_OF_WEEK);
    for(int i = Calendar.SUNDAY; i < weekday; i++)
    out.print("<td> </td>");
    do {
    int day = d.get(Calendar.DAY_OF_MONTH);
    out.print("<td>" + day + "</td>");
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    if(weekday == Calendar.SATURDAY)
    out.println("</tr><tr valign=top>");
    d.add(Calendar.DAY_OF_MONTH,1);
    weekday = d.get(Calendar.DAY_OF_WEEK);
    } while(d.get(Calendar.MONTH) == month);
    if(weekday != Calendar.SUNDAY)
    System.out.println();
    The part I need help on is this:
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    I'm looping through each day of the month to print the days. I have the month, day, year as integers. How can I create a date object out of that and compare it to today's date to test if it's before or after today???
    All the function in the Date class that I think would do this have been deprecated.

    Need Help with Dates
    Here is some information about dates:
    There are many edible palm fruits, and one of the most widespread and favored of these is the data (Phoenix dactylifera). Dates were cultivated in ancient land from Mesopotamia to prehistoric Egypt, possibly as early as 6000 B.C. Then--as now--dates were a staple for the natives of those dry regions. Much later, Arabs spread dates around northern Africa, and dates were introduced into California by the Spaniards in 1765, around Mission San Ignacio.
    The date prefers dry, hot climates, because date fruits are injured at temperatures of 20 degrees F, and the damp climate of the California coast was not favorable for fruit production. In the mid-1800s, the date industry developed in California's hot interior valleys and in Arizona. Now the date industry in the United States is localized mostly in the Coachella Valley, where the sandy soils permit the plants to be deeply irrigated. Today the new varieties, mostly introduced in this century, produce about 40 million pounds of dates per annum, or over 60% of the dates consumed in this country. The rest are imported mainly from Persia. According to one survey, about one million people are engaged entirely in date palm cultivation worldwide.
    Hope that helps.

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Need help with XML structure

    Hello, I would like to create an extention that will help to
    manage a
    glossary.
    First I need to decide on the structure of the xml document
    that will
    contain all glossary entries. Since I don't have much
    experience with XML in
    extention content, I was wondering if there are certain
    recommendations I
    should follow.
    What is preferable: using attributes that will holt the
    content or rather
    having xml-elements. What is easy to parce?
    I would greatly appreciate any tips, help and suggestions.
    Olyalyu

    .oO(olga)
    >First I need to decide on the structure of the xml
    document that will
    >contain all glossary entries. Since I don't have much
    experience with XML in
    >extention content, I was wondering if there are certain
    recommendations I
    >should follow.
    I would start as simple as possible, for example with
    something like
    this:
    <glossary>
    <entry>
    <term>...</term>
    <explanation>...</explanation>
    </entry>
    <entry>
    <term>...</term>
    <explanation>...</explanation>
    </entry>
    </glossary>
    Of course it also depends on what you want to do with this
    structure and
    if you need additional informations.
    >What is preferable: using attributes that will holt the
    content or rather
    >having xml-elements. What is easy to parce?
    There's no real rule-of-thumb whether to use elements or
    attributes.
    If unsure, use elements.
    Micha

  • Need help with date range searches for Table Sources in SES

    Hi all,
    I need help, please. I am trying to satisfy a Level 1 client requirement for the ability to search for records in crawled table sources by a date and/or date range. I have performed the following steps, and did not get accurate results from Advanced searching for date. Please help me understand what I am doing wrong, and/or if there is a way to define a date search attribute without creating a LOV for a date column. (My tables have 500,00 rows.)
    I am using SES 10.1.8.3 on Windows 32.
    My Oracle 10g Spatial Table is called REPORTS and this table has the following columns:
    TRACKNUM Varchar2
    TITLE Varchar2
    SUMMARY CLOB
    SYMBOLCODE Varchar2
    Timestamp Date
    OBSDATE Date
    GEOM SDO_GEOMETRY
    I set up the REPORTS table source in SES, using TRACKNUM as the Primary Key (unique and not null), and SUMMARY as the CONTENT Column. In the Table Column Mappings I defined TITLE as String and TITLE.
    Under Global Settings > Search Attributes I defined a new Search Attribute (type Date) called DATE OCCURRED (DD-MON-YY).
    Went back to REPORTS source previously defined and added a new Table Column Mapping - mapping OBSDATE to the newly defined DATE OCCURRED (DD-MON-YY) search attribute.
    I then modified the Schedule for the REPORTS source Crawler Policy to “Process All Documents”.
    Schedule crawls and indexes entire REPORTS table.
    In SES Advanced Search page, I enter my search keyword, select Specific Source Group as REPORTS, select All Match, and used the pick list to select the DATE OCCURRED (DD-MON-YY) Attribute Name, operator of Greater than equal, and entered the Value 01-JAN-07. Then the second attribute name of DATE_OCCURRED (DD-MON-YY), less than equals, 10-JAN-07.
    Search results gave me 38,000 documents, and the first 25 I looked at had dates NOT within the 01-JAN-07 / 10-JAN-07 range. (e.g. OBSDATE= 10-MAR-07, 22-SEP-07, 02-FEB-08, etc.)
    And, none of the results I opened had ANY dates within the SUMMARY CLOB…in case that’s what was being found in the search.
    Can someone help me figure out how to allow my client to search for specific dated records in a db table using a single column for the date? This is a major requirement and they are anxiously awaiting my solution.
    Thanks very much, in advance….

    raford,
    Thanks very much for your reply. However, from what I've read in the SES Admin Document is that (I think) the date format DD/MM/YYYY pertains only to searches on "file system" sources (e.g. Word, Excel, Powerpoint, PDF, etc.). We have 3 file system sources among our 25 total sources. The remaining 22 sources are all TABLE or DATABASE sources. The DBA here has done a great job getting the data standardized using the typical/default Oracle DATE type format in our TABLE sources (DD-MON-YY). Our tables have anywhere from 1500 rows to 2 million rows.
    I tested your theory that the dates we are entering are being changed to Strings behind the scenes and on the Advanced Page, searched for results using OBSDATE equals 01/02/2007 in an attempt to find data that I know for certain to be in the mapped OBSDATE table column as 01-FEB-07. My result set contained data that had an OBSDATE of 03-MAR-07 and none containing 01-FEB-07.
    Here is the big issue...in order for my client to fulfill his primary mission, one of the top 5 requirements is that he/she be able to find specific table rows that are contain a specific date or range of dates.
    thanks very much!

  • Help With Data Structures (Singly Linked Lists)

    Need help inserting user entered name alphabetically into SSL
    import java.util.Scanner;
    class SLLNode<T> {
        public T info;
        public SLLNode<T> next;
        public SLLNode() {
            next = null;
        public SLLNode(T el) {
            info = el; next = null;
        public SLLNode(T el, SLLNode<T> ptr) {
            info = el; next = ptr;
    class SLL<T> {
        protected SLLNode<T> head, tail;
        public SLL() {
            head = tail = null;
        public boolean isEmpty() {
            return head == null;
        public void addToHead(T el) {
            head = new SLLNode<T>(el,head);
            if (tail == null)
                tail = head;
        public void addToTail(T el) {
            if (!isEmpty()) {
                tail.next = new SLLNode<T>(el);
                tail = tail.next;
            else head = tail = new SLLNode<T>(el);
        public T deleteFromHead() {
            if (isEmpty())
                 return null;
            T el = head.info;
            if (head == tail)      
                 head = tail = null;
            else head = head.next;
            return el;
        public T deleteFromTail() {
            if (isEmpty())
                 return null;
            T el = tail.info;
            if (head == tail)     
                 head = tail = null;
            else {                 
                 SLLNode<T> tmp;   
                 for (tmp = head; tmp.next != tail; tmp = tmp.next);
                 tail = tmp;       
                 tail.next = null;
            return el;
        public void delete(T el) { 
            if (!isEmpty())
                if (head == tail && el.equals(head.info))
                     head = tail = null;     
                else if (el.equals(head.info))
                     head = head.next;   
                else {                   
                     SLLNode<T> pred, tmp;
                     for (pred = head, tmp = head.next;
                          tmp != null && !tmp.info.equals(el);
                          pred = pred.next, tmp = tmp.next);
                     if (tmp != null) {  
                         pred.next = tmp.next;
                         if (tmp == tail)
                            tail = pred;
        public void printAll() {
            for (SLLNode<T> tmp = head; tmp != null; tmp = tmp.next)
                System.out.print(tmp.info + " ");
        public boolean isInList(T el) {
            SLLNode<T> tmp;
            for (tmp = head; tmp != null && !tmp.info.equals(el); tmp = tmp.next);
            return tmp != null;
    class Passengers extends SLL<String>{
         Scanner kb = new Scanner (System.in);
         String name;
         Passengers(){
         void reserveTicket(){
              SLLNode<String> temp;
              System.out.println("Please enter your Last Name");
              name = kb.next();
              if(isEmpty())
                   addToHead(name);
              else
                   if(name.compareTo(head.info) <= 0)
                        addToHead(name);
                   else
                        if(name.compareTo(head.info) > 0){
                             while(head.next == null){
                                  temp = head.next;
                                  name.compareTo(temp.info);
                                       if(name.compareTo(temp.info) <= 0)
                                            temp.info = name;
         void cancelReserve(){
              System.out.println("Please enter your Last Name");
              name = kb.next();
              if(isInList(name)){
                   delete(name);
                   System.out.println("Your reservation has safely been removed");
              else System.out.println("That reservation does not exist");
         void checkReserve(){
              System.out.println("Please enter your Last Name");
              name = kb.next();
              if(isInList(name)){
                   System.out.println("You currently have a reservation for this flight");
                   printAll();
              else System.out.println("Sorry, there is no reservation for this flight under that name");
         void showPassengers(){
              if(! isEmpty())
                   printAll();
              else System.out.println("There are no passengers for this flight");
    class Program2_19{
         public static void main(String[] a) {
              Passengers passList = new Passengers();
              Scanner kb = new Scanner (System.in);
              int choice;
              int option = 1;
              while(option == 1){
                   System.out.println("Push 1 to Reserve a ticket");
                   System.out.println("Push 2 to Cancel a reservation");
                   System.out.println("Push 3 to Check reservations");
                   System.out.println("Push 4 to Display all passengers");
                   choice = kb.nextInt();
                   System.out.println();
                   if(choice == 1)
                        passList.reserveTicket();
                   else if(choice == 2)
                        passList.cancelReserve();
                   else if(choice == 3)
                        passList.checkReserve();
                   else
                        passList.showPassengers();
              System.out.println("Would you like to perform another action?");
              System.out.println("Press 1 for yes, or 2 for no");
              option = kb.nextInt();
              System.out.println();
    }

    how do i step thru my list to find the correct spot to insert the name...I kno it has to be done with compareTo() but what do i compare the name with?..the node?.. the head? the tail?

  • Need help with case structures- please help :)

    Hey all.
    I'm currently trying to program a infrared furnace. I'm setting a temperature, subtracted my set temperature from the actual temperature (thermocouple hooked up to SCB-68), and voltage is being sent to the controller of the furnace accordingly. However, I need to hold the set temperature for a certain amount of time. I need help programming this: when the VI reads the set temperature from the thermocouple, it results in a timer running down. When the timer runs down to 0, the While Loop ends. I'm thinking case structures is most appropriate, but if you have a better suggestion, please let me know.
    Thanks

    You should probably implement a state machine.
    The state machine would keep track of the temperature and making ajustments on a timely basis.
    There is a template of a state machine is you select under the File menu > New > From Template.
    You can also look under Help > Find Example > and do a search for state machine.
    There are lots of state machine examples on this forum, some of which may be quite useful.
    RayR

  • Need help with date and time calculations please

    Hello there.. Im stuck, and im hoping someone can help..
    Working on a list to manage and track PTO.  User completes PTO request form,
    Fields
    Name
    Start Date (with time)
    End Date (with time)
    Total Number of Days/hours requested: (calculation)
    Full Day: (Yes/No)
    ok business need
    user has the ability to request a certain number of hours as opposed to a full day.
    After searching around on google. I found this calculation to help me figure out how many BUSINESS days being requested.
    =IF(ISERROR(DATEDIF([Start Date],[End Date],"d")),"",(DATEDIF([Start Date],[End Date],"d"))+1-INT(DATEDIF([Start Date],[End Date],"d")/7)*2-IF((WEEKDAY([End Date])-WEEKDAY([Start Date]))<0,2,0)-IF(OR(AND(WEEKDAY([End
    Date])=7,WEEKDAY([Start Date])=7),AND(WEEKDAY([End Date])=1,WEEKDAY([Start Date])=1)),1,0)-IF(AND(WEEKDAY([Start Date])=1,(WEEKDAY([End Date])-WEEKDAY([Start Date]))>0),1,0)-IF(AND(NOT(WEEKDAY([Start Date])=7),WEEKDAY([End Date])=7),1,0))
    This works great as long as its a [Full Day]="YES", displays results in column labeled Number of days
    now if [Full Day]="No", displays results in column labeled Number of Hours
    BUT this is my issue (well part of it) it calcuate the correct number of hours.. but puts a "1" in "Number of Days" why.. dates have not changed.. I think Its something with the above calculation but I could be way off.
    the end result is I need number of days to concat with number of hours 
    i.e 1 full day 4 hours  1.4
        0 full day 5 hours  0.5
        1 full day 0 hours  1.0
    so that the total can be deducted via workflow.. from the remaining balance in a tracker. (seperate list) 
    Any angels out there??

    Posnera-
    Try changing time zones and see if the travel itinerary times change.
    Fred

  • Need help with Data Model for Private Messaging

    Sad to say, but it looks like I just really screwed up the design of my Private Messaging (PM) module...  *sigh*
    What looked good on paper doesn't seem to be practical in application.
    I am hoping some of you Oracle gurus can help me come up with a better design!!
    Here is my current design...
    member -||-----0<- private_msg_recipient ->0------||- private_msg
    MEMBER table
    - id
    - email
    - username
    - first_name
    PRIVATE_MSG_RECIPIENT table
    - id
    - member_id_to
    - message_id
    - flag
    - created_on
    - updated_on
    - read_on
    - deleted_on
    - purged_on
    PRIVATE_MSG table
    - id
    - member_id_from
    - subject
    - body
    - flag
    - sent_on
    - updated_on
    - sender_deleted_on
    - sender_purged_on
    ***Short explanation of how the application currently works...
    - Sender creates a PM and sends it to a Recipient.
    - The PM appears in the Sender's "Sent" folder in my website
    - The PM also appears in the Recipient's "Incoming" folder.
    - If the Recipient deletes the PM, I set "deleted_on" and my code moves the PM from Recipient's "Inbox" to the "Trash" folder.  (Record doesn't actually move!)
    - If the Recipient "permanently deletes" the PM from his/her "Trash", I set "purged_on" and my code removes the PM from the Recipient's Message Center.  (Record still in database!)
    - If the Sender deletes the PM, I set "sender_deleted_on" and my code moves the PM from the Sender's "Sent" folder to the "Trash" folder.  (Record doesn't actually move!)
    - If the Recipient "permanently deletes" the PM from his/her "Trash", I set "sender_purged_on" and my code removes the PM from the Sender's Message Center.  (Record still in database!)
    Here are my problems...
    1.) I can't store PM's forever.
    2.) Because of my design, the Sender really owns the PM, and if I add code to REMOVE the PM from the database once it has a "sender_purged_on" value, then that would in essence remove the PM from the Recipient's Inbox as well!!
    In order to remove a PM from the database, I would have to make sure that *both* the Recipient has "purged_on" value and the Sender has a "sender_purged_on" value.  (Lot's of Application Logic for something which should be simple?!)
    I am wondering if I need to change my Data Model to something that allows my autonomy when it comes to the Sender and/or the Recipient deleting the PM for good...
    One the other hand, I believe I did a good job or normalizing the data.  And my current Data Model is the most efficient when it comes to saving storage space and not having dups.
    Maybe I do indeed just need need to write application logic - or a cron job - which checks to make sure that *both* the Sender an Recipient have deleted the PM before it actually flushes it out of my database to free up space?!
    Of course, if one party sits on their PM's forever, then I can never clear things out of my database to free up space...
    What should I do??
    Some expert advice would be welcome!!
    Sincerely,
    Debbie

    rp0428,
    I think I am starting to see my evil ways and where I went wrong... 
    > Unfortunately his design is just as denormalized as yours
    I see that now.  My bad!!
    > the last two columns have NOTHING to do with the message itself so do NOT belong in a normalized table.
    > And his design:
    >
    > Same comment - those last two columns also have NOTHING to do with the message itself.
    Right.
    > The message table should just have columns directly related to the message. It is a list of unique messages: no more, no less.
    Right.
    > Mark gave you hints to the proper normalized design using an INTERSECT table.
    > that table might list: sender, recipient, sender_delete_flag, recipient_delete_flag.
    > As mark suggested you could also have one or two DATEs related to when the delete flags were set. I would just make the columns DATE fields.
    >
    > Once both date columns have a value you can delete the message (or delete all messages older than 30+ days).
    >
    > When both flags are set you can delete the message itself that references the sender and the message sent.
    Okay, how does this revised design look...
    MEMBER --||-----0<-- PM_DISTRIBUTION -->0-------||-- PRIVATE_MSG
    MEMBER table
    - id
    - email
    - username
    - first_name
    and so on...
    PM_DISTRIBUTION table (Maybe you can think of a better name??)
    - id
    - private_msg_id
    - sender_id
    - recipient_id
    - sender_flag
    - sender_deleted_on
    - sender_purged_on
    - recipient_flag
    - recipient_read_on
    - recipient_deleted_on
    - recipient_purged_on
    PRIVATE_MSG
    - id
    - subject
    - body
    - sent_on
    Is that what you were describing to me?
    Quickly reflecting on this new design...
    1.) It should now be in 3rd Normal Form, right?
    2.) It should allow the Sender and Recipient to freely and independently "delete" or "purge" a PM with no impact on the other party, right?
    Here are a few Potential Issues that I see, though...
    a.) What is to stop there from being TWO SENDERS of a PM?
    In retrospect, that is why I originally stuck "member_id_from" in the PRIVATE_MSG table!!  The logic being, that a PM only ever has *one* Sender.
    I guess I would have to add either Application Logic, or Database Logic, or both to ensure that a given PM never has more than one Sender, right?
    b.) If the design above is what you were hinting at, and if it is thus "correct", then is there any conflict with my Business Rule: "Any given User shall only be allowed 100 Messages between his/her Incoming, Sent and Trash folders."
    Because the Sender is no longer "tightly bound" to the PRIVATE_MSG, in my scenario above...
    Debbie could send 100 PM's, hit her quota, then turn around and delete and purge all 100 Sent PM's and that should in no way impact the 100 PM's sitting in other Users' Inboxes, right??
    I think this works like I want...
    Sincerely,
    Debbie

  • Need help with dates  please-urgent

    Hi folks, please help me with this if you can.
    I run a weekly job, and need to have my java code create and use 2 dates to capture data for the whole week.
    begin_date mm/dd/yyyy (String) to be 7 days prior to current date
    end_date mm/dd/yyyy (String) to be the currecnt date
    Note: please take into account the cases where the CURRENT_DATE is the first week of the month. As a result the 7 days prior will fall into the previous month. i.e if end_date="06/04/2003" then the begin_date will be "05/29/2003 Thanks a bunch

    http://java.sun.com/j2se/1.4.1/docs/api/index.html
    See the Calendar and DateFormat classes.

  • Need help with data grid...

    I have setup a profile card which displays information about individuals by pulling data from an XML database.
    I have multiple text fields and couple movie clips that display images but i need a datagrid to display stats for each individual.
    The stat information is set as attributes on a array of XML nodes each node is a year.
    Example XML
    <hockey>
         <profile>
              <name>Wayne Gretzky</name>
              <image>pic1</image>
              <dob>Jan 26, 1961</dob>
              <position>Centre</position>
              <height>6'0"</height>
              <weight>185lbs</weight>
              <history>"important information"</history>
              <medal_record>
                        <medal standing ="Silver" Event =" 1981 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Gold" Event =" 1984 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Gold" Event =" 1987 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Gold" Event =" 1991 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Silver" Event =" 1996 World Cup of Hockey" sport="Ice Hockey"/>
              </medal_record>
         </profile>
         <profile>
              <name>Wayne Gretzky2</name>
              <image>pic2</image>
              <dob>Jan 26, 1962</dob>
              <position>Right Wing</position>
              <height>6'1"</height>
              <weight>205lbs</weight>
              <history>"important information"</history>
              <medal_record>
                        <medal standing ="Gold" Event =" 1981 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Bronze" Event =" 1984 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Silver" Event =" 1987 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Silver" Event =" 1991 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Gold" Event =" 1996 World Cup of Hockey" sport="Ice Hockey"/>
              </medal_record>
         </profile>
    </hockey>
    The red information is what i need to get displayed by the Data Grid for each profile.
    Standing
    Event
    Sport
    Gold
    1981 Canada Cup
    Ice Hockey
    Bronze
    1984 Canada Cup
    Ice Hockey
    The swf has buttons to cycle through the profiles which loads the new information from the XML.
    If you have a good understanding of how the dataGRIDs work please let me know if you can help as this is the last problem holding me from finishing this.
    Thanks in advance.

    Update... I got the data pulling in but it doesnt change as the profile changes with the rest of the data.

  • Need help with date format mask

    Hi there, right now I'm trying to set a default date format mask constraint for one of the attributes for my table. I want to set the default mask constraint as MM/DD/YY but I don't know how to. it should be something like:
    CREATE TABLE work (WorkDate DATE CHECK (WorkDate = 'MM/DD/YY'))
    or something like that, but I don't think that's correct. Can anyone help me? Thanks in advance.

    What you want (and should have done) is to read the documentation, starting with the concepts:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#CNCPT413
    http://www.oracle.com/pls/db102/search?remark=quick_search&word=date&tab_id=&format=ranked
    A date is stored as, well, a date, format masks only come into play when you're selecting/retrieving a date or when you want to store a string as a date. Default date formats can be set through NLS_DATE_FORMAT at session and database level.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams122.htm#REFRN10119
    Documentation homes (from which you can do a simple quick search):
    http://www.oracle.com/pls/db102/homepage
    http://www.oracle.com/pls/db112/homepage
    Bottom line:
    Trying to set a default date format mask on a date datatype column makes no sense...

  • NEED HELP with *.dat files.

    How can I create a *.dat file with text in it?
    And then how can I read what is in it?
    This is kind a urgent so I would appreciate any help..
    Thanx in advance...

    I'm sure there will be others with more knowledge of such things...
    ...but one way would be to use RandomAccessReadWriter()
    HTH
    Poot

  • Going to Mexico............need help with data

    I am going on a cruise and we stop in Cozumel.I am meeting up with friends who will be there the same time.Rather than call,we'll just text........
    I am not sure about what comes on when I turn the phone on........I am afraid I will start getting all sorts of automatic updates on my apps.
    Is there something I can do,just so I can text and not get anything else???
    Also,I know I can take pics without any charges,but if I send them to something like FB,I would be charged,right??
    Sorry to sound so dumb,but guess I am when it comes to stuff like this.
    I have a Motorola Droid RAZR...

    I'm not sure if the Droid Razr is unlocked or you have to call Verizon to have it unlocked. Regardless, the cheapest for you would be to have it unlocked, if needed, so you can use a local SIM card. Problem with that would be you would have to get your local # to your friend in order to text back and forth. If you could get an international SIM prior to going, you could then get your number to your friend before leaving for Mexico, though. A good place to look for one might be Amazon.
    Otherwise, you can enable your phone for global service thru Verizon. You can see the rates HERE. $0.99/minute for calling, $25/100MB data charge and $0.50/text sent and $0.05/text received.

Maybe you are looking for