How to Use the Sun Fortran Library

I wish to use the Sun Fortran Library of functions, but I am having trouble compiling my program. I would appreciate some help on selecting the proper compiler options, code modifications, etc.
My OS is Fedora 10 on a 64-bit system. I use the latest Sun Studio Express. I have used the Sun f95 compiler for quite some time as well, but this is my first use of one of the functions from the Sun Fortran Library.
Here is my first attempt after doing some unsuccessful research of my own on this issue:
PROGRAM test
IMPLICIT NONE
REAL*8 x, y
REAL*8, EXTERNAL :: d_lgamma
x=2.0
y=d_lgamma(x)
y=EXP(y)
WRITE(*,*) x, y
END PROGRAM test
Here's how I tried to compile:
f95 -lm test.f95test.o: In function `MAIN_':
test.f95:(.text+0x91): undefined reference to `d_lgamma_'
Obviously I am not doing this correctly. Is it possible that the Sun compiler and libraries have not been installed correctly on my system? How can I test if this is case?
Thank you for your help with this matter.

The routine d_lgamma_ is not supplied as part of Sun's Fortran product.
Sun's Fortran team does not maintain the library that contains that
routine. The team that does support the library has not yet ported it to
Linux. Different teams have different priorities.
In this case, there is a simple workaround. The C routine
#include <math.h>
double
d_lgamma_(double *x)
return (lgamma(*x));
implements the routine d_lgamma_.
Bob Corbett

Similar Messages

  • How to use the d3.js library with Apex Charting

    Hello.
    I am using Apex 4.1.0 with Oracle 11gR2 and Oracle App Server (mod_plsql).
    I'm trying to incorporate the d3.js library (a visulaization framework) in my Apex charts but am not having much success.
    I found this article in which David Mann uses the library within an Apex 4.x application:
    http://ba6.us/d3js_application_express_basic_dynamic_action
    I replicated his exact steps in my own application but without success. I do not see how he was able to get his application to work. Indeed, the tutorial does not even use a dynamic action despite what the article title says.
    Has any one used the d3.js library with their Apex application. If so, would you be willing to share how you went about it?
    Thank you very much.
    Elie

    EEG wrote:
    Hello fac586.
    Thank you very much for responding/helping.
    In the article I referenced I did note David's statement about using a "modern" browser with d3.js (one that recognizes css3 syntax); otherwise, the framework will not respond. And so, I was careful to run my Apex application in IE9.x as well in Firefox 16.x. But all I see is an empty region with a title. No chart. Nothing.
    I suspect my one of my problems here is in getting the chart to refresh every "n" seconds. For this, I think the dynamic action would be used, though I'm not sure how to go about doing so.That's included in the sample code (line 99). Strangely Dynamic Actions don't seem to include a native timer event...however there is a plug-in.
    More problematic, though, is that I am not seeing any chart whatsoever in the region. I would have expected to see some chart data, even if it is not automagically refreshing.
    I've created my example in my EEG workspace on apex.oracle.com:
    Workspace: EEG
    Username: [email protected]
    Password: galaxy (note: all lowercase)
    Please see application 27083 called Elie_Goodies, page 25. This page has an associated tab called, appropriately enough, "d3.js Library". The Safari console showed a couple of JavaScript errors.
    1. The URL used to include the d3 code in the blog article:
    <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>is returning HTML, not JavaScript. Changing it to that given on the d3js.org site:
    <script src="http://d3js.org/d3.v2.js"></script>includes the correct script.
    2. There was a syntax error in a script in the Run Code region. I think there was some kind of issue arising from copying from the blog article: it looked like line endings hadn't been respected as the code wasn't formatted properly. Pasting it from the blog into Coda's editor and then into the APEX Region Source text area fixed the format, and it then ran first time.
    Thanks for the heads-up. I'll also be looking further into d3.

  • How to use the CMS functionality in Sun Portal Server 7.2

    Hi All,
    How to use the CMS functionality using the ccd.war(Portlet) which is available in the library as i could add it to my channel but not able to show the functionality as it is showing the error msg "You are currently not logged in. Please login." should I create userid and there respective roles inorder to use the CMS functionality.
    Has any one used this as I could this in glass fish server.
    Any Input is appreciated.
    Thanks & regards
    Srikanth

    Have a look at the "*Roles*" section of the portal server 7.2 content management system guide
    http://docs.sun.com/source/820-4275/index.html . You can also look at [project mirage|https://mirage.dev.java.net] for some screencasts
    Alternatively,
    1. ccd.war has 3 portlets in it:
    (a) custom content definition portlet
    (b) custom content portlet
    (c) workflow portlet
    2. Inorder to work with these portlets, user needs to be in anyone of the below roles:
    (a)Consumer (b) Editor (c) Approver (d) Administrator (e) Submitter (f) Contributor (g) Publisher
    3. By default ccd.war gets deployed using a default roles file (/var/opt/SUNWportal/tmp/ccd.roles.properties)
    Note: In windows, you may not find this file
    4. Access the portlets as a user in any of the role mentioned in the ccd.roles.properties
    (OR)
    you can use a new roles file which has mapping to your custom roles. For this , undeploy existing ccd.war and deploy again with a new roles.properties file
    Hope this helps!

  • How to have 2 Users on 1 Mac and both be able to use the same iTunes Library?

    We are using 1 Mac with 2 Users, how can we both use the same iTunes Library?

    Thanks Allen, However I have found another article that best applies to my situation.
    http://support.apple.com/kb/HT1203

  • How do two users on the same iMac use the same iPhoto library?

    How do two seperate users on an Imac, use the same iphoto library? 

    See iTunes: How to share music between different user accounts on a single computer.
    tt2

  • How to rename the SharePoint Document Library existing file name using Web service

    Hi,
    How to rename the SharePoint Document Library existing file name using SharePoint Web service.
    Is it possible. How could i do it?
    Thanks & Regards
    Poomani Sankaran

    Hi,
    Lists.UpdateListItems Method
    would be helpful for your requirement.
    Here is a blog with code demo for your reference:
    http://blogs.msdn.com/b/knowledgecast/archive/2009/05/20/moss-using-the-list-web-service-to-rename-a-file.aspx
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How to use the JRun Custom tag library wiith Weblogic 5.1?

    Hello,
    is it possible to use the JRUN Tag Library with Bea Weblogic 5.1? We
    got an error message like:
    weblogic.servlet.jsp.JspException: (line -1): Error in tag library at:
    'jrun': T
    here is no setter method for property 'code', for Tag class
    'allaire.taglib.Serv
    letTag'
    Thank you for any info!
    Stefan

    Hi Joe,
    I don't know, however someone that follows the JSP newsgroup [1] may be
    able to help. Could you try your post there.
    Thanks,
    Bruce
    [1]
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.jsp
    Joe Kamenar wrote:
    >
    I have a question. I need to do a sort on news articles in our database, sorting
    by the date they were posted. I then want to take only the top 6 articles. We
    are using Weblogic 5.1. When I use the following statement, 6 articles are taken
    from the database, then sorted, which ends up leaving out the most recent articles:
    <cm:select contentHome="com.beasys.commerce.axiom.document.Document" query="<%=contentQuery%>"
    sortby = "creationDate DESC, headlineDate DESC" max="6" id="contentList" />
    I need to get ALL the articles for the sort, then just take the most recent 6.
    So, I know that I can use the following code and monitor the counter variable,
    "i". But, how do i do this to only display the top 6 items?
    <es:foreachinarray id="content" array="contentList" type="com.beasys.commerce.axiom.content.Content"
    counterId="i">
    <% myStr=content.getIdentifier(); %>
    <% if (i<6) {
    %>
    <div class="marginText">
    <cm:printproperty id="content" name="title" encode="html" />  
    <a href="<%=new String(news_display.jsp?id="+myStr)%">">more</a>
    </div>
    <% } %>
    </es:foreachinarray>
    However, when I run this, no results show up. What is the correct way to do this?
    - Joe</a>

  • How to use the JRun Custom tag library with Weblogic 5.1?

    Hello,
              is it possible to use the JRUN Tag Library with Bea Weblogic 5.1? We
              got an error message like:
              weblogic.servlet.jsp.JspException: (line -1): Error in tag library at:
              'jrun': T
              here is no setter method for property 'code', for Tag class
              'allaire.taglib.Serv
              letTag'
              Thank you for any info!
              Stefan
              

    Hi Joe,
    I don't know, however someone that follows the JSP newsgroup [1] may be
    able to help. Could you try your post there.
    Thanks,
    Bruce
    [1]
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.jsp
    Joe Kamenar wrote:
    >
    I have a question. I need to do a sort on news articles in our database, sorting
    by the date they were posted. I then want to take only the top 6 articles. We
    are using Weblogic 5.1. When I use the following statement, 6 articles are taken
    from the database, then sorted, which ends up leaving out the most recent articles:
    <cm:select contentHome="com.beasys.commerce.axiom.document.Document" query="<%=contentQuery%>"
    sortby = "creationDate DESC, headlineDate DESC" max="6" id="contentList" />
    I need to get ALL the articles for the sort, then just take the most recent 6.
    So, I know that I can use the following code and monitor the counter variable,
    "i". But, how do i do this to only display the top 6 items?
    <es:foreachinarray id="content" array="contentList" type="com.beasys.commerce.axiom.content.Content"
    counterId="i">
    <% myStr=content.getIdentifier(); %>
    <% if (i<6) {
    %>
    <div class="marginText">
    <cm:printproperty id="content" name="title" encode="html" />  
    <a href="<%=new String(news_display.jsp?id="+myStr)%">">more</a>
    </div>
    <% } %>
    </es:foreachinarray>
    However, when I run this, no results show up. What is the correct way to do this?
    - Joe</a>

  • How To Use The Same Library - MacBook Pro's And Windows XP Pro?

    Background:  I have a fully configured MacBook Pro running OS X 10.8.3. Also, I run Windows XP Pro SP3 using Parallels Desktop. My primary iTunes Library and all content is stored on an external hard disk and the iTunes is "pointed" to that location by setting the iTunes' Preferences' Advanced Settings to the full path where the Library is located. Everything I have inside iTunes works perfect - the size if the Library is over 225GB!
    BUT, when I install and use iTunes on my Windows XP Pro operating system (under Parallels), the contents of the Library SEEMS to work okay (while I'm in Windows) but the Windows' iTunes Library location in Preferences' Advance Tab is NOT THE SAME LOCATION AS IS THE MAC's LIBRARY LOCATION! It is not at the same location as my main/primary iTunes Library is "pointed to".
    The problem occurs when I close Windows and return to the Mac OS X and then try to use my primary iTunes. All of the contents (and any content) within iTunes no longer work! When I attempt to play ANY song, movie, TV show, music video, audiobook, etc., a message pops up saying in effect "Location of 'x' can't be found, do you want to locate it?" I can then click 'yes' and navigate to the Library file that contains the song's file and it will then play fine, as it should. BUT, ONLY THAT SINGLE SONG WILL WORK - THE REMAINING 225GB STILL DON'T WORK!!!
    So, I am forced to go into iTunes' Preferences' Advanced tab and click on "Change Location" then navigate to the proper library file (NOTE, THE LOCATION HAD BEEN CHANGED TO THE LOCATION FOR THE WINDOWS' LIBRARY LOCATION!!!)! Doing this corrects the primary iTunes functionality, but only after being forced to deleting the "iTunes Media Folder", quit iTunes, restart iTunes and Consolidate the Library - a whole bunch of steps and time to get back to "normal"!!!!!
    Again, this all happens by going into Windows, opening its iTunes, then THAT triggers the entire scenario I've described above - EVERY TIME!
    Thus, I avoid iTunes when I go into Windows, but I should NOT have to avoid using iTunes inside Windows! I hope I have described the problem/issues well enough that someone of you experts can provide a practical solution for me.
    A potential remedy I've thought of is:  Go into Windows' iTunes then go into its Preferences' Advance tab and change ITS location to be the exact same location as the primary Mac OS X's, click OK, then immediately close that iTunes.
              DOES THIS SOUND LIKE IT WILL WORK - I.e., USING THE EXACT SAME LIBRARY LOCATION FOR BOTH iTUNES?????
              IF THIS WOULD WORK, WHAT ELSE MUST I DO TO EITHER iTUNES OR TO BOTH iTUNES TO USE BOTH iTUNES
              USING THE SAME LIBRARY???
    Thank you for any suggested solutions - VERY MUCH!
    Larry

    Note that sharing a folder between different OS that use different file paths is not recommended as some files can have an absolute path or other OS specific data.
    You can click the Choose Folder button if you want to create or use a folder in a different location.<br />
    Make sure to select an empty folder (you need to create this folder in advance) and not a folder that already has files as Firefox will use the specified location in this case.
    *http://kb.mozillazine.org/Profile_Manager
    You can also create a new profile via the command line.
    *https://developer.mozilla.org/Command_Line_Options
    You can consider to use Sync to sync the two profiles

  • How to use the Wire-Tag in Cairngorm 3 Observer Library?

    Dear Observer-Lib coders,
    Maybe I am posting my issue into the wrong forum, see this thread:
    http://forums.adobe.com/thread/756046
    I'd like to know how to use the Wire-Tag mentioned in the Observer-Lib docu, see:
    http://sourceforge.net/adobe/cairngorm/wiki/HowToUseCairngormObserver/
    Please let me know if there is anybody who knows how to use
    this Wire-tag. A small code example would be great, too!
    Thank you,
    masu

    Ok ... I solved it!
    see this thread: http://forums.adobe.com/thread/756046

  • How to use one I-tunes library with multiple windows users (family) on 1 pc

    On our family pc we log in with different accounts. We want to use I-Tunes but all have the same library. I tried to create a library not in the users directory, but in the All Users folder that is accessible for everyone. However, when I import the music in the library for one user and set the same location for another user, I-tunes does not recognize the library. So everyone has to create it's own library.
    What are the best practices to overcome this?

    Keep in mind that what you have done now is you have multiple iTunes libraries accessing the same media folder. Meaning, that each account can have their own ratings, playlists, etc. but more importantly, each account does NOT know what the other account does, so if your daughter adds a CD to her account, it will go into the shared folder, but it will NOT automatically go into your wife's iTunes library. She would have to add it manually. Likewise, if one account deletes music from their library and tells iTunes to remove it to the trash, the other accounts will not know and iTunes will still try to access the file from the shared location even though the file is now trashed.
    Each account has their own database files (.itl files in the iTunes folder) which stores this stuff.
    If you want to have everyone use the exact same library which means the same ratings, playlists, etc. then you need to move the database files into that same location and set each iTunes account to read the same data.
    How to open an alternate iTunes Library file or create a new one
    http://docs.info.apple.com/article.html?artnum=304447
    Patrick

  • JNI - How to use the error reporting mechanism?

    I've developed a C++ DLL which is loaded from a commercial Win32 application (not written by me) as a plug-in for external calculations. On its initialization the C++ DLL launches the Java VM via the JNI invocation interface. When the DLL functions are called by the application, they forward the calls to Java objects inside the Java VM, again via JNI invocation interface.
    This works well, but I have encountered a weird error.
    From Java I open a JFrame containing a JTextArea as small console for debug output messages. If I turn output to this debug console off (my printToConsole routine checks whether a boolean flag is set), the string concatenation operator may lead to a crash of the Java VM.
    For example, if in one of the Java functions called from the
    DLL via JNI invocation interface the following is the first statement,
    it leads to a crash of the Java VM and the application that loaded the C++ proxy DLL.
    String test=""+Math.random(); // String test not used later
    Interestingly, if I comment this statement out, the Java code works fine WITHOUT any crash. I've already thought about potential races and synchronization issues in my code, but I don't see where this is the case. And the string concatenation error fails as well, if I insert sleep() statements in front of it and at other places in the code. However, if I turn on log messages printed to my JFrame debug console (containing a JTextArea), the String concatenation works without problems.
    So maybe the JNI interface has a bug and affects the Java VM; I don't see where my JNI code is wrong.
    One problem is that I do not get any stdout output, as the C++ proxy DLL is loaded by the Windows application, even if I start the Windows application from the DOS command line (under Windows).
    Does anyone know how to use the error reporting mechanism?
    http://java.sun.com/j2se/1.4.2/docs/guide/vm/error-handling.html
    Is it possible that the JVM, when it crashes, writes debug information about the crash into a file instead of stdout/stderr?
    My C++ proxy DLL was compiled in debug mode, but the commercial application (which loaded the DLL) is very likely not.
    I do not know hot to find the reason why the String concatenation fails inside the Java function called from the C++ DLL via JNI.

    Yes, I've initially thought about errors in the C++ code too. But the C++ code is actually very simple and short. It doesn't allocate anything on the C++ side. It allocates a couple of ByteBuffers inside the Java VM however via JNI invocation interface calls of env->NewDirectByteBuffer(). The native memory regions accessed via the ByteBuffers are allocated not by my own C++ code, but by the program that calls my DLL (the program is Metastock).
    The interesting thing is that everything works fine if output to my debug console is enabled, which means that in the Java print routine getConsoleLoggingState() returns true and text is appended to the jTextArea.
    static synchronized void print(String str)
    { MetaStockMonitor mMon=getInstance();
    if ( mMon.getFileLoggingState() && mMon.logFileWriter!=null) {
    mMon.logFileWriter.print(str);
    mMon.logFileWriter.flush();
    if ( mMon.getConsoleLoggingState() ) {
    mMon.jTextArea1.append(str);
    Only if output to the JTextArea is turned off (ie. getConsoleLoggingState()==false), the crash happens when the FIRST statement in the Java routine called via JNI invocation interface is a (useless) String concatenation operation, as described above.
    String test=""+Math.random(); // String test not used later
    Moreover, the crash happens BEFORE the allocated ByteBuffer objects are accessed in the Java code. But again, if console output is turned on, it works stable. If console output is turned off, it works when the (useless) String concatenation operation is removed in the Java routine called from C++.
    I've already thought about potential races (regarding multiple threads), but this can be ruled out in my case. It almost appears as if the JVM can have problems when called by the invocation interface (I tested it with Java 1.4.2 b28).
    All the calls between C++ and Java go ALWAYS in the direction from C++ code to Java. Unfortunately, there is no special JRE version with extensive logging capabilities to facilitate debugging. And the problem is not easily reproducible either.
    JNIEnv* JNI_GetEnv()
    JNIEnv *env;
    cached_jvm->AttachCurrentThread((void**)&env,NULL);
    fprintf(logfile,"env=%i\n",env);
    fflush(logfile);
    return env;
    // function called by Metastock's MSX plug-in interface
    BOOL __stdcall createIndEngine (const MSXDataRec *a_psDataRec,
    const MSXDataInfoRecArgsArray *a_psDataInfoArgs,
    const MSXNumericArgsArray *a_psNumericArgs,
    const MSXStringArgsArray *a_psStringArgs,
    const MSXCustomArgsArray *a_psCustomArgs,
    MSXResultRec *a_psResultRec)
    a_psResultRec->psResultArray->iFirstValid=0;
    a_psResultRec->psResultArray->iLastValid=-1;
    jthrowable ex;
    jmethodID mid;
    JNIEnv* env=JNI_GetEnv();
    jobject chart=getChart(env, a_psDataRec);
    if ( chart==NULL) {
    return MSX_ERROR;
    jobject getChart (JNIEnv* env, const MSXDataRec *a_psDataRec)
    jthrowable ex;
    jmethodID mid;
    int closeFirstValid, closeLastValid;
    closeFirstValid=a_psDataRec->sClose.iFirstValid;
    closeLastValid=a_psDataRec->sClose.iLastValid;
    long firstDate, firstTime;
    if (closeFirstValid>=1 && closeFirstValid<=closeLastValid) {
    firstDate = a_psDataRec->psDate[closeFirstValid].lDate;
    firstTime = a_psDataRec->psDate[closeFirstValid].lTime;
    } else {
    firstDate=0;
    firstTime=0;
    jclass chartFactoryClass = env->FindClass("wschwendt/metastock/msx/ChartFactory");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find class ChartFactory\n");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetStaticMethodID(chartFactoryClass, "getInstance", "()Lwschwendt/metastock/msx/ChartFactory;");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getInstance()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject chartFactory=env->CallStaticObjectMethod(chartFactoryClass, mid);
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getInstance()");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetMethodID(chartFactoryClass, "getChartID", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IIIIIII)F");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getChartID()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject symbolBuf=env->NewDirectByteBuffer(a_psDataRec->pszSymbol, strlen(a_psDataRec->pszSymbol) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate symbolBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityNameBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityName, strlen(a_psDataRec->pszSecurityName) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityNameBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityPathBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityPath, strlen(a_psDataRec->pszSecurityPath) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityPathBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityOnlineSourceBuf=env->NewDirectByteBuffer(a_psDataRec->pszOnlineSource, strlen(a_psDataRec->pszOnlineSource) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate onlineSourceBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    // Java Function call leads to crash, if console output is turned off and
    // the first statement in the Java routine is a (useless) string concatenation.
    // Otherwise it works stable.
    jfloat chartID=env->CallFloatMethod(chartFactory, mid, securityNameBuf, symbolBuf,
    securityPathBuf, securityOnlineSourceBuf, (jint)(a_psDataRec->iPeriod),
    (jint)(a_psDataRec->iInterval), (jint)(a_psDataRec->iStartTime),
    (jint)(a_psDataRec->iEndTime), (jint)(a_psDataRec->iSymbolType),
    (jint)firstDate, (jint)firstTime );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getChartID()");
    printSBufViaJava(sbuf);
    return NULL;

  • I and my brother have different apple id's but are using the single itunes library on our home PC.When i am syncing my iphone most of the times the apps that were purchased with my brothers apple id is also getting on my iphone.

    i and my brother have different apple id's but are using the single itunes library on our home PC.When i am syncing my iphone most of the times the apps that were purchased with my brothers apple id is also getting on my iphone.
    How do i differentiate the apps that were purchased with my apple id and sync accordingly.As i want only the apps that were purchased in my apple id.
    I am aware of the fact that i can click on the app and check with "getinfo" to see with whose apple id it is brought.but there are hundreds app which i cannot check one by one.
    How do i filter the apps with apple id and sync?

    Connect the device to the computer.
    Open iTunes.
    Select the content desired to sync.
    Sync.

  • How to use the static lib of berkeleydb in VC6?

    I know there is a libdb45s.lib. But when I try to link my project to it, VC6 reports many errors. Even the getting start examples cannot link correctly. The documents coming with berkeley db do not tell me how to link project to the lib, no matter static or dynamic.
    Could anyone tell me how to use the static lib libdb45s.lib and how to link it properly?
    OS: Windows XP pro SP2
    IDE: Virsual C++ 6.0 sp6
    BDB: 4.5.20
    Here is what I have done to link the libdb45s.lib:
    1.Add BDB related diretorys to VC6 link/lib dirs
    2.Add #include <db.c> to my .cpp file, I use the C API
    3.Change Project Options
    Link-> Libs/Objects-> add "libdb45s.lib"
    C/C++-> code generation-> Use Run Time Library-> MutiThreaded
    Link-> Ignore Library-> MSVCRT
    4.Build, here is the output, hope it would be some help:
    --------------------Configuration: wordseg - Win32
    Release--------------------
    Linking...
    LINK : warning LNK4049: locally defined symbol
    "_fflush" imported
    LINK : warning LNK4049: locally defined symbol "__iob"
    imported
    LINK : warning LNK4049: locally defined symbol
    "__errno" imported
    LINK : warning LNK4049: locally defined symbol
    "_malloc" imported
    LINK : warning LNK4049: locally defined symbol
    "_realloc" imported
    LINK : warning LNK4049: locally defined symbol "_free"
    imported
    LINK : warning LNK4049: locally defined symbol
    "_fclose" imported
    LINK : warning LNK4049: locally defined symbol
    "_fopen" imported
    LINK : warning LNK4049: locally defined symbol
    "__pctype" imported
    LINK : warning LNK4049: locally defined symbol
    "___mb_cur_max" imported
    LINK : warning LNK4049: locally defined symbol
    "__isctype" imported
    LINK : warning LNK4049: locally defined symbol
    "_strchr" imported
    LINK : warning LNK4049: locally defined symbol
    "_printf" imported
    LINK : warning LNK4049: locally defined symbol
    "_strncmp" imported
    LINK : warning LNK4049: locally defined symbol
    "_strncpy" imported
    LINK : warning LNK4049: locally defined symbol "_atol"
    imported
    LINK : warning LNK4049: locally defined symbol
    "_getenv" imported
    LINK : warning LNK4049: locally defined symbol
    "__open" imported
    LINK : warning LNK4049: locally defined symbol
    "__close" imported
    LINK : warning LNK4049: locally defined symbol
    "_strftime" imported
    LINK : warning LNK4049: locally defined symbol
    "_memmove" imported
    LINK : warning LNK4049: locally defined symbol
    "_strtoul" imported
    LINK : warning LNK4049: locally defined symbol
    "_fwrite" imported
    LINK : warning LNK4049: locally defined symbol
    "_fgetc" imported
    LINK : warning LNK4049: locally defined symbol
    "_strtol" imported
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved
    external symbol __imp__strerror
    libdb45s.lib(db_getlong.obj) : error LNK2001:
    unresolved external symbol __imp__strerror
    libdb45s.lib(qam_verify.obj) : error LNK2001:
    unresolved external symbol __imp___snprintf
    libdb45s.lib(mp_mvcc.obj) : error LNK2001: unresolved
    external symbol __imp___snprintf
    libdb45s.lib(repmgr_util.obj) : error LNK2001:
    unresolved external symbol __imp___snprintf
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp___snprintf
    libdb45s.lib(env_region.obj) : error LNK2001:
    unresolved external symbol __imp___snprintf
    libdb45s.lib(log_put.obj) : error LNK2001: unresolved
    external symbol __imp___snprintf
    libdb45s.lib(qam_files.obj) : error LNK2001:
    unresolved external symbol __imp___snprintf
    libdb45s.lib(db.obj) : error LNK2001: unresolved
    external symbol __imp___snprintf
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved
    external symbol __imp___snprintf
    libdb45s.lib(db_pr.obj) : error LNK2001: unresolved
    external symbol __imp___snprintf
    libdb45s.lib(env_failchk.obj) : error LNK2001:
    unresolved external symbol __imp___snprintf
    libdb45s.lib(env_register.obj) : error LNK2001:
    unresolved external symbol __imp___snprintf
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved
    external symbol __imp___vsnprintf
    libdb45s.lib(log_debug.obj) : error LNK2001:
    unresolved external symbol __imp___vsnprintf
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved
    external symbol __imp__vfprintf
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved
    external symbol __imp__fprintf
    libdb45s.lib(db_pr.obj) : error LNK2001: unresolved
    external symbol __imp__fprintf
    libdb45s.lib(db_getlong.obj) : error LNK2001:
    unresolved external symbol __imp__fprintf
    libdb45s.lib(os_errno.obj) : error LNK2001: unresolved
    external symbol __imp__WSASetLastError@4
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__WSAGetLastError@0
    libdb45s.lib(os_errno.obj) : error LNK2001: unresolved
    external symbol __imp__WSAGetLastError@0
    libdb45s.lib(repmgr_method.obj) : error LNK2001:
    unresolved external symbol __imp__WSAGetLastError@0
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol __imp__WSAGetLastError@0
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__WSAGetLastError@0
    libdb45s.lib(env_open.obj) : error LNK2001: unresolved
    external symbol __imp__strncat
    libdb45s.lib(mut_win32.obj) : error LNK2001:
    unresolved external symbol __imp___getpid
    libdb45s.lib(os_pid.obj) : error LNK2001: unresolved
    external symbol __imp___getpid
    libdb45s.lib(txn_chkpt.obj) : error LNK2001:
    unresolved external symbol __imp__time
    libdb45s.lib(env_stat.obj) : error LNK2001: unresolved
    external symbol __imp__time
    libdb45s.lib(rep_record.obj) : error LNK2001:
    unresolved external symbol __imp__time
    libdb45s.lib(rep_backup.obj) : error LNK2001:
    unresolved external symbol __imp__time
    libdb45s.lib(env_recover.obj) : error LNK2001:
    unresolved external symbol __imp__time
    libdb45s.lib(txn_region.obj) : error LNK2001:
    unresolved external symbol __imp__time
    libdb45s.lib(log.obj) : error LNK2001: unresolved
    external symbol __imp__time
    libdb45s.lib(rep_region.obj) : error LNK2001:
    unresolved external symbol __imp__time
    libdb45s.lib(db_stati.obj) : error LNK2001: unresolved
    external symbol __imp__time
    libdb45s.lib(rep_util.obj) : error LNK2001: unresolved
    external symbol __imp__time
    libdb45s.lib(env_region.obj) : error LNK2001:
    unresolved external symbol __imp__time
    libdb45s.lib(txn.obj) : error LNK2001: unresolved
    external symbol __imp__time
    libdb45s.lib(db_idspace.obj) : error LNK2001:
    unresolved external symbol __imp__qsort
    libdb45s.lib(log_archive.obj) : error LNK2001:
    unresolved external symbol __imp__qsort
    libdb45s.lib(db_join.obj) : error LNK2001: unresolved
    external symbol __imp__qsort
    libdb45s.lib(mp_mvcc.obj) : error LNK2001: unresolved
    external symbol __imp__qsort
    libdb45s.lib(db_meta.obj) : error LNK2001: unresolved
    external symbol __imp__qsort
    libdb45s.lib(lock_list.obj) : error LNK2001:
    unresolved external symbol __imp__qsort
    libdb45s.lib(mp_sync.obj) : error LNK2001: unresolved
    external symbol __imp__qsort
    libdb45s.lib(txn_stat.obj) : error LNK2001: unresolved
    external symbol __imp__qsort
    libdb45s.lib(rep_record.obj) : error LNK2001:
    unresolved external symbol __imp__qsort
    libdb45s.lib(os_config.obj) : error LNK2001:
    unresolved external symbol __imp__wcscmp
    libdb45s.lib(env_config.obj) : error LNK2001:
    unresolved external symbol __imp__fgets
    libdb45s.lib(repmgr_method.obj) : error LNK2001:
    unresolved external symbol __imp__gethostname@8
    libdb45s.lib(os_open.obj) : error LNK2001: unresolved
    external symbol __imp___snwprintf
    libdb45s.lib(os_map.obj) : error LNK2001: unresolved
    external symbol __imp___snwprintf
    libdb45s.lib(os_unlink.obj) : error LNK2001:
    unresolved external symbol __imp___snwprintf
    libdb45s.lib(os_dir.obj) : error LNK2001: unresolved
    external symbol __imp___snwprintf
    libdb45s.lib(os_map.obj) : error LNK2001: unresolved
    external symbol __imp__wcsrchr
    libdb45s.lib(log_archive.obj) : error LNK2001:
    unresolved external symbol __imp___getcwd
    libdb45s.lib(lock_stat.obj) : error LNK2001:
    unresolved external symbol __imp__localtime
    libdb45s.lib(qam_files.obj) : error LNK2001:
    unresolved external symbol __imp__strrchr
    libdb45s.lib(ctime.obj) : error LNK2001: unresolved
    external symbol __imp__ctime
    libdb45s.lib(os_clock.obj) : error LNK2001: unresolved
    external symbol __imp___ftime
    libdb45s.lib(os_uid.obj) : error LNK2001: unresolved
    external symbol __imp__rand
    libdb45s.lib(os_uid.obj) : error LNK2001: unresolved
    external symbol __imp__srand
    libdb45s.lib(repmgr_msg.obj) : error LNK2001:
    unresolved external symbol __imp__ntohs@4
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol __imp__ioctlsocket@12
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol __imp__WSACleanup@0
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__WSACleanup@0
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol __imp__WSAStartup@8
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol __imp__WSASend@28
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol __imp__WSARecv@28
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol
    __imp__WSAEnumNetworkEvents@12
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol
    __imp__WSAWaitForMultipleEvents@20
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol __imp__WSAEventSelect@12
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__WSAEventSelect@12
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__WSAEventSelect@12
    libdb45s.lib(repmgr_windows.obj) : error LNK2001:
    unresolved external symbol __imp__WSACreateEvent@0
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__WSACreateEvent@0
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__WSACloseEvent@4
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__WSACloseEvent@4
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__closesocket@4
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__closesocket@4
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__accept@12
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__connect@12
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__socket@12
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__socket@12
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__htonl@4
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__htonl@4
    libdb45s.lib(getaddrinfo.obj) : error LNK2001:
    unresolved external symbol __imp__htonl@4
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__ntohl@4
    libdb45s.lib(repmgr_sel.obj) : error LNK2001:
    unresolved external symbol __imp__send@16
    libdb45s.lib(repmgr_util.obj) : error LNK2001:
    unresolved external symbol __imp__htons@4
    libdb45s.lib(getaddrinfo.obj) : error LNK2001:
    unresolved external symbol __imp__htons@4
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__listen@8
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__bind@12
    libdb45s.lib(repmgr_net.obj) : error LNK2001:
    unresolved external symbol __imp__setsockopt@20
    libdb45s.lib(getaddrinfo.obj) : error LNK2001:
    unresolved external symbol __imp__gethostbyname@4
    libdb45s.lib(getaddrinfo.obj) : error LNK2001:
    unresolved external symbol __imp__inet_addr@4
    Release/wordseg.exe : fatal error LNK1120: 47
    unresolved externals
    Error executing link.exe.
    wordseg.exe - 100 error(s), 25 warning(s)

    After adding MsWSock.Lib, WSock32.Lib, build returns following errors:
    (error count reduced from 100 to 71)
    --------------------Configuration: wordsegzjp - Win32 Release--------------------
    Compiling...
    main.cpp
    Linking...
    LINK : warning LNK4049: locally defined symbol "_fflush" imported
    LINK : warning LNK4049: locally defined symbol "__iob" imported
    LINK : warning LNK4049: locally defined symbol "_malloc" imported
    LINK : warning LNK4049: locally defined symbol "_realloc" imported
    LINK : warning LNK4049: locally defined symbol "_free" imported
    LINK : warning LNK4049: locally defined symbol "_fclose" imported
    LINK : warning LNK4049: locally defined symbol "_fopen" imported
    LINK : warning LNK4049: locally defined symbol "__pctype" imported
    LINK : warning LNK4049: locally defined symbol "___mb_cur_max" imported
    LINK : warning LNK4049: locally defined symbol "__isctype" imported
    LINK : warning LNK4049: locally defined symbol "_strchr" imported
    LINK : warning LNK4049: locally defined symbol "_printf" imported
    LINK : warning LNK4049: locally defined symbol "_strncmp" imported
    LINK : warning LNK4049: locally defined symbol "_strncpy" imported
    LINK : warning LNK4049: locally defined symbol "_atol" imported
    LINK : warning LNK4049: locally defined symbol "_getenv" imported
    LINK : warning LNK4049: locally defined symbol "__open" imported
    LINK : warning LNK4049: locally defined symbol "__close" imported
    LINK : warning LNK4049: locally defined symbol "_strftime" imported
    LINK : warning LNK4049: locally defined symbol "_memmove" imported
    LINK : warning LNK4049: locally defined symbol "_strtoul" imported
    LINK : warning LNK4049: locally defined symbol "_fwrite" imported
    LINK : warning LNK4049: locally defined symbol "_fgetc" imported
    LINK : warning LNK4049: locally defined symbol "_strtol" imported
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved external symbol __imp__strerror
    libdb45s.lib(db_getlong.obj) : error LNK2001: unresolved external symbol __imp__strerror
    libdb45s.lib(qam_verify.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(mp_mvcc.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(repmgr_util.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(repmgr_net.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(env_region.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(log_put.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(qam_files.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(db.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(db_pr.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(env_failchk.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(env_register.obj) : error LNK2001: unresolved external symbol __imp___snprintf
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved external symbol __imp___vsnprintf
    libdb45s.lib(log_debug.obj) : error LNK2001: unresolved external symbol __imp___vsnprintf
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved external symbol __imp__vfprintf
    libdb45s.lib(db_err.obj) : error LNK2001: unresolved external symbol __imp__fprintf
    libdb45s.lib(db_pr.obj) : error LNK2001: unresolved external symbol __imp__fprintf
    libdb45s.lib(db_getlong.obj) : error LNK2001: unresolved external symbol __imp__fprintf
    libdb45s.lib(os_errno.obj) : error LNK2001: unresolved external symbol __imp___errno
    libdb45s.lib(env_open.obj) : error LNK2001: unresolved external symbol __imp__strncat
    libdb45s.lib(mut_win32.obj) : error LNK2001: unresolved external symbol __imp___getpid
    libdb45s.lib(os_pid.obj) : error LNK2001: unresolved external symbol __imp___getpid
    libdb45s.lib(txn_chkpt.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(env_stat.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(rep_record.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(rep_backup.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(env_recover.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(txn_region.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(log.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(rep_region.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(db_stati.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(rep_util.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(env_region.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(txn.obj) : error LNK2001: unresolved external symbol __imp__time
    libdb45s.lib(db_idspace.obj) : error LNK2001: unresolved external symbol __imp__qsort
    libdb45s.lib(log_archive.obj) : error LNK2001: unresolved external symbol __imp__qsort
    libdb45s.lib(db_join.obj) : error LNK2001: unresolved external symbol __imp__qsort
    libdb45s.lib(mp_mvcc.obj) : error LNK2001: unresolved external symbol __imp__qsort
    libdb45s.lib(db_meta.obj) : error LNK2001: unresolved external symbol __imp__qsort
    libdb45s.lib(lock_list.obj) : error LNK2001: unresolved external symbol __imp__qsort
    libdb45s.lib(mp_sync.obj) : error LNK2001: unresolved external symbol __imp__qsort
    libdb45s.lib(txn_stat.obj) : error LNK2001: unresolved external symbol __imp__qsort
    libdb45s.lib(rep_record.obj) : error LNK2001: unresolved external symbol __imp__qsort
    libdb45s.lib(os_config.obj) : error LNK2001: unresolved external symbol __imp__wcscmp
    libdb45s.lib(env_config.obj) : error LNK2001: unresolved external symbol __imp__fgets
    libdb45s.lib(os_open.obj) : error LNK2001: unresolved external symbol __imp___snwprintf
    libdb45s.lib(os_map.obj) : error LNK2001: unresolved external symbol __imp___snwprintf
    libdb45s.lib(os_unlink.obj) : error LNK2001: unresolved external symbol __imp___snwprintf
    libdb45s.lib(os_dir.obj) : error LNK2001: unresolved external symbol __imp___snwprintf
    libdb45s.lib(os_map.obj) : error LNK2001: unresolved external symbol __imp__wcsrchr
    libdb45s.lib(log_archive.obj) : error LNK2001: unresolved external symbol __imp___getcwd
    libdb45s.lib(lock_stat.obj) : error LNK2001: unresolved external symbol __imp__localtime
    libdb45s.lib(qam_files.obj) : error LNK2001: unresolved external symbol __imp__strrchr
    libdb45s.lib(ctime.obj) : error LNK2001: unresolved external symbol __imp__ctime
    libdb45s.lib(os_clock.obj) : error LNK2001: unresolved external symbol __imp___ftime
    libdb45s.lib(os_uid.obj) : error LNK2001: unresolved external symbol __imp__rand
    libdb45s.lib(os_uid.obj) : error LNK2001: unresolved external symbol __imp__srand
    libdb45s.lib(repmgr_windows.obj) : error LNK2001: unresolved external symbol __imp__WSASend@28
    libdb45s.lib(repmgr_windows.obj) : error LNK2001: unresolved external symbol __imp__WSARecv@28
    libdb45s.lib(repmgr_windows.obj) : error LNK2001: unresolved external symbol __imp__WSAEnumNetworkEvents@12
    libdb45s.lib(repmgr_windows.obj) : error LNK2001: unresolved external symbol __imp__WSAWaitForMultipleEvents@20
    libdb45s.lib(repmgr_windows.obj) : error LNK2001: unresolved external symbol __imp__WSAEventSelect@12
    libdb45s.lib(repmgr_sel.obj) : error LNK2001: unresolved external symbol __imp__WSAEventSelect@12
    libdb45s.lib(repmgr_net.obj) : error LNK2001: unresolved external symbol __imp__WSAEventSelect@12
    libdb45s.lib(repmgr_windows.obj) : error LNK2001: unresolved external symbol __imp__WSACreateEvent@0
    libdb45s.lib(repmgr_sel.obj) : error LNK2001: unresolved external symbol __imp__WSACreateEvent@0
    libdb45s.lib(repmgr_sel.obj) : error LNK2001: unresolved external symbol __imp__WSACloseEvent@4
    libdb45s.lib(repmgr_net.obj) : error LNK2001: unresolved external symbol __imp__WSACloseEvent@4
    Release/wordsegzjp.exe : fatal error LNK1120: 28 unresolved externals
    Error executing link.exe.
    wordsegzjp.exe - 71 error(s), 24 warning(s)

  • How to use the namespace with a parser?

    I want to use the namespace in my project. For this reason, I use a sample
    from
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/7b_pe.html
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom/5_ns.html
    to test my understanding.
    The slideshow2.dtd refer to the definition in 'xhtml.dtd'. Because in these
    two files, they all use the 'title' as the element names. To solve these
    conflicts, The namespace is used to qualified the one in slideshow2.dtd.
    But the parser still complain that the 'title' in slideshow2.dtd is declared
    more than once.
    I use apache's Xerces.
    I want to know if Xereces realy support namespace spec. now, or how to use
    the namespace with a parser. Can anyone kindly tell me where to find some
    material that demo the use of namespace in Java program.
    Thanks for any help!!!
    #############FILE: slideshow2.dtd ###############
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT slideshow (slide+)>
    <!ELEMENT slide (title?, item*)>
    <!ENTITY % xhtml SYSTEM "xhtml.dtd">
    %xhtml;
    <!ELEMENT title (#PCDATA)*>
    <!ATTLIST title
    xmlns CDATA #FIXED "http://www.example.com/slideshow"
    >
    <!ELEMENT item (#PCDATA)>
    ##############FILE: xhtml.dtd #########################
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT html (head)>
    <!ATTLIST html
    xmlns CDATA #FIXED "http://www.example.com/xhtml"
    >
    <!ELEMENT head (title,style*)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT style (#PCDATA)>
    #############FILE: slideshow.xml ####################
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE slideshow SYSTEM "slideshow2.dtd">
    <slideshow>
    <slide>
    <title xmlns="http://www.example.com/slideshow">Wake up to
    products!</title>
    </slide>
    </slideshow>

    I want to use the namespace in my project. For this reason, I use a sample
    from
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/7b_pe.html
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom/5_ns.html
    to test my understanding.
    The slideshow2.dtd refer to the definition in 'xhtml.dtd'. Because in these
    two files, they all use the 'title' as the element names. To solve these
    conflicts, The namespace is used to qualified the one in slideshow2.dtd.
    But the parser still complain that the 'title' in slideshow2.dtd is declared
    more than once.
    I use apache's Xerces.
    I want to know if Xereces realy support namespace spec. now, or how to use
    the namespace with a parser. Can anyone kindly tell me where to find some
    material that demo the use of namespace in Java program.
    Thanks for any help!!!
    #############FILE: slideshow2.dtd ###############
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT slideshow (slide+)>
    <!ELEMENT slide (title?, item*)>
    <!ENTITY % xhtml SYSTEM "xhtml.dtd">
    %xhtml;
    <!ELEMENT title (#PCDATA)*>
    <!ATTLIST title
    xmlns CDATA #FIXED "http://www.example.com/slideshow"
    >
    <!ELEMENT item (#PCDATA)>
    ##############FILE: xhtml.dtd #########################
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT html (head)>
    <!ATTLIST html
    xmlns CDATA #FIXED "http://www.example.com/xhtml"
    >
    <!ELEMENT head (title,style*)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT style (#PCDATA)>
    #############FILE: slideshow.xml ####################
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE slideshow SYSTEM "slideshow2.dtd">
    <slideshow>
    <slide>
    <title xmlns="http://www.example.com/slideshow">Wake up to
    products!</title>
    </slide>
    </slideshow>

Maybe you are looking for