About Date object

hi all
I want to add an int object in the date object and wants to return date object
I want to calculate the finishdate using startingdate and no.of days field which i am inputing from the user
please help
if anybody can

hi all
finally i got the solution of my problem
it is like below
int nd=Integer.parseInt(request.getParameter("days"));
          java.util.Date newfdate= new java.util.Date(sy,sm,sd);
          int nd1=nd*24*60*60*1000;
          long nd2=newfdate.getTime();
          long nd3=nd1+nd2;
          //out.println(nd3);
          java.util.Date fdate= new java.util.Date(nd3);
          int finald=fdate.getDate();
          int finalm=fdate.getMonth();
          int finaly=fdate.getYear();
          java.util.Date finishdate= new java.util.Date(finaly,finalm,finald);
          int fnsd=finishdate.getDate();
          int fnsm=finishdate.getMonth();
          int fnsy=finishdate.getYear();

Similar Messages

  • About data object

    Hello everyone,
    I'm somewhat new to flex. I've this doubt since many days.
    I've seen this
    for eg: DataGridColumn dataField="{data.something}"
    in many places. what is data here ?? It's not defined anywhere. Is it some default which points to source of the data.
    Please clarify.
    I also tried this.
    <mx:DataGrid dataProvider="{myXML.books}">
    <columns>
         <mx:DataGridColumn dataField="{data.book}"/>
    </columns>
    </mx:DataGrid>
    but this doesn't work as expected. (Assuming I've this XML <books><book>hello</book><book>wow</book></books>)
    Please help
    Thanks,
    Manish

    I think you may have seen something like this:
    <mx:DataGridColumn
        dataField="image" headerText="Image"
            width="150">
            <mx:itemRenderer>
                <mx:Component>
                            <mx:VBox
                                width="100%" height="140"
                                horizontalAlign="center" verticalAlign="middle">
                                    <mx:Image source="{'assets/'+data.image}"/>
                                    <mx:Label text="{data.image}" />
                            </mx:VBox>
                    </mx:Component>
            </mx:itemRenderer>
    </mx:DataGridColumn>
    In this case 'data' is a property of the item renderer. In order to be used as an item renderer, a component must expose a 'data' property.
    The 'data' property is populated with the relevant item from the dataProvider.
    The dataField property tells a column what property of a dataProvider item to display. So dataField="data" would tell the column to display the data property of the item. If your items don't have a "data" property then nothing will be displayed.
    This link may be helpful:
    http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/

  • What about SDO - service data objects?

    Does Oracle have an implementation of Service Data Objects?
    http://www.osoa.org/display/Main/Service+Data+Objects+Home
    I cant find any reference about this only about SCA.

    this post is from 2007 maybe soa suite 11g weblogic based can be SDO right?

  • Need help about Financials Operating Unit Level Setup data object transforming

    Hi All,
    We met some issues while using iSetup to create new OU from existing one via 'Financials Operating Unit Level Setup’ template and need your help.
    We can perform Extracting successfully, but when we’re tring to proceed Transform, it seems iSetup can’t meet our expectation.
    Firstly, after succesful creation of the Transform for 'Financials Operating Unit Level Setup’.
    We clicked the transform icon and it led us to the Details page.
    However, we can’t search out any result on that page, is it a bug?
    If we didn’t performed ‘Transform All’, then there’s no row shows on Transform Details page so we can't make any transform, as below:
    But after performing a ‘Transform All’ task, revisite the Details page and unfreeze, Operating Units and Inventory Organizations became transformable, as shown in below screenshots.
    Secondly, we found the transformable data objects are so limited, even the whole Payable Options and Finacial Options doesn’t support, as well as the Operating Unit short code.
    Is there any documents indicating which data objects are transform supported? Or if there’s any sql query for it?
    Will be very appreciated if anyone can help.
    Regards,
    Genghua Guo

    Hi,
    According to your description, my understanding is that machines failed to ping the server name, and successfully to ping its IP address.
    First check to see if DNS related port 53 is opened on the DC, or disable any anti-various software temporally, then ping the DC’s
    FQDN and confirm that if the name would be resolved.
    >The host 7acf7675-12f6-4280-84ff-ca225bc99373._msdcs.REGENCYVILLAGE.LOCAL could not be resolved to an IP address.
    You domain name is REGENCYVILLAGE.LOCAL. It seems that the DNS server failed to resolve your DC’s name. check the zone named REGENCYVILLAGE.LOCAL to see if an A record is corresponding to your DC.
    >75.75.75.75 (<name unavailable>) [Invalid], 75.75.76.76 (<name unavailable>) [Invalid]
    It seems that invalid IP address of DNS server on the TCP/IP properties of DC. 
    I want to confirm with you that if you have installed the DNS with installing AD DS. Just the DC’s name can’t be resolved? Or any other device also has the same question?
    =======
    You may use AD DS Best Practices Analyzer (BPA), which is a server management tool that can help you implement best practices in the configuration of your Active Directory environment. Detailed information reference:
    https://technet.microsoft.com/en-us/library/dd391875(v=ws.10).aspx
    besides, suggestion about Active Directory Best practices, just for you reference:
    https://technet.microsoft.com/en-us/library/cc778219%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Eve Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Question about performance (entities & data object)

    Hello:
    I know that this can be, maybe, a silly question, but I've got the doubt
    I get a local reference to a entity ( myEntityLocal ) and I'm going to get many values from it.
    For example
    myEntityLocal.getId();
    myEntityLocal getName();
    myEntityLocal.getAddr();
    etc etc
    My question is
    Would be better, in performance terms, to fill all fields into a data object myEntityData ) and retrieve them from it ?
    I mean
    myEntityData = myEntityLocal.getData() // where getData() calls getter methods on myEntityLocal
    myEntityData.getId();
    myEntityData.getName();
    myEntityData.getAddr();
    I think the result is the same because is a local reference, but I've got that doubt
    Thanks and regards

    This will be san=me if you are considering the Local interfaces.
    For remote interface(like accessing EJB from Servlets resides in diffferent Apps Server) use the DTO(data Transfer Object) patterns.
    Regards
    Sushil

  • I made a new Date object

    See, here's the thing with dates in java, the way i see it. We used to have Date, but Date wasn't international so we got Calendar. But some things, like SimpleDateFormat, still expect java.util.Date. java.sql.Date is out there somewhere, too. None of them have direct support for date differences (i.e. dateA - dateB = 8 days, or whatever). Now you're probably reading this thinking "Java supports all of this" and you're right. Calendar has a getTime method that returns a Date, and i can just pass THAT to SimpleDateFormat. With a little math, getTimeInMillis can be used to find the difference in two Calendars. But i got to thinking, "There should only be one Date object i need to think about," and since i don't ever have enough to do at work i put one together. I don't know if any of you are going to care enough to use it, mostly i'm just looking for advice on features i should add to it, inefficiencies in the design, stuff that's hard to understand, or whatever.
    This is it:
    *This catastrophe brought to you by SrA Meyerin.
    *Proximo Satis pro administatio.
    package awesomedate;
    //The following are imported for the toFormattedString(), toUtilDate(), toSQLDate, and toCalendar() methods, respectively.
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.GregorianCalendar;
    import java.sql.*;
    import java.util.TimeZone;
    *This class is designed to be the ultimate date object. It stores dates accurate to the millisecond, has the ability to do date
    *arithmetic (adding/subtracting days/months/whatever), date comparison, and date formatting. Also it can, at will, be used as any
    *of the other date objects in the standard java API.
    public class AwesomeDate
         *Milliseconds from the epoch. This field is where everything starts.
        private long millis;
         * The current year. This is the only aspect of the current date that is stored in addition to the milliseconds. Everything else
         * is calculated as needed.
        private int year;
        //The following six variables are fairly self explanatory. I'll explain them anyway.
         *Milliseconds in one non-leap year. This can be passed to the "adjustDate()" method
         * but mostly it is used to make my code more readable.
        public final static long MILLIS_IN_YEAR = 31536000000L;
         *Milliseconds in one leap year. This can be passed to the "adjustDate()" method
         * but mostly it is used to make my code more readable.
        public static final long MILLIS_IN_LEAP_YEAR = 31622400000L;
         *Milliseconds in one day. This can be passed to the "adjustDate()" method
         * but mostly it is used to make my code more readable.
        public static final long MILLIS_IN_DAY = 86400000;
         *Milliseconds in one hour. This can be passed to the "adjustDate()" method
         * but mostly it is used to make my code more readable.
        public static final long MILLIS_IN_HOUR = 3600000;
         *Milliseconds in one minute. This can be passed to the "adjustDate()" method
         * but mostly it is used to make my code more readable.
        public static final long MILLIS_IN_MINUTE = 60000;
         *Milliseconds in one second. This can be passed to the "adjustDate()" method
         * but mostly it is used to make my code more readable.
        public static final long MILLIS_IN_SECOND = 1000;
         *The number of days in each month.
        private int[] daysInMonth = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
         *The timezone offset. GMT is 0, and the default, however, CST (where i live), is -6.
        private int timeZoneOffset = -6;
         *As the name would indicate, this is the number of milliseconds beyond 00:00 of jan 1 of the current year.
        private long millisAfterYear;
         *Basic constructor. Defaults to the current date and time. Works on Greenwich Mean Time, so it may seem off. To avoid this, multiply
         *add your time zone offset * MILLIS_IN_HOUR to the time in milliseconds.
        public AwesomeDate()
            setTimeInMillis(System.currentTimeMillis());
         *Fairly simple constructor. Sets time to the the number of milliseconds passed past the epoch.
        public AwesomeDate(long millis)
            setTimeInMillis(millis);
         *This constructor sets the date to the year/month/day passed.
        public AwesomeDate(int year, int month, int day)
            setDate(year, month, day);
         *This constructor sets the date time to the year/month/day/minute/hour/second passed.
        public AwesomeDate(int year, int month, int day, int hour, int minute, int second)
            setDate(year, month, day, hour, minute, second);
         *When you have the number of milliseconds, the first thing you must calculate is year. Because the number of milliseconds in a
         *year may vary, this is also the most difficult to calculate. This is the method that does it, though.
        private void setYearAfter1970()
            //I don't want to alter the actual number of milliseconds, so i make this variable and perform calculations on it.
            long theseMillis = this.millis;
            //Start at 1970 (the epoch) and work from there.
            year = 1970;
            long nextYear = MILLIS_IN_YEAR;
            //In this loop i subtract the number of millis in whatever year. The condition is if i have enough millis to make it through
                //another year.
            while (theseMillis >= nextYear)
                if (isLeapYear(year))
                    theseMillis = theseMillis - MILLIS_IN_LEAP_YEAR;
                    nextYear = MILLIS_IN_YEAR;
                else
                    theseMillis = theseMillis - MILLIS_IN_YEAR;
                    if (isLeapYear(year + 1))
                        nextYear = MILLIS_IN_LEAP_YEAR;
                year++;
            millisAfterYear = theseMillis;
            this.year = year;
         *Calculating the year from before 1970 must be done differently. It's pretty much just inverted.
        private void setYearBefore1970()
            long theseMillis = this.millis;
            year = 1970;
            long nextYear = MILLIS_IN_YEAR;
            while (theseMillis <= 0)
                if (isLeapYear(year))
                    theseMillis = theseMillis + MILLIS_IN_LEAP_YEAR;
                    nextYear = MILLIS_IN_YEAR;
                else
                    theseMillis = theseMillis + MILLIS_IN_YEAR;
                    if (isLeapYear(year - 1))
                        nextYear = MILLIS_IN_LEAP_YEAR;
                year--;
            millisAfterYear = theseMillis * -1;
            this.year = year;
         *Just what it sounds like. Pass it the number of milliseconds past the epoch and it will calculate the date based on that.
        public void setTimeInMillis(long millis)
            this.millis = millis;
            if (millis >= 0)
                setYearAfter1970();
            else
                setYearBefore1970();
         *Returns the number of milliseconds from the epoch.
        public long getTimeInMillis()
            return this.millis;
         *Returns the current year.
        public int getYear()
            return this.year;
         *Sets the date to 00:00 of Jan 1 of the passed year.
        public void setYear(int year)
            this.year = year;
            long theseMillis = 0;
            if (year > 1970)
                //Kind of like setYearAfter1970 method, except it's adding instead of subtracting. So actually it's the opposite.
                for (int cntr = 1970; cntr < this.year; cntr++)
                    if (isLeapYear(cntr))
                        theseMillis = theseMillis + MILLIS_IN_LEAP_YEAR;
                    else
                        theseMillis = theseMillis + MILLIS_IN_YEAR;
            else
                for (int cntr = 1970; cntr > this.year; cntr--)
                    if (isLeapYear(cntr))
                        theseMillis = theseMillis - MILLIS_IN_LEAP_YEAR;
                    else
                        theseMillis = theseMillis - MILLIS_IN_YEAR;
            //On a leap year there are 29 days in February. If not, there's 28.
            if (isLeapYear(year))
                daysInMonth[1] = 29;
            else
                daysInMonth[1] = 28;
            //This variable helps me calculate denominations of time that are below year.
            millisAfterYear = 0;
            setTimeInMillis(theseMillis);
         *Sets the month to the one that you passed, 0 being January and 11 being December.
        public void setMonth(int month)
            if (month < 0 || month > 11)
                throw new ArrayIndexOutOfBoundsException(month);
            long theseMillis = getTimeInMillis();
            int days = 0;
            setYear(this.year);
            if (getTimeInMillis() > 0)
                theseMillis = theseMillis - getTimeInMillis();
            else
                theseMillis = theseMillis + getTimeInMillis();
            for (int cntr = 0; cntr < month; cntr++)
                days = days + daysInMonth[cntr];
            millisAfterYear = days * MILLIS_IN_DAY + 1;
            setTimeInMillis(getTimeInMillis() + millisAfterYear);
         *Returns the month stored in this object. With this object 0 represents January and 11 represents December.
        public int getMonth()
            long theseMillis = millisAfterYear;
            int cntr = 0;
            while (theseMillis > (MILLIS_IN_DAY * daysInMonth[cntr]))
                theseMillis = theseMillis - MILLIS_IN_DAY * daysInMonth[cntr];
                cntr++;
            return cntr;
         *Set the day of month to the one passed.
        public void setDayOfMonth(int day)
            if (day < 1 || day > daysInMonth[getMonth()])
                throw new ArrayIndexOutOfBoundsException(day);
            setMonth(getMonth());
            //Internally, this actually works starting at zero, however to anyone using this class it appears to start at 1. Therefore
                //i must subtract one here.
            long addMillis = MILLIS_IN_DAY * (day - 1);
            millisAfterYear = millisAfterYear + addMillis;
            setTimeInMillis(getTimeInMillis() + addMillis + 1);
         *Returns the day of month.
        public int getDayOfMonth()
            int days = (int)(millisAfterYear / MILLIS_IN_DAY);
            int cntr = 0;
            while (days >= daysInMonth[cntr])
                days = days - daysInMonth[cntr];
                cntr++;
            //Internally this class stores dates starting at zero, but i want it to look like it starts at 1.
            return days + 1;
         *Sets the time to the currently selected day at the passed hour on the hour. uses 24 hour clock.
        public void setHour(int hour)
            if (hour < 0 || hour > 23)
                throw new ArrayIndexOutOfBoundsException(hour);
            setDayOfMonth(getDayOfMonth());
            long addMillis = MILLIS_IN_HOUR * hour;
            millisAfterYear = millisAfterYear + addMillis;
            setTimeInMillis(getTimeInMillis() + addMillis);
         *Returns the hour (but not how many minutes past the hour).
        public int getHour()
            long millisAfterDay = millisAfterYear % MILLIS_IN_DAY;
            return (int)(millisAfterDay / MILLIS_IN_HOUR);
         *Set the minutes past the hour. Works 0-59.
        public void setMinute(int minute)
            if (minute < 0 || minute > 59)
                throw new ArrayIndexOutOfBoundsException(minute);
            setHour(getHour());
            long addMillis = MILLIS_IN_MINUTE * minute;
            millisAfterYear = millisAfterYear + addMillis;
            setTimeInMillis(getTimeInMillis() + addMillis);
         *Returns the minutes past the hour, 0-59.
        public int getMinute()
            long millisAfterHour = millisAfterYear % MILLIS_IN_HOUR;
            return (int)(millisAfterHour / MILLIS_IN_MINUTE);
         *Sets the seconds past the minute, 0-59.
        public void setSecond(int second)
            if (second < 0 || second > 59)
                throw new ArrayIndexOutOfBoundsException(second);
            setMinute(getMinute());
            long addMillis = MILLIS_IN_SECOND * second;
            millisAfterYear = millisAfterYear + addMillis;
            setTimeInMillis(getTimeInMillis() + addMillis);
         *Returns the seconds past the minute, 0-59.
        public int getSecond()
            long millisAfterMinute = millisAfterYear % MILLIS_IN_MINUTE;
            return (int)(millisAfterMinute / MILLIS_IN_SECOND);
         *The more commonly seen set method of other date objects. Sets the date/time to 00:00 of the year/month/day passed. Convenience method
         *for setDate(int year, int month, int day, int hour, int minute, int second).
        public void setDate(int year, int month, int day)
            setDate(year, month, day, 0 , 0 , 0);
         *Sets every date/time field.
        public void setDate(int year, int month, int day, int hour, int minute, int second)
            setYear(year);
            setMonth(month);
            setDayOfMonth(day);
            setHour(hour);
            setMinute(minute);
            setSecond(second);
         *Returns yes if the stored date is a leap year. A leap year is every year that is divisible by four unless it is divisible by 100
         *unless it is also divisible by 400.
        public boolean isLeapYear()
            return isLeapYear(this.year);
         *For internal use. Returns if the passed year meets the criteria for a leap year.
        private boolean isLeapYear(int year)
            boolean leapYear = false;
            if (year % 4 == 0)
                if (year % 100 != 0)
                    leapYear = true;
                else if (year % 400 == 0)
                    leapYear = true;
            return leapYear;
         *Returns the difference in milliseconds between the time stored in this object and the millis passed to this method.
        public long getDifferenceInMillis(long millis)
            return getTimeInMillis() - millis;
         *Returns the difference in milliseconds between this date and the date passed to this method.
        public long getDifferenceInMillis(AwesomeDate otherDate)
            return getDifferenceInMillis(otherDate.getTimeInMillis());
         *Designed to be a wrapper method for the getDifferenceInMillis method. This method changes millis into years/days/whatever. Pass
         *the number of milliseconds you have to convert in the first parameter. The second parameter should be the type of denomination you
         *want (year, day, whatever). Use the MILLIS_IN_* fields associated with this object. Also bear in mind when workin with years that
         *some years are leap years, so in extreme cases of differences of 365+ years you may gain/lose a year.
        public static int toGreaterDenom(long millis, long denom)
            return (int)(millis / denom);
         * The first argument is how many of whatever (days, months, years, etc.) to add (use negative numbers to subtract). For the second
         * argument pass one of the MILLIS_IN_* fields. Thus, to add two hours would be
         * <code>
         *      AwesomeDate.adjustDate(2, AwesomeDate.MILLIS_IN_HOUR);
         * </code>
        public void adjustDate(int amount, long typeMillis)
            setTimeInMillis(this.millis + amount * typeMillis);
         *Returns an object of type java.util.Date set to the date/time stored here.
        public java.util.Date toUtilDate()
            long offset = TimeZone.getDefault().getRawOffset();
            return new java.util.Date(getTimeInMillis() +  -1 * offset);
    //        return new java.util.Date(getTimeInMillis());
         *Returns an object of type GregorianCalendar set to the date/time stored here.
        public GregorianCalendar toGregorianCalendar()
            long offset = TimeZone.getDefault().getRawOffset();
            GregorianCalendar cal = new GregorianCalendar();
            cal.setTimeInMillis(getTimeInMillis() - offset);
            return cal;
         *Returns an object of type java.sql.Date set to the date/time stored here.
        public java.sql.Date toSQLDate()
            long offset = TimeZone.getDefault().getRawOffset();
            return new java.sql.Date(getTimeInMillis() - offset);
        /** Format the date  using the string that you pass. Works just like the SimpleDateFormat object. Infact, it uses one! Heres
         *how it works:
         *Letter  Date or Time Component  Presentation  Examples  <br>
         *G  Era designator  Text  AD  <br>
         *y  Year  Year  1996; 96  <br>
         *M  Month in year  Month  July; Jul; 07<br> 
         *w  Week in year  Number  27  <br>
         *W  Week in month  Number  2  <br>
         *D  Day in year  Number  189  <br>
         *d  Day in month  Number  10  <br>
         *F  Day of week in month  Number  2<br> 
         *E  Day in week  Text  Tuesday; Tue  <br>
         *a  Am/pm marker  Text  PM  <br>
         *H  Hour in day (0-23)  Number  0<br> 
         *k  Hour in day (1-24)  Number  24  <br>
         *K  Hour in am/pm (0-11)  Number  0  <br>
         *h  Hour in am/pm (1-12)  Number  12  <br>
         *m  Minute in hour  Number  30  <br>
         *s  Second in minute  Number  55  <br>
         *S  Millisecond  Number  978  <br>
         *z  Time zone  General time zone  Pacific Standard Time; PST; GMT-08:00<br> 
         *Z  Time zone  RFC 822 time zone  -0800  <br>
        public String toFormattedString(String format)
            SimpleDateFormat formattage = new SimpleDateFormat(format);
            return formattage.format(toUtilDate());
         *I overrode the toString method. Now it tells everyone how awesome my AwesomeDate is.
        public String toString()
            String output = "John's Awesome Date!";
            output = output + " Millis: " + getTimeInMillis();
            output = output + " Year: " + getYear();
            output = output + " Month: " + getMonth();
            output = output + " Date: " + getDayOfMonth();
            output = output + " Time: ";
            if (getHour() < 10)
                output = output + "0" + getHour();
            else
                output = output + getHour();
            if (getMinute() < 10)
                output = output + "0" + getMinute();
            else
                output = output + getMinute();
            output = output + " Seconds: " + getSecond();
            return output;
        public static void main(String[] psvm)
            AwesomeDate blah = new AwesomeDate();
            GregorianCalendar blah1 = new GregorianCalendar();
            GregorianCalendar blah2 = new GregorianCalendar();
    }

    The reason Callendar is so complicated is that it is trying to solve a very complicated problem.
    You don't appear to support leap seconds (of which there can be upto 2 in any time interval)
    http://www.timeanddate.com/time/leapseconds.html
    Some of your code will not work for large dates very well (seems to iterate over the years). Try using your date class for astronomical or geological calculations. them big numbers will make your code slow at the moment.
    You don't seem to support timezones or transitory offsets (BST vs GMT). You most definately don't handle changes to timezone offsets that have occured in the past or historical daylight savings time offsets (they have not always been the same)
    The difference between two calendars is a "duration" a duration means nothing unless it is applied to a caledar/date (although you may be able to get away with it if the duration is always stored in millis)

  • Differences between Oracle BAM and Oracle BI and Question BAM  Data Objects

    Hi,
    I have two questions.
    1. Can someone tell me differences between Oracle BAM and Oracle BI?
    My understanding about Oracle BAM is, we use BAM to build Dashboards or Reports.
    We can also build DashBoards or reports using Oracle BI.
    I am not able to understand why Oracle has two tools for same purpose?
    Which tool is more powerful and user friendly(Oracle BI or Oracle BAM)?
    2. Every time we plan to develop Dashboard or report in BAM, we need to create BAM ADC Data Object to store Data (i.e first step is to get data from external database or application and second step is to store data in BAM ADC data object).
    My understanding is we have an extra step(i.e creating Data Object) in Oracle BAM to develop a report or DashBoard
    I am wrong pl correct me?
    Regards,
    Shanti Nagulapalli.

    Oracle 11g has many advanced features in PL/SQL over Oracle 9i.
    refer here,
    http://www.oracle.com/technetwork/database/features/manageability/9i-to-11g-real-world-customer-exper-133754.pdf
    http://www.oracle.com/global/de/upgradecommunity/artikel/upgrade11gr2_workshop2.pdf
    http://www.compuworks.com/events/view/233.pdf
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getCourseDesc?dc=D52601GC10&p_org_id=15942&lang=US
    Thanks

  • Difference between Service data objects and process data object

    Hi
    Can anybody tell me what is the difference between SDO (Service Data Objects) & PDO (Process Data Objects).I am using 2 port PCI-CAN series 2 card.
    If anybody knows the answer then please reply.
    Thanking You

    Hi,
    See the online help file from our NI CANopen Library for LabVIEW for some basic informations about SDOs and PDOs.
    More information should be available from the web.
    DirkW
    Attachments:
    lvcanopenvhelp.zip ‏154 KB

  • Add/Remove data object from dataset

    Hello,
    I was working out a way to add and remove data from a dataset
    on the fly and could not figure out any built in methods to do
    this.
    As I have decided to include spry in my project I like to try
    and utilise as much as of its code as possible since it is
    complicated to explain I have created a simple example – a
    colour picker! (thought it might be more interesting…) of
    what I am trying to achieve at
    http://www.freshfresh.co.uk/spry/
    - if you have a go on this and maybe look at the source code (all
    the JS is embedded in HTML there are no modifications to other the
    other core files). I have only used spry effects etc, including the
    ‘accordion’ – which I have become quite attached
    to, it is really good for condensing pages down.
    You will see I am using the setDataFromDoc method to create
    the dataset – I tried the .data = myArrayOfData; .dataHash =
    hashTable; method i.e. creating from an object rather than array
    but it did’nt seem to play ball with the
    addDataChangedObserver method – it did’nt update itself
    each time it was modified (I am sorry I cannot remember exactly
    what I did – but I tried all kinds of ways…). I stuck
    with the string method because it worked - each time my new dataset
    changed it updated itself on the screen (you will have to have a
    look to understand.....sorry!!), but I would be interested to know
    how such a thing could be implemented using the object route if you
    believe this would be more efficient.
    My second question is more simple – is there a shorter
    way to add and remove a data object from a dataset? – as you
    can see from the source code I have effectively created an
    ‘interface’ to do these tasks…. I could’nt
    work out whether these methods are already built in. Maybe they
    are?
    Third question is… to extract a data object from a
    dataset I use the .dataHash[the_row_id] method – is this the
    right thing to do or could it lead to complications… that is
    using methods that might supposedly be private?
    Fourth question (observation really) – whilst creating
    that colour picker example I went over board with my datasets and
    loaded in several palettes some of which had over 1000 elements or
    data objects. Which inevitably was very slow (on my computer
    anyway) – but it got me thinking about trimming the contents
    of my spry regions for better performance. I am I right in thinking
    that the less HTML etc that there is in a spry region the quicker
    SPRY will process it. For example say you had spry repeat with an
    image tag in with some onclick, onmousover, onmouseout, style
    attributes etc and compare this to a spry repeat with a simple
    image with minimal attributes set. I suppose what I am trying to
    say is – does spry ‘store’ all the contents of
    each spry region somewhere? Or does it just process it and leave it
    to the browser dom?
    Fifth observation.... I find it really difficult to explain
    computer technicalities in writing. It must be tough reading these
    posts.... I know I find it difficult sometimes when dealing with
    written end user feedback!
    Andrew

    Just clarifying my questions a bit further....
    I found some old code regarding question 1 by using the
    object method I mean something like this...
    var mySwatches = [{'@hex':'ff0000'},{'@hex':'00ff00'}];
    var hashTable = [];
    function createDs(){
    for (var i = 0; i < mySwatches.length; i++)
    mySwatches
    .ds_RowID = i;
    hashTable = mySwatches
    dsMySwatches.data = mySwatches;
    dsMySwatches.dataHash = hashTable;
    dsMySwatches.loadData();
    i.e. not writing out a whole XML string string as the online
    example does. When using this way I did'nt seem to be able to get
    the HTML to refresh. I tried using [
    Spry.Data.updateRegion('mydata'); ] after recreating the dataset I
    also tried adding an [ .addDataChangedObserver ] (like in the
    string example) amongst numerous other ways but it just would not
    work like the string way. - Maybe I did something wrong somewhere.
    In question 3 I refer to the [ .hash ] method .... its not a
    'method' its a 'property' - my question should read - is it ok to
    access private properties (from a browser campatiblity/security
    point of view) that do not have specific methods to gain access to
    them. I suppose it does'nt really matter with JS...
    In question 4 I mention minimising the amount of code in a
    spry region to speed it up. A clearer example of this might be for
    example - a gallery with lots of images. As we know there will be a
    slight delay as SPRY writes all the html so to speed up that intial
    write I strip out all the image attributes such as onlclick do
    this, onmouse over do that... and add these after the images have
    loaded using a seperate function similar to my
    fillSwatches(ds,prefix) function in my online colorpicker example.
    I suppose it like a 2 tier processing of all the data. SPRY does
    the intial display writing to get everything in place and then
    another pass is made over to add any further functionality
    adjustments etc. I am still not sure if that makes any sense!
    ***edit
    Also on the subject of speed and the application as a whole
    i.e. including my PHP - In one example I was creating I ended up
    with an XML structure where each node has over 14 attributes i.e.
    <somenode att1=”x” ……..
    att14=”z”/> - as the file grew it obviously took
    longer to process particularly on the server side, i.e. added all
    those attributes just slowed it all down. So I did
    this…… <somenode att1=”x:y:z” /> i.e
    condensed selected attributes into a string that I could explode
    later on.
    Obviously this limits SPRYS ability to access the attributes
    using the {attr} syntax. I had to create a function to explode the
    array and do the ‘necessary’ on a second pass over the
    data – this works ok for me. But its interesting that in this
    particular case the server could not refresh the XML in an
    acceptable time without doing this – just thought that might
    be interesting to you. I suppose technically what I am doing is
    abusing the concept of an XML structure and simply using it as a
    ‘carrier’ to feed my application …. Which I
    suppose is where JSON comes in…. which is a bit more compact
    and maybe faster to manipulate on both the server and client side
    – I don’t really know, I have never used it –
    just throwing ideas around!!
    Andrew

  • Adding days to a date object

    I am retreiving a date field from the database.
    i am retrieving that with getDate() method on the result set object.
    that is am retrieving as java.sql.Date object.
    on that date object i have to add 30 days and store it back in the
    database as a date field in database.
    How should i go about handling this problem.
    suppose
    java.sql.Date newDate=rs.getDate(1);
    on this newDate how can i add 30 days and store it back to the database.
    Plz help me out guyz.
    Thanks.

    wud the setting to a particuale date means setting to
    the date i retrieved from the database.
    How to set for a particular date.We have setTime()
    method in Calendar.
    but that takes util.Date object.Then do i have to
    convert the sql.Date object into a util.Date object.A java.sql.Date IS-A java.util.Date.
    (There's no such thing as a sql.Date or a util.Date unless you have a different API than the rest of us.)

  • Parsing from string to date object

    How can I convert a time in String format to a Date object?
    ie. 14:30:05(String) to 14:30:05

    How about this?
    String sDate = "14:30:05";
    StringTokenizer tokenizer = new StringTokenizer(sDate, ":");
    Calendar calendar = new Calendar();
    int hour = Integer.parseInt(tokenizer.nextToken());
    int minute = Integer.parseInt(tokenizer.nextToken());
    int second = Integer.parseInt(tokenizer.nextToken());
    calendar.set(Calendar.HOUR_OF_DAY, int hour);
    calendar.set(Calendar.MINUTE, int minute);
    calendar.set(Calendar.SECOND, int second);
    Date dDate = calendar.getTime();I didn't try it, but it should be pretty close (unless you want to use deprecated methods, then it can be shorter...)

  • About Interface objects in Integration Repository

    Hi All,
       I want to know details about Data type enhancements & Context objects in Interface Objects.Please help me.
    Thanks,
    GOPI.

    Hi Gopikishor,
            _Context objects:_ Its nothing but  to access a  element payload of the message,in Simple terms,  X-Path expressions in the repoistery..
    Deeply Nested elements in the Message structure.
    Ex:
    <Header>
         <PurchaseOrgData>
                <Sender>
                       <PurchaseData> Goods</PurchaseData>
                 </Sender>
         </PurchaseOrgData>
    </Header>
    Define X-path for the above structure: \Header\PurchaseOrgData\Sender\PurchaseData\
    Once we can define the "Context Objects" we can use following situations..
    1) Receiver Determination: During the Receiver Condition in the Integration directory,
    2) Integration Process: During the processing business process depends upon content of message.
    Datatype Enhancement:
    http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/frameset.htm.
    Regards,
    Sateesh N.

  • Leap year without date objects

    I need to check to see how many leap years are between two user-inputted years and I can't use date objects. I figure I need to start with a for loop, but I get lost when to by the mod 4, mod 100, or mod 400. Any help?
    for(int l=cYear; l <= eYear; l++){
                        if(l%4 == 0){
                             if(l%100 == 0){
                   }also, if anyone is bored and really wants to give of themselves, I could use some more help with a pretty challenging-for-my-level program. Let me know.
    Message was edited by:
    kaluga

    yeah, he said like 20 times "one big main method, no
    other methods"He's a moron and should not be teaching CS or Java.
    Problems: 1. I am having trouble wrapping my mind
    around the logic,Meaning what? You described it--or was that just copy/paste of what's in the asisgnent? I gave you some pseudocode that's practically Java already.
    Just try it. Take your best shot and write some test cases and see how close you are.
    2. I don't know if this (below)
    syntax works.Try it. If the syntax is wrong, it won't compile.
    Once you get it to compile, then test it. Here's one reason why you'd want a separate method--you could test just that method by itself. As it stands, the easiest way to test it is to always give it just one year and see if you end up with the proper count--zero or one. If you give it many, you could end up with the right number by having the same number of false positives and false negatives.
    Once you know it works for one year, feed it a few lists of 5 or 10.
    btw jverd, I appreciate your helpYou're quite welcome. It looks like you're on the right track. Just don't be afraid to try stuff and see what happens, and then come back with specific questions about the specific problems you observed. :-)
    ---- Edit ----Or do like DrClap suggested and print each one. This way you can still test many at once.
    Note to self: Duh, Jeff.
    ---- ---- ----Message was edited by:
    jverd

  • Oracle Data Objects greyed out

    Hello, quick question about ODT 10.2.0.2.10 beta for .NET2005.
    Oracle Data Objects are greyed out in my toolbox in web application. Also when I drag and drop table from Oracle Explorer onto the aspx form, all I get is text with Select statement.
    At the same time, all this functionality works ok in windows form.
    The same installation works ok in 2003, both web and windows forms.
    Thanks in advance.

    In vs2005, in an ASP.NET web application, you will need to right click on the default.aspx, select "View Component Designer" from the context menu and this will launch the Component (Windows Forms) Designer and then the ODP.NET components in the toolbox will be enabled.
    Let me know if this fixes your problem.

  • Reusing Human Tasks across BPM Processes with different Data Objects

    Hi
    JDeveloper 11.1.1.6, WLS 10.3.6, SOA/BPM 11.1.1.6
    I have defined 2 BPM Processes, P1 and P2, which has 2 different Process Data Objects O1 and O2.
    But I am reusing the same Human Task in both the processes.
    For the Human Task to support the activities in both the processes, I have added O1 and O2 Data Objects in the Human Task Definition.
    And hence the ADF Taskflow / page generated out of the Human Task will have both the Data Objects O1 and O2 as payload objects in the Page.
    When an instance of Process P1 is created, the payload O1 will have values, but O2 will be null.
    And when an instance of Process P2 is created, the payload O2 will have values, but O1 will be null.
    It works well like this, but I am a bit concerned about the performance from BPM Process and also ADF page.
    In ADF page, let us say, somehow I can control the rendering of the attributes or creation of the iterator bindings based on identifying which process is being executed.
    (By setting the iterator binding refresh property in page definition)
    In this way attribute bindings for O1 will not be created when P2 is being executed.
    But still when the Process instance is created, and when we see the payload structure of the human task in the EM - Audit Trail,
    I still see both data objects O1 and O2 are created in the Payload, but O1 will have nulls in process P2.
    So my question is, from performance point of view, is it advisable to define different Data Objects in reusable Human tasks ?
    Or should I have to define a separate Human Task definition which contains only the Data Objects related to the process it is being called from ?
    Thanks for any help
    Sameer 

    Martijn,
    You are correct in your assessment that the JAG in the current JHeadstart release cannot cope with multiple bc4j packages. There is no work around for this. Upgrading to 9051 will not help.
    In the JHeadstart-ADF release, this restriction has been lifted. You can place your EO, VO and AM objects in different packages, and you can group them in a separate project (Model project), while generating your JHeadstart application in a ViewController project.
    We have a number of customers that use the latest JHeadstart-ADF builds to build their ADF apps. If you are interested in joining this beta program, please send an e-mail to [email protected]
    Steven Davelaar,
    JHeadstart Team.

Maybe you are looking for

  • UDF in item query form

    Hi, How to add a UDF to the ' item query' form.   (Inventory->Inventory Reports->Item query) Thanks, Smitha

  • Delete all image collections

    I am looking for a way to delete all image collections from the Collections tab. Is this possible with a custom javascript for Br?

  • Having trouble opening a doc from 2001 with 9.5

    Hi, My 9.5 won't support opening a doc from 2001... any suggestions?

  • Coverage Zones and PAC files

    Just wondering if anybody has used coverage zones and PAC files to do auth browser configuration. I'm looking at a global deployment of Content Engines (ACNS 5.1) and would like to set each CE up as a PAC server to respond to a request and direct the

  • Download PDF File to SAP Application Server

    Hi, I need to download the PDF file to SAP Application Server. Can any one please help me to Solve this Issue? Thanks in Advance, Kannan