HELP with Subtitles and Stories

Ok, I need help with a a complicated disc I'm trying to set-up.
I don't even know if this is possible.
What I'd like to do is enable a story that could Play all
three of seperate video shorts, that all resides on seperate tracks. The reason they are on seperate tracks, is because each track has two audio streams (one for English Lang, the other for Japanese Language) and each short aslo has an English Subtitle track. The tracks are named as Short A, Short B, and Short C.
Or is there a way other than a Story that could link
the three seperate tracks to play one right after the other ?

Stories won't link assets across different tracks - a story is like a play list for a single track - it can only contain a subset of the track's assets.
In order to effect a 'Play All' across different tracks you are going to need to script it.
Fortunately, it's pretty easy, but you have to be clear about the functionality that you want in advance. Whilst it is simple to check to see if a 'play all' button was activated, there are various scenarios which your user might be in that will adversely affect the playback.
Check here for more info - the section about scripting is towards the bottom, but be sure to read about things to watch out for!

Similar Messages

  • Subtitles and Stories

    I am having some issues with subtitles and stories. I have a multi language DVD in which subtitles are to be shown over the non-English versions. The English version does not require subtitles. I authored the DVD so no subtitles will be shown when the viewer selects the English version. But, in some players a subtitle stream is displayed during playback.
    In DVDSP I have one video track with multiple stories. Each story is for a language. The viewer first selects which language they desire, then they go to a menu written in that language's characters. The buttons on those secondary menus link to the stories. Each menu's button has been assigned to the appropriate subtitle stream and "View" is checked. However for English, which does not need subtitles, I linked the buttons to an empty subtitle stream and unchecked "View."
    Using the Simulator I read the log and see that the SPRM 2 value for English is "0." In the DVDSP manual that is listed as meaning "off." That is good and all subtitles play back as intended including English during which no subtitles are seen.
    The problem is that when playing a burned DVD in some players, the English story has a subtitle stream (the contents of subtitle stream 1 on one player, and another older player displays stream 3). On other players the DVD plays fine and no subtitles are visible during the English video.
    Why is a subtitle stream being shown when the DVD commands say to not display subtitles?

    Thank you for the reply. This is an aggravating issue and an unforeseen one since my testing regimen included a high quality player, a low quality player, and Windows & Mac software players. No play back issues were noted. But since there are so many different players out there it is hard to know how compatible a DVD will be. And I've now seen it first hand. I took the DVD to an electronics store and tried it on a five portable DVD players. Two displayed subtitles during the English video (incorrect playback), while three played the DVD properly (no subtitles during English). The more expensive players were better able to follow the commands of the DVD.
    Anyway...
    I followed the info in your web links. The step by step tutorial for authoring with stories did not remedy the issue. I tried following the first link that talks about scripting but found it to be above my current level of knowledge.
    I would appreciate more precise help on how to script links to subtitles & stories? The main issue is how to turn off subtitle streams for the English story. By using the advanced button controls I can activate proper subtitles displays on the foreign language stories without issue. The problem is trying to tell DVD players to shut off all subtitle streams when the English story is selected.
    I think scripting could help, but it's hard to understand since I haven't done much of it yet.

  • Help with writing and retrieving data from a table field with type "LCHR"

    Hi Experts,
    I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
    Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
    Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
    Thanks in advance,
    C
    SAVING THE LIST DATA TO DB
    DATA: L_WA(800).
    LOOP AT T_TAB into L_WA.
    ZDBTAB-DATALEN = STRLEN( L_WA ).
    MOVE: L_WA to ZDBTAB-RAWDATA.
    ZDBTAB-LINENUM = SY-TABIX.
    INSERT ZDBTAB.
    READING THE DATA FROM DB
    DATA: BEGIN OF T_DATA,
                 SEQNR type ZDBTAB-LINENUM,
                 DATA type ZDBTAB-RAWDATA,
               END OF T_TAB.
    Select the data.
    SELECT linenum rawdata from ZDBTAB into table T_DATA
         WHERE repid = w_repname
         AND rundate = w_rundate
         ORDER BY linenum.
    Populate calling Internal Table.
    LOOP AT T-DATA.
    APPEND T_DATA to T_TAB.
    ENDLOOP.

    Hi Anuj,
    The unicode flag is active.
    When I run our report and then to try and save the list data a dump is happening at the following point
    LOOP AT T_TAB into L_WA.
    As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
    When I try to load a saved list the dump is happening at the following point
    APPEND T_DATA-RAWDATA to T_TAB.
    T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
    In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE
    Regards
    C

  • Playing movie with subtitles and without

    Total newbie at making a film with subtitles and at using DVD Studio Pro
    The person creating the subtitles did it in FCP and I just opened her project and then laid it on my video. Question is - how can I burn the DVD with the options of English only or with subtitles.
    Do I need to have two movies imported into DVD Studio, one with subtitles another not (it's only a 30 minute video, so that's not a problem to fit on a DVD).
    Or is there another way to handle it in DVD Studio?
    thanks

    Typically you would NOT have subs on your footage, but would add them to DVDSP as a separate file. You can create subtitles inside DVDSP but if you do there is no flexibility in manipulating them later.
    Workflow is to create the footage in FCP, then to use that in a subtitler app to spot the speech and create the subs, then import the footage and the subs file into DVDSP.
    As for setting it up in DVDSP, have a look here:
    http://www.kenstone.net/fcphomepage/dvd_sp2subtitles.html
    and here for slightly more complexity:
    http://www.kenstone.net/fcphomepage/dvd_setup_andresume.html
    and finally here for more of the same:
    http://digitalproducer.digitalmedianet.com/articles/viewarticle.jsp?id=32345&aft erinter=true

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

  • MOVED: [Athlon64] Need Help with X64 and Promise 20378

    This topic has been moved to Operating Systems.
    [Athlon64] Need Help with X64 and Promise 20378

    I'm moving this the the Administration Forum.  It seems more apporpiate there.

  • Help with WindowsDesktopSSO and AMIdentity.getAttributes

    Hi guys and girls,
    I need some help from you experts.
    I successfully setup, thanks to this guide
    http://blogs.oracle.com/knittel/entry/opensso_windowsdesktopsso
    and a lot of trial & errors and googling a Kerberos authentication between OpenAM version 9.5.2 and an Active Directory Server.
    When I navigate to openAM page (from a domain machine) http://<openAMhost>:<port>/opensso, it doesn't ask for credentials ...
    and I can see, with ieHttpHeaders, kerberos data exchange.
    Without creating an Active Directory DataStore (pointing to the same domain where I use kerberos data) in openAM,
    when I navigate (from a domain machine) to /opensso/idm/EndUser page, it always gives me:
    "Plug-in com.sun.identity.idm.plugins.ldapv3.LDAPv3Repo encountered an ldap exception. LDAP Error 32: The entry specified in the request does not exist."
    Since my aim was to get user information from a web app ... I thought I could have done this with an agent/SDK call as I usually do with "classic" authentication.
    Now I created a J2EE Agent (on openAM) to protect one of my application deployed on a JBoss 4.2.1-GA server.
    Agent configured with default options and these changes:
    Agent Filter Mode: J2EE_POLICY
    User Mapping Mode: USER_ID
    User Attribute Name: tried both with employeenumber and uid
    User Principal Flag: enabled
    User Token Name: UserToken
    FQDN Check: tried both with enabled and disabled
    WebAuthentication Available : Enabled
    In my application WEB-INF/jboss-web.xml looks like this:
         <?xml version="1.0" encoding="UTF-8"?>
         <jboss-web>
              <security-domain>java:/jaas/AMRealm</security-domain>
         </jboss-web>Usually, when I authenticate with "classic" (internal datastore) login, I can get user attributes programmatically with a code like this:
           private String getCredenzialiUtente(HttpServletRequest request)
                String                 SSOUsername      = null;
                SSOToken               ssoToken      = null;
                SSOTokenManager        manager           = null;
                  try
                    manager = SSOTokenManager.getInstance();
                    if ( manager == null)
                         throw new RuntimeException("Unable to Get: SSOTokenManager");
                    String ssoTokenID = AmFilterManager.getAmSSOCache().getSSOTokenForUser(request);
                    ssoToken = manager.createSSOToken(ssoTokenID);
                    if ( ssoToken == null )
                          throw new RuntimeException("Unable to Get: TokenForUser");
                    AMIdentity amid = new AMIdentity(ssoToken);
                    if(amid == null)
                       throw new RuntimeException("Unable to Get: UserIdentity");
                    SSOUsername  = amid.getName();
                    System.out.println("######### USERNAME FROM SSO: " + SSOUsername);
                    Set<String> info = new HashSet<String>();
                    info.add("uid");
                    info.add("givenName");
                    java.util.Map mappa = amid.getAttributes(info);
                    if ( mappa != null )
                        java.util.Set insieme = mappa.keySet();
                        java.util.Iterator it = insieme.iterator();
                        while ( it.hasNext() )
                            String n = it.next().toString();
                            System.out.println( n + " ==> " + mappa.get(n) );
                    else
                        System.err.println(" DAMN - NO ATTR ");
              catch (Exception exception)
                exception.getMessage();
                exception.printStackTrace();
              System.out.println("OUT getCredenzialiUtente: " + SSOUsername);
              return SSOUsername;
            }        When I log to console with default "ldapService" module (outside the domain), I can get something like:
         2011-09-29 13:14:38,733 INFO  [STDOUT]  ####################################### USER = amadmin
         2011-09-29 13:15:32,250 INFO  [STDOUT] IN getCredenzialiLAit
         2011-09-29 13:15:32,260 INFO  [STDOUT] ######### USERNAME DA SSO: a2zarrillo
         2011-09-29 13:15:32,291 INFO  [STDOUT] uid ==> [a2zarrillo]
         2011-09-29 13:15:32,291 INFO  [STDOUT] givenName ==> [Antonio2]
         2011-09-29 13:15:32,311 INFO  [STDOUT] OUT getCredenziali: a2zarrillo
         2011-09-29 13:15:32,321 INFO  [STDOUT]  ####################################### USER = a2zarrillobut when i try to login from inside the domain (with kerberos, so no credentials) with a domain user, I get:
         2011-09-29 13:15:39,496 INFO  [STDOUT] IN getCredenzialiLAit
         2011-09-29 13:15:39,503 INFO  [STDOUT] ######### USERNAME DA SSO: tonyweb
         2011-09-29 13:15:39,550 ERROR [STDERR] Message:Plug-in  encountered an ldap exception.  LDAP Error 32: The entry specified in the request does not exist.
         2011-09-29 13:15:39,554 ERROR [STDERR]      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         2011-09-29 13:15:39,560 ERROR [STDERR]      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         2011-09-29 13:15:39,562 ERROR [STDERR]      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         2011-09-29 13:15:39,566 ERROR [STDERR]      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         2011-09-29 13:15:39,574 ERROR [STDERR]      at com.sun.identity.shared.jaxrpc.SOAPClient$SOAPContentHandler.createResourceBasedException(SOAPClient.java:834)
         2011-09-29 13:15:39,575 ERROR [STDERR]      at com.sun.identity.shared.jaxrpc.SOAPClient$SOAPContentHandler.endDocument(SOAPClient.java:800)
         2011-09-29 13:15:39,578 ERROR [STDERR]      at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
         2011-09-29 13:15:39,582 ERROR [STDERR]      at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
         2011-09-29 13:15:39,587 ERROR [STDERR]      at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
         2011-09-29 13:15:39,592 ERROR [STDERR]      at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
         2011-09-29 13:15:39,598 ERROR [STDERR]      at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
         2011-09-29 13:15:39,600 ERROR [STDERR]      at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
         2011-09-29 13:15:39,604 ERROR [STDERR]      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         2011-09-29 13:15:39,607 ERROR [STDERR]      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         2011-09-29 13:15:39,609 ERROR [STDERR]      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         2011-09-29 13:15:39,613 ERROR [STDERR]      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         2011-09-29 13:15:39,616 ERROR [STDERR]      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         2011-09-29 13:15:39,621 ERROR [STDERR]      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
         2011-09-29 13:15:39,625 ERROR [STDERR]      at com.sun.identity.shared.jaxrpc.SOAPClient.send(SOAPClient.java:343)
         2011-09-29 13:15:39,633 ERROR [STDERR]      at com.sun.identity.shared.jaxrpc.SOAPClient.send(SOAPClient.java:311)
         2011-09-29 13:15:39,636 ERROR [STDERR]      at com.sun.identity.idm.remote.IdRemoteServicesImpl.getAttributes(IdRemoteServicesImpl.java:229)
         2011-09-29 13:15:39,639 ERROR [STDERR]      at com.sun.identity.idm.remote.IdRemoteCachedServicesImpl.getAttributes(IdRemoteCachedServicesImpl.java:402)
         2011-09-29 13:15:39,642 ERROR [STDERR]      at com.sun.identity.idm.AMIdentity.getAttributes(AMIdentity.java:344)
         2011-09-29 13:15:39,645 ERROR [STDERR]      at org.apache.jsp.MainPageJSP_jsp.getCredenzialiUtente(MainPageJSP_jsp.java:63)
         2011-09-29 13:15:39,648 ERROR [STDERR]      at org.apache.jsp.MainPageJSP_jsp._jspService(MainPageJSP_jsp.java:217)
         2011-09-29 13:15:39,653 ERROR [STDERR]      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         2011-09-29 13:15:39,660 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         2011-09-29 13:15:39,664 ERROR [STDERR]      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         2011-09-29 13:15:39,666 ERROR [STDERR]      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         2011-09-29 13:15:39,669 ERROR [STDERR]      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         2011-09-29 13:15:39,673 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         2011-09-29 13:15:39,676 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         2011-09-29 13:15:39,678 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,683 ERROR [STDERR]      at com.sun.identity.agents.filter.AmAgentBaseFilter.allowRequestToContinue(AmAgentBaseFilter.java:127)
         2011-09-29 13:15:39,685 ERROR [STDERR]      at com.sun.identity.agents.filter.AmAgentBaseFilter.doFilter(AmAgentBaseFilter.java:76)
         2011-09-29 13:15:39,690 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         2011-09-29 13:15:39,697 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,701 ERROR [STDERR]      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
         2011-09-29 13:15:39,705 ERROR [STDERR]      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
         2011-09-29 13:15:39,710 ERROR [STDERR]      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
         2011-09-29 13:15:39,713 ERROR [STDERR]      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         2011-09-29 13:15:39,716 ERROR [STDERR]      at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
         2011-09-29 13:15:39,725 ERROR [STDERR]      at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
         2011-09-29 13:15:39,729 ERROR [STDERR]      at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
         2011-09-29 13:15:39,730 ERROR [STDERR]      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
         2011-09-29 13:15:39,734 ERROR [STDERR]      at com.cid.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:92)
         2011-09-29 13:15:39,741 ERROR [STDERR]      at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
         2011-09-29 13:15:39,744 ERROR [STDERR]      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
         2011-09-29 13:15:39,747 ERROR [STDERR]      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
         2011-09-29 13:15:39,750 ERROR [STDERR]      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         2011-09-29 13:15:39,753 ERROR [STDERR]      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
         2011-09-29 13:15:39,761 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         2011-09-29 13:15:39,765 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,768 ERROR [STDERR]      at com.cid.faces.webapp.CidWebUIFilter._invokeDoFilter(CidWebUIFilter.java:239)
         2011-09-29 13:15:39,776 ERROR [STDERR]      at com.cid.faces.webapp.CidWebUIFilter._doFilterImpl(CidWebUIFilter.java:196)
         2011-09-29 13:15:39,780 ERROR [STDERR]      at com.cid.faces.webapp.CidWebUIFilter.doFilter(CidWebUIFilter.java:80)
         2011-09-29 13:15:39,788 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         2011-09-29 13:15:39,793 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,797 ERROR [STDERR]      at com.sun.identity.agents.filter.AmAgentBaseFilter.allowRequestToContinue(AmAgentBaseFilter.java:127)
         2011-09-29 13:15:39,803 ERROR [STDERR]      at com.sun.identity.agents.filter.AmAgentBaseFilter.doFilter(AmAgentBaseFilter.java:76)
         2011-09-29 13:15:39,807 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         2011-09-29 13:15:39,810 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,813 ERROR [STDERR]      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         2011-09-29 13:15:39,820 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         2011-09-29 13:15:39,825 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         2011-09-29 13:15:39,829 ERROR [STDERR]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         2011-09-29 13:15:39,833 ERROR [STDERR]      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         2011-09-29 13:15:39,836 ERROR [STDERR]      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         2011-09-29 13:15:39,843 ERROR [STDERR]      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         2011-09-29 13:15:39,846 ERROR [STDERR]      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         2011-09-29 13:15:39,851 ERROR [STDERR]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         2011-09-29 13:15:39,854 ERROR [STDERR]      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
         2011-09-29 13:15:39,857 ERROR [STDERR]      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         2011-09-29 13:15:39,860 ERROR [STDERR]      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         2011-09-29 13:15:39,862 ERROR [STDERR]      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         2011-09-29 13:15:39,866 ERROR [STDERR]      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         2011-09-29 13:15:39,870 ERROR [STDERR]      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         2011-09-29 13:15:39,874 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:619)
         2011-09-29 13:15:39,877 INFO  [STDOUT] OUT getCredenziali: tonywebAs you can see I'm using the "sample" agentApp.war.     
    What am I missing ? It "crashes" as for getAttributes() call :/
    I thought it could be because I didn't setup LDAP DataStore ... so I set up Active Directory Data Store.
    While in openAM console (from outside domain) I can see (from Subjects tab) Active Directory users and relative information
    (like FirstName (=givenName), Surname (=sn), Full Name (=cn), etc.) ... when I try again with idm/EndUser (from a domain machine)
    I get the same error:
         Message:Plug-in  encountered an ldap exception.  LDAP Error 32: The entry specified in the request does not exist.What should I do now ?
    If you need more clarifications ... just ask :)
    Thank you in advance and sorry for the big post.
    Best Regards,
    Tony
    P.D. By the way, my OpenAM configuration does not create any "amAuthWindowsDesktopSSO.log" :(
    I setup, from opensso/Debug.jsp message level for Authentication ... but it still doesn't create this log ... can you please tell me how to let openAM write it ?
    Again thank you

    Weird enough, changing to ADAM data store (and not "standard" AD datastore) solved the problem :D
    I still wonder why since both plugins share the same java [implementing] class...
    Regards,
    Tony

  • Ineed help with id and pasword my ipad

    need help with activation screen

    Thanks, I deleted all apps, then logged in on my app store and redownloaded all my apps, now all apps are up to date and hopefully my iPad won't ask for my friends acc again, thanks a lot.
    Alex

  • Cannot load movie with subtitles and export in QuickTime 10 / Os X Lion

    Since Os X Lion, when trying to load a movie (DivX) in QuickTime 10 at the same time that the related subtitles file (.srt) is in the same folder as the movie, QT 10 suggests to use QT 7. QT 10 cannot load the movie with subtitles (in Snow Leopard everything was OK). Q& 7 is useless too because it cannot export movies to another format.
    Anybody has a solution for this? Thanks for your help!

    chaquemain wrote:
    Since Os X Lion, when trying to load a movie (DivX) in QuickTime 10 at the same time that the related subtitles file (.srt) is in the same folder as the movie, QT 10 suggests to use QT 7. QT 10 cannot load the movie with subtitles (in Snow Leopard everything was OK). Q& 7 is useless too because it cannot export movies to another format.
    Anybody has a solution for this? Thanks for your help!
    I do this because Perian don't work with QT10 on Mac OS X Lion:
    -Try to open .avi movie with QT 10;
    -OS X ask you to open on QT 7;
    -Donwload QT 7 and install it. It will be installed on "Utilities";
    -Download Perian but don't install it;
    -Mount Perian, and click "Show Package Contents"
    -Go to "Contents"->"Resources"->"Components"->"CoreAudio" and copy to Desktop "A52Codec.zip" and unzip it;
    -Go to"Contents"->"Resources"->"Components" and copy to Desktop "Perian.zip" and unzip it;
    -Go to "Contents"->"Resources"->"Components"->"CoreAudio"->Quicktime" and copy to Desktop "AC3MovieImport.zip" and unzip it;
    -Then copy all packages with ".component" extention to /Library/Quicktime/;
    -Then you can run all movies on QT 7.
    Or,
    -Install MPlayerX;
    Or,
    -Install VLC;
    Or,
    Regards

  • Help with HashMap and Collections

    Hey everyone,
    I am currently writing a program that makes use of HashMap, which I am not at all familiar with. I looked it up in some books and some websites, but it seems everyone does something different every time so I need some guidance. My program is to take Inventory Item objects that have an name and an inventory number and store them in a HashMap. Originally I had them stored in an Array but now it's gonna be in a HashMap. This also uses some Java GUI elements so bear with me.
    Ok, first here is my code for my Item object:
    public class Item{
        private String number;
        private String name;
        public Item(String number, String name) {
              this.number = number;
              this.name = name;
          @Override
          public String toString() {
              return "#"+number+"  N:"+name;
    }And this is what I got so far for my Inventory GUI:
    import java.util.HashMap;
    import java.util.Iterator;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.Label;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.DefaultListModel;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JList;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.JScrollPane;
    public class InventoryGUI {
         //private static Item[] item = new Item[10];
         HashMap hash = new HashMap();
         private static int count = 0;
         public static void main(String[] args) {
              JFrame gui = new JFrame("Project 2 GUI");
              gui.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              JPanel inputPanel = new JPanel();
              inputPanel.setLayout(new GridLayout(5,2));
              inputPanel.add(new Label("Inventory Number"));
              final JTextField numberField = new JTextField(15);
              inputPanel.add(numberField);
              inputPanel.add(new Label("Name"));
              final JTextField nameField = new JTextField(15);
              inputPanel.add(nameField);
              gui.add(inputPanel, BorderLayout.NORTH);
              final DefaultListModel dfl = new DefaultListModel();
              JList jl = new JList(dfl);
              JScrollPane jsp = new JScrollPane(jl);
              gui.add(jsp);
              JPanel southPanel = new JPanel();
              southPanel.setLayout(new GridLayout(2,1));
              final JTextField errorMsg = new JTextField();
              errorMsg.setEditable(false);
              southPanel.add(errorMsg);
              JPanel buttonPanel = new JPanel();
              southPanel.add(buttonPanel);
              JButton addButton = new JButton("Add");
              addButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
                        String number = numberField.getText();
                          numberField.setText("");
                         String name = nameField.getText();
                          nameField.setText("");
                               hash.put(number, name);
                               count++;
              buttonPanel.add(addButton);
              JButton deleteButton = new JButton("Delete");
              deleteButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
              buttonPanel.add(deleteButton);
              JButton findButton = new JButton("Find");
              findButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
                        dfl.clear();
                        String temp = hashMap.get(number);
                              dfl.addElement(temp);
              buttonPanel.add(findButton);
              JButton showButton = new JButton("Show");
              showButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
                        dfl.clear();
                          for (Item p : item) {
                              dfl.addElement(p);
              buttonPanel.add(showButton);
              JButton saveButton = new JButton("Save");
              saveButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
              buttonPanel.add(saveButton);
              JButton restoreButton = new JButton("Restore");
              restoreButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
              buttonPanel.add(restoreButton);
              JButton exitButton = new JButton("Exit");
              exitButton.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        System.exit(1);
              buttonPanel.add(exitButton);
              gui.add(southPanel, BorderLayout.SOUTH);
              gui.pack();
              gui.setVisible(true);
    }I know a lot of those buttons are missing functions, but I want to get clear on how to implement a HashMap here. Any help or insight will be greatly appreciated.

    Hey thanks for that, it was some nice insight. However I'm still stumped on how HashMap needs to work in this situation. It worked fine with an object array, but this is stumping me good. To be a little more specific, I need several functions to happen with this HashMap, each correlating with a button for the GUI.
    It needs to be able to add Item objects to the HashMap (the key is the inventory number, and the value is the Item object), it needs to be able to delete an Item object (by using the inventory number), it needs to be able to find Items by inventory number, show all Items currently in the HashMap, save the info in the HashMap to a file on disk by using ObjectStreams, and a restore button just loads the data from that file to the HashMap.
    It's a lot right? :D
    I'm struggling to get anything to work with a HashMap however. If I could get some assistance with any of these functions, I would greatly appreciate it. Here's my updated code:
    import java.util.HashMap;
    import java.util.Iterator;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.Label;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.DefaultListModel;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JList;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.JScrollPane;
    public class InventoryGUI {
         //private static Item[] item = new Item[10];
         HashMap hash = new HashMap();
         private static int count = 0;
         public static void main(String[] args) {
              JFrame gui = new JFrame("Project 2 GUI");
              gui.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              JPanel inputPanel = new JPanel();
              inputPanel.setLayout(new GridLayout(5,2));
              inputPanel.add(new Label("Inventory Number"));
              final JTextField numberField = new JTextField(15);
              inputPanel.add(numberField);
              inputPanel.add(new Label("Name"));
              final JTextField nameField = new JTextField(15);
              inputPanel.add(nameField);
              inputPanel.add(new Label("Manufacturer"));
              final JTextField manField = new JTextField(15);
              inputPanel.add(manField);
              inputPanel.add(new Label("Description"));
              final JTextField descField = new JTextField(15);
              inputPanel.add(descField);
              inputPanel.add(new Label("Price"));
              final JTextField priceField = new JTextField(15);
              inputPanel.add(priceField);
              gui.add(inputPanel, BorderLayout.NORTH);
              final DefaultListModel dfl = new DefaultListModel();
              JList jl = new JList(dfl);
              JScrollPane jsp = new JScrollPane(jl);
              gui.add(jsp);
              JPanel southPanel = new JPanel();
              southPanel.setLayout(new GridLayout(2,1));
              final JTextField errorMsg = new JTextField();
              errorMsg.setEditable(false);
              southPanel.add(errorMsg);
              JPanel buttonPanel = new JPanel();
              southPanel.add(buttonPanel);
              JButton addButton = new JButton("Add");
              addButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
                        String number = numberField.getText();
                          numberField.setText("");
                         String name = nameField.getText();
                          nameField.setText("");
                         String manufacturer = manField.getText();
                          manField.setText("");
                         String description = descField.getText();
                          descField.setText("");
                         float price = Integer.parseInt(priceField.getText());
                          priceField.setText("");
                             Item myItem=new Item(number, name, manufacturer, description, price);
                               hash.put(number, myItem);
                               count++;
              buttonPanel.add(addButton);
              JButton deleteButton = new JButton("Delete");
              deleteButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
                   dfl.clear();
                   String number = numberField.getText();
                    numberField.setText("");
                   hashMap.remove(number);
              buttonPanel.add(deleteButton);
              JButton findButton = new JButton("Find");
              findButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
                        dfl.clear();
                        String number = numberField.getText();
                           numberField.setText("");
                        Item temp = new Item(hashMap.get(number));
                              dfl.addElement(temp);
              buttonPanel.add(findButton);
              JButton showButton = new JButton("Show");
              showButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
                        dfl.clear();
                          for (Item p : item) {
                              dfl.addElement(p);
              buttonPanel.add(showButton);
              JButton saveButton = new JButton("Save");
              saveButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
              buttonPanel.add(saveButton);
              JButton restoreButton = new JButton("Restore");
              restoreButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent ae) {
              buttonPanel.add(restoreButton);
              JButton exitButton = new JButton("Exit");
              exitButton.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        System.exit(1);
              buttonPanel.add(exitButton);
              gui.add(southPanel, BorderLayout.SOUTH);
              gui.pack();
              gui.setVisible(true);
    }Thanks for any help you can give me!

  • Please help with subtitles on Adobe encore 1.5

    Hello,
    I have a problem with subtitles. After I insert them to movie timeline preview shows two lines i.e.:
    "Now, that's a roar Boog." (subs)
    "12 00:01:24:00 Now, that's a roar Boog." (Don't know what's that)
    And that thing remains on DVD. Second line remains even if I turn subtitles off on DVD. Can anybody help me with this problem?
    Thanks
    Aciu (lithuanian)

    Some notes/ideas here that may help
    To
    Burn Error Proof DVDs (Well, close to error proof!)
    Use the SLOWEST possible burn option your burner will allow in Encore, since it is much better to take a bit more time burning the disc than it is to burn "fast" and have a disc that won't play
    Set the VIDEO portion of the transcoding options to a Maximum of 7,000 so your burned disc will have a better chance at playing in desktop players (which support burned discs, if at all, only as an "after thought" of the DVD specification)
    Use AC3 or PCM audio transcode settings for best player compatibility (some discussion of MPEG audio not being supported by all players, especially for NTSC discs)
    Buy and use Taiyo Yuden (or Verbatim?) brand blank discs
    Read this
    ENTIRE message
    Concerning Replication
    And this one
    About Authoring and Playing a DVD
    Discussion of
    Peak Bitrate
    Here is one
    Bit Budget Calculator

  • Help with AE and USB HD setup

    Not even sure where to begin. I guess I'm so frustrated with this whole setup.
    I went out and purchased a Airport Extreme 802.11n and a G-Tech 250GB USB 2.0 hard drive with the hope of creating a shared network drive for myself (MBP 15") and my wife Dell laptop (Win XP). I can get the AE setup for both of us to the internet without any problems. The issue is with the USB HD. Supposedly, I should just be able to connect the HD to the AE and have my MBP see it and mount it. A USB HD icon does not show up on my desktop, even when I run Airport Disk Utility. I was on the phone with the Apple Level 1 tech without success. He suggested I contact the Level 2 guys in the AM (thanks ). When I connect the HD directly to my computer, it mounts without any problems. Anybody have any thoughts of what I'm doing wrong? I can only imagine trying to set this for my wife's Windows PC later. Ugh!
    Michael
    Macbook Pro 15.4"   Mac OS X (10.4.9)  

    The following was taken from the Airport Utility's Help.
    Connecting a USB hard disk to your base station
    If your base station supports it, you can connect a USB hard disk to the USB port on your base station and computers on your network (both wired and wireless) can connect to it to access, share, and store files and data.
    Plug the hard disk into the USB port on the back of the base station. If you connect a USB hub to the base station, you can connect multiple hard disks to it, and access them from the wireless network.
    Format the hard disk using your computer. On a Macintosh, format the hard disk using Mac OS Extended. On a Computer using Windows XP, use FAT32. AirPort Utility does not support formatting disks.
    Open AirPort Utility, select your base station, and then choose Manual Setup from the Base Station menu. Enter the base station password if necessary. Click Disks in the toolbar.
    You can set access privileges for the hard disk, and give it a workgroup name on the File Sharing pane.
    AirPort Utility is located in the Utilities folder in the Applications folder on a Mac, and in Start > All Programs > AirPort on a computer using Windows.
    Setting up user accounts on your AirPort Base Station
    You can set up accounts for users of your wireless network to control how a user shares USB hard disks connected to your base station.
    To set up a user account:
    1. Open AirPort Utility, located in the Utilities folder in the Applications folder on a computer using Mac OS X, and in Start > All Programs > AirPort on a computer using Windows.
    2. Select your base station, and then choose Manual Setup from the Base Station menu. Enter the base station password if necessary.
    3. Click Disks in the toolbar, and then File Sharing.
    4. Choose "With accounts" from the Secure Shared Disks pop-up menu, and then click Configure Accounts.
    5. Click Add , enter the user name, and then give the user a password.
    6. Choose Read and Write, Read Only, or Not Allowed from the File Sharing Access pop-up menu, depending the access privileges you want to assign for this user.
    Sharing a USB hard disk on your network
    If your base station supports it, you can connect a USB hard disk to the USB port on your base station and computers on your network (both wired and wireless) can connect to it to access, share, and store files and data.
    Plug the hard disk into the USB port on the back of the base station. Open AirPort Utility, select your base station, and then choose Manual Setup from the Base Station menu. Enter the base station password if necessary. Click Disks in the toolbar.
    AirPort Utility is located in the Utilities folder in the Applications folder on a Mac, and in Start > All Programs > AirPort on a computer using Windows.
    To set up disk sharing:
    1. Click File Sharing.
    2. Choose "With a disk password," or "With base station password" if you want to secure the shared disk with a password, or choose "With accounts" if you want to secure the disk using accounts.
    3. If you choose to use accounts, click Configure Accounts, click the Add button, and then enter a name and password for each user that will access the disk.
    4. Choose "Not allowed," Read only," or "Read and write" to assign guest access to the disk.
    5. Select the "Share disks over Ethernet WAN port" checkbox if you want to provide remote access to the disk over the WAN port.
    If you connect a USB hub to the base station, you can connect multiple hard disks to it, and access them from the wireless network.

  • Help with Mathscipt and for loop

    I have a code in Mathscript/matlab and I need to output the array out. One option is my first code,the other option is using a for loop, but I am only getting the last ouput out. I need to get the whole output out.
    Any help.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Help with Mathscript_for loop.vi ‏115 KB
    Help with Mathscript_for loop2.vi ‏84 KB

    Here's how it should look like.
    Message Edited by altenbach on 10-30-2008 05:12 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    MathscriptInFOR.png ‏15 KB

  • Need help with JTextArea and Scrolling

    import java.awt.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    public class MORT_RETRY extends JFrame implements ActionListener
    private JPanel keypad;
    private JPanel buttons;
    private JTextField lcdLoanAmt;
    private JTextField lcdInterestRate;
    private JTextField lcdTerm;
    private JTextField lcdMonthlyPmt;
    private JTextArea displayArea;
    private JButton CalculateBtn;
    private JButton ClrBtn;
    private JButton CloseBtn;
    private JButton Amortize;
    private JScrollPane scroll;
    private DecimalFormat calcPattern = new DecimalFormat("$###,###.00");
    private String[] rateTerm = {"", "7years @ 5.35%", "15years @ 5.5%", "30years @ 5.75%"};
    private JComboBox rateTermList;
    double interest[] = {5.35, 5.5, 5.75};
    int term[] = {7, 15, 30};
    double balance, interestAmt, monthlyInterest, monthlyPayment, monPmtInt, monPmtPrin;
    int termInMonths, month, termLoop, monthLoop;
    public MORT_RETRY()
    Container pane = getContentPane();
    lcdLoanAmt = new JTextField();
    lcdMonthlyPmt = new JTextField();
    displayArea = new JTextArea();//DEFINE COMBOBOX AND SCROLL
    rateTermList = new JComboBox(rateTerm);
    scroll = new JScrollPane(displayArea);
    scroll.setSize(600,170);
    scroll.setLocation(150,270);//DEFINE BUTTONS
    CalculateBtn = new JButton("Calculate");
    ClrBtn = new JButton("Clear Fields");
    CloseBtn = new JButton("Close");
    Amortize = new JButton("Amortize");//DEFINE PANEL(S)
    keypad = new JPanel();
    buttons = new JPanel();//DEFINE KEYPAD PANEL LAYOUT
    keypad.setLayout(new GridLayout( 4, 2, 5, 5));//SET CONTROLS ON KEYPAD PANEL
    keypad.add(new JLabel("Loan Amount$ : "));
    keypad.add(lcdLoanAmt);
    keypad.add(new JLabel("Term of loan and Interest Rate: "));
    keypad.add(rateTermList);
    keypad.add(new JLabel("Monthly Payment : "));
    keypad.add(lcdMonthlyPmt);
    lcdMonthlyPmt.setEditable(false);
    keypad.add(new JLabel("Amortize Table:"));
    keypad.add(displayArea);
    displayArea.setEditable(false);//DEFINE BUTTONS PANEL LAYOUT
    buttons.setLayout(new GridLayout( 1, 3, 5, 5));//SET CONTROLS ON BUTTONS PANEL
    buttons.add(CalculateBtn);
    buttons.add(Amortize);
    buttons.add(ClrBtn);
    buttons.add(CloseBtn);//ADD ACTION LISTENER
    CalculateBtn.addActionListener(this);
    ClrBtn.addActionListener(this);
    CloseBtn.addActionListener(this);
    Amortize.addActionListener(this);
    rateTermList.addActionListener(this);//ADD PANELS
    pane.add(keypad, BorderLayout.NORTH);
    pane.add(buttons, BorderLayout.SOUTH);
    pane.add(scroll, BorderLayout.CENTER);
    addWindowListener( new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    String arg = lcdLoanAmt.getText();
    int combined = Integer.parseInt(arg);
    if (e.getSource() == CalculateBtn)
    try
    JOptionPane.showMessageDialog(null, "Got try here", "Error", JOptionPane.ERROR_MESSAGE);
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Got here", "Error", JOptionPane.ERROR_MESSAGE);
    if ((e.getSource() == CalculateBtn) && (arg != null))
    try{
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 1))
    monthlyInterest = interest[0] / (12 * 100);
    termInMonths = term[0] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 2))
    monthlyInterest = interest[1] / (12 * 100);
    termInMonths = term[1] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 3))
    monthlyInterest = interest[2] / (12 * 100);
    termInMonths = term[2] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Invalid Entry!\nPlease Try Again", "Error", JOptionPane.ERROR_MESSAGE);
    }                    //IF STATEMENTS FOR AMORTIZATION
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 1))
    loopy(7, 5.35);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 2))
    loopy(15, 5.5);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 3))
    loopy(30, 5.75);
    if (e.getSource() == ClrBtn)
    rateTermList.setSelectedIndex(0);
    lcdLoanAmt.setText(null);
    lcdMonthlyPmt.setText(null);
    displayArea.setText(null);
    if (e.getSource() == CloseBtn)
    System.exit(0);
    private void loopy(int lTerm,double lInterest)
    double total, monthly, monthlyrate, monthint, monthprin, balance, lastint, paid;
    int amount, months, termloop, monthloop;
    String lcd2 = lcdLoanAmt.getText();
    amount = Integer.parseInt(lcd2);
    termloop = 1;
    paid = 0.00;
    monthlyrate = lInterest / (12 * 100);
    months = lTerm * 12;
    monthly = amount *(monthlyrate/(1-Math.pow(1+monthlyrate,-months)));
    total = months * monthly;
    balance = amount;
    while (termloop <= lTerm)
    displayArea.setCaretPosition(0);
    displayArea.append("\n");
    displayArea.append("Year " + termloop + " of " + lTerm + ": payments\n");
    displayArea.append("\n");
    displayArea.append("Month\tMonthly\tPrinciple\tInterest\tBalance\n");
    monthloop = 1;
    while (monthloop <= 12)
    monthint = balance * monthlyrate;
    monthprin = monthly - monthint;
    balance -= monthprin;
    paid += monthly;
    displayArea.setCaretPosition(0);
    displayArea.append(monthloop + "\t" + calcPattern.format(monthly) + "\t" + calcPattern.format(monthprin) + "\t");
    displayArea.append(calcPattern.format(monthint) + "\t" + calcPattern.format(balance) + "\n");
    monthloop ++;
    termloop ++;
    public static void main(String args[])
    MORT_RETRY f = new MORT_RETRY();
    f.setTitle("MORTGAGE PAYMENT CALCULATOR");
    f.setBounds(600, 600, 500, 500);
    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }need help with displaying the textarea correctly and the scroll bar please.
    Message was edited by:
    new2this2020

    What's the problem you're having ???
    PS.

  • Help with encapsulation and a specific case of design

    Hello all. I have been playing with Java (my first real language and first OOP language) for a couple months now. Right now I am trying to write my first real application, but I want to design it right and I am smashing my head against the wall with my data structure, specifically with encapsulation.
    I go into detail about my app below, but it gets long so for those who don't want to read that far, let me just put these two questions up front:
    1) How do principles of encapsulation change when members are complex objects rather than primitives? If the member objects themselves have only primitive members and show good encapsulation, does it make sense to pass a reference to them? Or does good encapsulation demand that I deep-clone all the way to the bottom of my data structure and pass only cloned objects through my top level accessors? Does the analysis change when the structure gets three or four levels deep? Don't DOM structures built of walkable nodes violate basic principles of encapsulation?
    2) "Encapsulation" is sometimes used to mean no public members, othertimes to mean no public members AND no setter methods. The reasons for the first are obvious, but why go to the extreme of the latter? More importantly HOW do you go to the extreme of the latter? Would an "updatePrices" method that updates encapsulated member prices based on calculations, taking a single argument of say the time of year be considered a "setter" method that violates the stricter vision of encapsulation?
    Even help with just those two questions would be great. For the masochistic, on to my app... The present code is at
    http://www.immortalcoil.org/drake/Code.zip
    The most basic form of the application is statistics driven flash card software for Japanese Kanji (Chinese characters). For those who do not know, these are ideographic characters that represent concepts rather than sounds. There are a few thousand. In abstract terms, my data structure needs to represent the following.
    -  There are a bunch of kanji.
       Each kanji is defined by:
       -  a single character (the kanji itself); and
       -  multiple readings which fall into two categories of "on" and "kun".
          Each reading is defined by:
          -  A string of hiragana or katakana (Japanese phoenetic characters); and
          -  Statistics that I keep to represent knowledge of that reading/kanji pair.Ideally the structure should be extensible. Later I might want to add statistics associated with the character itself rather than individual readings, for example. Right now I am thinking of building a data structure like so:
    -  A Vector that holds:
       -  custom KanjiEntry objects that each hold
          -  a kanji in a primitive char value; and
          -  two (on, kun) arrays or Vectors of custom Reading objects that hold
             -  the reading in a String; and
             -  statistics of some sort, probably in primitive valuesFirst of all, is this approach sensible in the rough outlines?
    Now, I need to be able to do the obvious things... save to and load from file, generate tables and views, and edit values. The quesiton of editting values raises the questions I identified above as (1) and (2). Say I want to pull up a reading, quiz the user on it, and update its statistics based on whether the user got it right or wrong. I could do all this through the KanjiEntry object with a setter method that takes a zillion arguments like:
    theKanjiEntry.setStatistic(
    "on",   // which set of readings
    2,      // which element in that array or Vector
    "score", // which statistic
    98);      // the valueOr I could pass a clone of the Reading object out, work with that, then tell the KanjiEntry to replace the original with my modified clone.
    My instincts balk at the first approach, and a little at the second. Doesn't it make more sense to work with a reference to the Reading object? Or is that bad encapsulation?
    A second point. When running flash cards, I do not care about the subtlties of the structure, like whether a reading is an on or a kun (although this is important when browsing a table representing the entire structure). All I really care about is kanij/reading pairings. And I should be able to quickly poll the Reading objects to see which ones need quizzing the most, based on their statistics. I was thinking of making a nice neat Hashtable with the keys being the kanji characters in Strings (not the KanjiEntry objects) and the values being the Reading objects. The result would be two indeces to the Reading objects... the basic structure and my ad hoc hashtable for runninq quizzes. Then I would just make sure that they stay in sync in terms of the higher level structure (like if a whole new KanjiEntry got added). Is this bad form, or even downright dangerous?
    Apart from good form, the other consideration bouncing around in my head is that if I get all crazy with deep cloning and filling the bottom level guys with instance methods then this puppy is going to get bloated or lag when there are several thousand kanji in memory at once.
    Any help would be appreciated.
    Drake

    Usually by better design. Move methods that use the
    getters inside the class that actually has the data....
    As a basic rule of thumb:
    The one who has the data is the one using it. If
    another class needs that data, wonder what for and
    consider moving that operation away from that class.
    Or move from pull to push: instead of A getting
    something from B, have B give it to A as a method
    call argument.Thanks for the response. I think I see what you are saying.. in my case it is something like this.
    Solution 1 (disfavored):
    public class kanjiDrill{ // a chunk of Swing GUI or something
         public void runDrill(Vector kanjiEntries){
              KanjiEntry currentKanjiEntry = kanjiEntries.elementAt(0); // except really I will pick one randomly
              char theKanji = currentKanjiEntry.getKanji();
              String theReading = currentKanjiEntry.getReading();
              // build and show a flashcard based on theKanji and theReading
              // use a setter to change currentKanji's data based on whether the user answers correctly;
    }Solution 2 (favored):
    public class kanjiDrill{ // a chunk of Swing GUI or something
         public void runDrill(Vector kanjiEntries){
              KanjiEntry currentKanjiEntry = kanjiEntries.elementAt(0); // except really I will pick one randomly
              currentKanji.buildAndShowFlashcard(); // method includes updating stats
    }I can definitely see the advantages to this, but two potential reasons to think hard about it occur to me right away. First, if this process is carried out to a sufficient extreme the objects that hold my data end up sucking in all the functionality of my program and my objects stop resembling natural concepts.
    In your shopping example, say you want to generate price tags for the items. The price tags can be generated with ONLY the raw price, because we do not want the VAT on them. They are simple GIF graphics that have the price printed on a an irregular polygon. Should all that graphics generating code really go into the item objects, or should we just get the price out of the object with a simple getter method and then make the tags?
    My second concern is that the more instance methods I put into my bottom level data objects the bigger they get, and I intend to have thousands of these things in memory. Is there a balance to strike at some point?
    It's not really a setter. Outsiders are not setting
    the items price - it's rather updating its own price
    given an argument. This is exactly how it should be,
    see my above point. A breach of encapsulation would
    be: another object gets the item price, re-calculates
    it using a date it knows, and sets the price again.
    You can see yourself that pushing the date into the
    item's method is much beter than breaching
    encapsulation and getting and setting the price.So the point is not "don't allow access to the members" (which after all you are still doing, albeit less directly) so much as "make sure that any functionality implicated in working with the members is handled within the object," right? Take your shopping example. Say we live in a country where there is no VAT and the app will never be used internationally. Then we would resort to a simple setter/getter scheme, right? Or is the answer that if the object really is pure data are almost so, then it should be turned into a standard java.util collection instead of a custom class?
    Thanks for the help.
    Drake

Maybe you are looking for