Native IO Second Try

Have written a pure C++ app to use the API we talked about before. Consisting of the following two files the first is the driver taking the place of the Java code and the second takes the place of the JNI code. This works fine.
#include "test.h"
void main()
     char* rdir = "../lang";
     char* lFile = "../lang/license.dat";
     char* key = "705553544e1a694a5f59535b561a754a5f485b4e535554491a795557575b545e1a127069757913";
     const char* genre = "std";
     const char* variant = "std";
     const char* lang = "english";
     const char* encoding = "cp_1252";
     const char* format = "html";
     unsigned int sentences_wanted = 5;
     bool sentence_offset_only = false;
     bool normalize_score = false;
     unsigned int phrases_wanted = 0;
     bool phrase_offset_only = false;
     const char* fileName = "aaawgqM4Ob.html";
     createSummarizer(rdir, lFile, key);
     createInputOptions(genre, variant, lang, encoding, format);
     setSentenceOutput(sentences_wanted, sentence_offset_only, normalize_score);
     setPhraseOutput(phrases_wanted, phrase_offset_only);
     getSummary(fileName);
#include "inxight-summarizer.h"
#include "inxight-charptr.h"
#include "inxight-text.h"
#include "inxight-bstream.h"
#include "inxight-unicode.h"
#include "inxight-unicode-utils.h"
#include <iostream>
#include <sys/timeb.h>  // for ftime
#include <assert.h>
using namespace inxight;
static summarizer* summarzr;
static summarization_input_options* inopt;
static summarization_sentence_output* sentOutput;
static summarization_phrase_output* phraseOutput;
void createSummarizer(char* rdir, char* lFile, char* key)
     summarzr = new summarizer(rdir, lFile, key);
void createInputOptions(const char* genre, const char* variant, const char* lang, const char* encoding, const char* format)
     inopt = new summarization_input_options(genre, variant, lang, encoding, format);
void setSentenceOutput(unsigned int sentences_wanted, bool sentence_offset_only, bool normalize_score)
     sentOutput = new summarization_sentence_output(sentences_wanted, sentence_offset_only, normalize_score);
void setPhraseOutput(unsigned int phrases_wanted, bool phrase_offset_only)
     phraseOutput = new summarization_phrase_output(phrases_wanted, phrase_offset_only);
void getSummary(const char* fileName)
     file_byte_stream* fs = new file_byte_stream(fileName);
     assert(fs);
     assert(summarzr);
     assert(inopt);
     assert(sentOutput);
     assert(phraseOutput);
     summarization* summary;
     summary = new summarization(*summarzr, *fs, *inopt, *sentOutput, *phraseOutput);
     sequence<key_item>::const_iterator it = summary->first_key_sentence();
     int count = 0;
     for (;it != summary->end_key_sentence(); ++it, ++count) {
          const inxight::text line = it->item_text();
          printf("Sentence %i% \n", count);
          printf("[len %i%, %i% \n", line.length(), it->get_score());
          for(unsigned int i=0; i<line.length(); i++) {
               printf("%c%", line);
          printf("%s%","\n");
     printf(" There are %i key phrases: ", summary->number_of_key_phrases());
     sequence<key_item>::const_iterator itr = summary->first_key_phrase();
     for (;itr != summary->end_key_phrase(); ++itr) {
          printf("%s%", itr->item_text());
I redid my JNI code to take into account the things I had learned from the code above as follows:#ifndef CRTSECURE_CPP_OVERLOAD_STANDARD_NAMES
#define CRTSECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#endif
#include "jsummarizer.h"
#include "inxight-summarizer.h"
#include "inxight-bstream.h"
#include "inxight-failure.h"
#include "inxight-bstream-intf.h"
#include <assert.h>
using namespace inxight;
static summarizer* summarzr;
static summarization_input_options* inopt;
static summarization_sentence_output* sentOutput;
static summarization_phrase_output* phraseOutput;
* Class: com_sra_pipeline_servers_summarizer_JSummarizer
* Method: createSummarizer
* Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
JNIEXPORT jint JNICALL Java_com_sra_pipeline_servers_summarizer_JSummarizer_createSummarizer
(JNIEnv *env, jobject object, jstring resource_dir, jstring license, jstring key) {
     const char* rdir;
     jboolean rdirCopy;
     rdir = env->GetStringUTFChars(resource_dir, &rdirCopy);
     if(rdir == NULL) {
          return 0; /*exception occurred*/
     printf("rdir %s \n", rdir);
     const char* lic;
     jboolean licCopy;
     lic = env->GetStringUTFChars(license, &licCopy);
     if(lic == NULL) {
          return 0; /*exception ocurred*/
     printf("lic %s \n", lic);
     const char* ckey;
     jboolean ckeyCopy;
     ckey = env->GetStringUTFChars(key, &ckeyCopy);
     if(ckey == NULL) {
          return 0; /* exception occurred */
     printf("ckey %s \n", ckey);
     summarzr = new summarizer(rdir, lic, ckey);
     if(rdirCopy == JNI_TRUE) {
          env->ReleaseStringUTFChars(resource_dir, rdir);
     if(licCopy == JNI_TRUE) {
          env->ReleaseStringUTFChars(license, lic);
     if(ckeyCopy == JNI_TRUE) {
          env->ReleaseStringUTFChars(key, ckey);
     return(1);
JNIEXPORT jint JNICALL Java_com_sra_pipeline_servers_summarizer_JSummarizer_setInOptions
(JNIEnv *env, jobject object, jstring genre, jstring variant, jstring language) {
     const char *cgenre;
     jboolean genreCopy;
     cgenre = env->GetStringUTFChars(genre, &genreCopy);
     if(cgenre == NULL) {
          return 0; /*exception occurred */
     const char *cvariant;
     jboolean cvarCopy;
     cvariant = env->GetStringUTFChars(variant, &cvarCopy);
     if(cvariant == NULL) {
          return 0; /*exception occurred*/
     const char *clang;
     jboolean clangCopy;
     clang = env->GetStringUTFChars(language, &clangCopy);
     if(clang == NULL) {
          return 0;
     inopt = new summarization_input_options(cgenre, cvariant, clang);
     if(genreCopy == JNI_TRUE) {
          env->ReleaseStringUTFChars(genre, cgenre);
     if(cvarCopy == JNI_TRUE) {
          env->ReleaseStringUTFChars(variant, cvariant);
     if(clangCopy == JNI_TRUE) {
          env->ReleaseStringUTFChars(language, clang);
     return(1);
JNIEXPORT jint JNICALL Java_com_sra_pipeline_servers_summarizer_JSummarizer_setSentenceNum
(JNIEnv *env, jobject object, jint sentCount, jboolean offset, jboolean nScore) {
     bool cOffset = offset ? true:false;
     bool cnScore = nScore ? true:false;
     unsigned int cnt = (unsigned int)sentCount;
     sentOutput = new summarization_sentence_output(cnt, cOffset, cnScore);
     return(1);
JNIEXPORT jint JNICALL Java_com_sra_pipeline_servers_summarizer_JSummarizer_setPhraseOpts
(JNIEnv *env, jobject object, jint pCnt, jboolean pOffset) {
     unsigned int cCnt = (unsigned int)pCnt;
     bool offset = pOffset ? true:false;
     phraseOutput = new summarization_phrase_output(cCnt, offset);
     return(1);
JNIEXPORT jstring JNICALL Java_com_sra_pipeline_servers_summarizer_JSummarizer_getSummary
(JNIEnv *env, jobject object, jstring filePath) {
     const char* cfile;
     jboolean cfileCopy;
     cfile = env->GetStringUTFChars(filePath, &cfileCopy);
     printf("cfile %s \n", cfile);
     if(cfile == NULL) {
          return 0;
     file_byte_stream* fstream = new file_byte_stream(cfile);
     assert(fstream);
     assert(summarzr);
     assert(inopt);
     assert(sentOutput);
     assert(phraseOutput);
     printf("%s", "past fileio\n");
     printf("%s", "Before getSummary");
     summarization* summary = new summarization(*summarzr, *fstream,
                                   inopt, sentOutput, *phraseOutput);
     printf("%s", "Past getSummary");
     const int sCnt = summary->number_of_key_sentences();
     const int pCnt = summary->number_of_key_phrases();
     sequence<key_item>::const_iterator it = summary->first_key_sentence();
     printf("sent# is %d", sCnt);
     int count = 0;
     for (;it != summary->end_key_sentence(); ++it, ++count) {
          const inxight::text line = it->item_text();
          printf("Sentence %i% \n", count);
          printf("[len %i%, %i% \n", line.length(), it->get_score());
          for(unsigned int i=0; i<line.length(); i++) {
               printf("%c%", line[i]);
     sequence<key_item>::const_iterator itr = summary->first_key_phrase();
     for (;itr != summary->end_key_phrase(); ++itr) {
          printf("%s%", itr->item_text());
     if(cfileCopy == JNI_TRUE) {
          env->ReleaseStringUTFChars(filePath, cfile);
     char* r = "results";
     return(env->NewStringUTF(r));
{code}
The print out from running the code in Eclipse is:
{code}
Library Loaded
summarizerPtr 1
inOptionPtr 1
sentenceOutputPtr 1
phraseOptionsPtr 1
doing summarization
File Exists? true
# An unexpected error has been detected by Java Runtime Environment:
# Internal Error (0xe06d7363), pid=476, tid=4084
# Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode windows-x86)
# Problematic frame:
# C [kernel32.dll+0x12aeb]
# An error report file with more information is saved as:
# D:\Servers\SummarizerServer\hs_err_pid476.log
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
rdir lang
lic license/license.dat
ckey 705553544e1a694a5f59535b561a754a5f485b4e535554491a795557575b545e1a127069757913
cfile input/aaawgqM4Ob.html
past fileio
Before getSummary
{code}
The output from VC7 which I had attached to the JNI program process is as follows:
{code}
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\bin\javaw.exe', No symbols loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\secur32.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Exports loaded.
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\jre\bin\msvcr71.dll', Exports loaded.
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\jre\bin\client\jvm.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', Exports loaded.
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\jre\bin\hpi.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\psapi.dll', Exports loaded.
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\jre\bin\jdwp.dll', Exports loaded.
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\jre\bin\npt.dll', Exports loaded.
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\jre\bin\verify.dll', Exports loaded.
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\jre\bin\java.dll', Exports loaded.
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\jre\bin\zip.dll', Exports loaded.
'javaw.exe': Loaded 'C:\Program Files\Java\jdk1.6.0_06\jre\bin\dt_socket.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\mswsock.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\dnsapi.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\winrnr.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\wldap32.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\rasadhlp.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\hnetcfg.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\wshtcpip.dll', Exports loaded.
'javaw.exe': Loaded 'D:\Servers\SummarizerServer\native\jsummarizer.dll', Symbols loaded.
'javaw.exe': Loaded 'D:\Servers\SummarizerServer\native\summarizer37.dll', Exports loaded.
'javaw.exe': Loaded 'D:\Servers\SummarizerServer\native\platform37.dll', Exports loaded.
'javaw.exe': Loaded 'D:\Servers\SummarizerServer\native\icuuc30.dll', Exports loaded.
'javaw.exe': Loaded 'D:\Servers\SummarizerServer\native\icudt30.dll', Exports loaded.
'javaw.exe': Loaded 'C:\WINDOWS\system32\netapi32.dll', Exports loaded.
The thread 'Win32 Thread' (0x164) has exited with code 0 (0x0).
_First-chance exception at 0x7c812aeb (kernel32.dll) in javaw.exe: Microsoft C++ exception: inxight::file_not_found @ 0x003ff9cc._
_First-chance exception at 0x7c812aeb (kernel32.dll) in javaw.exe: Microsoft C++ exception: inxight::resource_load_failure @ 0x003ffa08._The thread 'Win32 Thread' (0xc30) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xee8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xbfc) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x158) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x9c8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x984) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xab0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x518) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x37c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xbc4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xa14) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xff4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xa0c) has exited with code 1 (0x1).
The program '[476] javaw.exe: Native' has exited with code 1 (0x1).
{code}
Note the underlined exceptions from VC7 indicating that the file was not found, now note from the Java output "File Exists? true" which neans
that Java could find it. So what's the problem?
Jim

I would guess you are overwriting memory somewhere. And that causes it to fail latter, maybe much latter, in the code.
You can comment out the C++ code reducing it and mocking the calls until you get rid of the error and thus localize it.
Code inspection is usually the only route to solve it. Debugging might help you inspect it, because it might
reveal an unexpected value showing up (due to an overwrite somewhere.
Other than that there is too much code for me to want to inspect it myself.
rdir = env->GetStringUTFChars(resource_dir, &rdirCopy);That returns UTF chars.
printf("rdir %s \n", rdir);That prints the OS character set.
"OS character set" does not equal "UTF chars"

Similar Messages

  • Intra-Interface-Traffic fails at first try - second try works

    Hi,
    we are running two ASA5550 as fail-over.
    Everything works fine. But there is still a little "bug".
    same-security-traffic permit intra-interface
    is enabled.
    Now, let's open an PostgreSQL-Connection from 10.10.1.22 to 10.10.1.8 (same subnet, same interface "IT").
    First try (using psql for a connection), I get
    11:27:56|106015|10.10.1.22|51019|10.10.1.8|5432|Deny TCP (no connection) from 10.10.1.22/51019 to 10.10.1.8/5432 flags RST  on interface IT
    11:27:56|302014|10.10.1.22|51019|10.10.1.8|5432|Teardown TCP connection 290800318 for IT:10.10.1.22/51019 to IT:10.10.1.8/5432 duration 0:00:00 bytes 0 TCP Reset-O
    11:27:56|302013|10.10.1.22|51019|10.10.1.8|5432|Built inbound TCP connection 290800318 for IT:10.10.1.22/51019 (10.10.1.22/51019) to IT:10.10.1.8/5432 (10.10.1.8/5432)
    11:27:53|302014|10.10.1.22|51019|10.10.1.8|5432|Teardown TCP connection 290800140 for IT:10.10.1.22/51019 to IT:10.10.1.8/5432 duration 0:00:00 bytes 0 TCP Reset-O
    11:27:53|302013|10.10.1.22|51019|10.10.1.8|5432|Built inbound TCP connection 290800140 for IT:10.10.1.22/51019 (10.10.1.22/51019) to IT:10.10.1.8/5432 (10.10.1.8/5432)
    in the ASA log.
    psql now runs into a time out.
    Starting the second try, the ASA doesn't report any packets and the connection is established.

    Phillip,
    Based on the syslogs the reset packet is coming from another device "Reset-O". The best way to troubleshoot this issue will be applying captures on the IT interface in order to track the source MAC of the reset and to have a better picture of the traffic flow.
    Luis Silva

  • HT4972 After the process stops due to a "corrupted" download of the new iOS file, why does the second try repeat the ten-hour backup process?

    After the process stops due to a "corrupted" download of the new iOS file, why does the second try repeat the ten-hour backup process? I am doing this on the latest iTunes, and a Windows XP computer.

    After the process stops due to a "corrupted" download of the new iOS file, why does the second try repeat the ten-hour backup process? I am doing this on the latest iTunes, and a Windows XP computer.

  • My 2nd generation iPod touch recognized the touchmic lapel microphone the first try.  I recorded a memo.  The second try it would not.  Any ideas?

    My 2nd generation iPod touch recognized the touchmic lapel microphone the first try.  I recorded a memo.  The second try it would not.  Any ideas?

    See:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
    The iPod backup that iTunes makes does not include synced media like apps and music.

  • This is a second try to get help. I need help to uninstall and reinstall Photoshop cc 2014

    Bridge is not working well, I need to reinstall Photoshop cc 2014 .  Someone from Communities was suppose to help me. 

    Hi John,
    I used the chat "Creative chat support"  this afternoon at around 14:40
    and the person, Karthik M , gave me a link to Technical Support.  I
    guess he could not help me, but he said he understood the issue.   With
    the link "Help, Adobe Installation problems",   I will follow the
    instructions  to clean ps cc2014 with CCleaner and reinstall the app.  
    It looks quite complicated  but I will give it a try and hopefully succeed.
    You have to understand when reading my previous messages, the issue is
    no longer "Retreiving Photoshop CC" but reinstalling Phoshop 2014 to try
    to repair Bridge.
    Thanks for caring,
    Suzanne Lanthier
    Le 2014-08-13 15:50, John T Smith a écrit :
    >
          This is a second try to get help. I need help to uninstall and
          reinstall Photoshop cc 2014
    created by John T Smith <https://forums.adobe.com/people/JohnTSmith>
    in /Adobe Creative Cloud/ - View the full discussion
    <https://forums.adobe.com/message/6637788#6637788>

  • TS4611 I have just received my second MacBook Air 11" the Wifi connection keeps dropping. Also after 3 meters away it keeps searching for network! It is the second try and the same issue. Will Apple ever come up with a solution?

    I have just received my second MacBook Air 11" the Wifi connection keeps dropping. Also, after 3 meters away from the rooter it keeps searching for network! It is the second try and the same issues. Will Apple ever come up with a solution? There is a program pack for the connection issue but I cannot believe that this computer wifi keeps connected only while nearby the rooter!

    Applied this update?
    http://support.apple.com/kb/TS4611?viewlocale=en_US&locale=en_US
    If the update is installed aready, you may have to wait until OS X 10.8.5
    update if and when it is relased.
    Best.

  • First import was 16:9, second try 4:3 WHY???

    I imported a new DV movie in 16:9 (widescreen) format. First it imported in 4:3 and it changed to 16:9.
    I than imported a second movie, same way it imported in 4:3 but never changed to 16:9. WHY???
    I saved my imported movie as a movieproject format. Can I change this to 16:9.
    Can someone help me

    Try this:
    Quit iMovie. The delete starting from your home folder ~/Library/Preferences/com.apple.iMovie.plist.
    Launch iMovie and in its prefs set 25 fps = PAL or 29.97 = NTSC. Also set automatic pillar/letterboxing pref OFF.
    Then create a new widescreen project and try to import 16:9 to it again.

  • Contacts sync only on second try

    If I have apps that have not yet been synced, my contacts don't sync unless I do a first sync, in which the apps get synced, and then do a second sync, in which the contacts get synced.
    During the first sync, iTunes reports that it is syncing contacts and apps, but only the apps get synced.
    I imagine this is not the case for everyone since it would be a known issue or fixed, so here are the particulars of my configuration:
    iPhone 4 with latest iOS
    Windows Vista with all updates
    iTunes with latest version
    On the "Info" tab, Advanced | Replace information on this iPhone | Contacts
    is selected.
    When I start the sync, in all cases I click "Apply" since the sync button is replaced by "Revert" and "Apply" when the Contacts option is selected.
    Do others see this? Any workarounds?

    Hello @ian317
    Welcome to the forums.  Sory to hear about your page loading issue.  If at all possible to help me out.  Has this problem been going on for a while or ever since a recent update on your system?
    There can be many reasons for this happening but it has been cropping up alot with IE 11 and Chrome.
    The one fix i have found is as follows.
    1: Open up IE 11
    2: Go to tools then to internet options.
    3: Click on the advianced tab at the top right.
    4: Scroll down to the HTTP settings.
    5: Uncheck " Use SPDY/3 "
    6: Click "OK"
    7: Close and then reopen IE11
    8: Try and open up a website first time
    I hope this works for you.  If not let me know. If it does please let me know.
    Have a great day.
    Thanks
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    D5GR
    I work on behalf of HP

  • JAVA newby needs help - second try

    Sorry I goofed up the first post!!
    I am trying to learn JAVA on my own and am stuck on using random numbers. My grandson is having problems in math (he is 7) and I want to create a math quiz that will generate two numbers between 0 and 10 and ask him for the correct answer. I understand the JOptionPane and how to display what I wan it to say (easy) but I do not know how to make the result of the sum of the two randoms be the required user (my grandson) input.
    Here is what I have (don't laugh it's a mess):
    /* ROMAD, January 21, 2007
    * Trying to write a Java program for
    * my grandson so he can practice and
    * learn how to multiply using two integer numbers*/
    package mathTest;
    import javax.swing.JOptionPane;
    import java.util.*;
    public class MathTest_1 {
        public static void main(String[] args) {
            Random randomNumbers = new Random();
            // pick random number values between 0 and 10
            int number1 = 1 + randomNumbers.nextInt(10); // first random number
            int number2 = 1 + randomNumbers.nextInt(10); // second random number
            String response;
            response = JOptionPane.showInputDialog("Enter the maximum number");
         // place random number values here and ask for correct number
            System.out.printf("How much is %d times %d\n", number1, number2);
            // ask player what is the answer
            response = JOptionPane.showInputDialog(null,"How much is %d * %d");
            if (response == null)
                JOptionPane.showMessageDialog(null,
                                              "You must enter a value first");
            else if (response.equals(""))
                JOptionPane.showMessageDialog(null, "Please try again");
                JOptionPane.showMessageDialog(null,
                                              "Great! Would you like to play again?");
            System.exit(0);
    }

    The JOptionPane returns user input as a String. Use Integer.parseInt() to parse the string answer to an int value, which you can then compare as needed.
    Here's an example: Converting Strings to Numbers
    ~

  • Second try at getting info on how to submit a podcast feed. Please?

    Can anybody point me to a page besides the outdated one here on Apple's page PODCASTING AND ITUNES: TECHNICAL SPECIFICATION ? Where it says under TESTING YOUR FEED to select "Subscribe to Podcast" in the Advanced menu. There is no option in the new 7.0 iTunes matching this. Later, under SUBMITTING YOUR PODCAST TO ITUNES it says under the "Music Store" category to click on podcasts, but once again there is no option for podcasts there. If somebody can explain how to submit a podcast to iTunes, it would be so much appreciated. Our podcast is new, but our radio show has been around for a long time. The link to our rss feed has been tested and it works. It is and http://www.rnnradio.com/rss2.aspx
    All I need is somebody to explain how this is done! Please help!

    The feed looks fine and can be subscribed to manually in iTunes (from the 'Advanced' menu).
    Just to check that you are logged into the iTunes Store and are submitting this at
    https://phobos.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast
    If that's the case, you may have hit a server glitch: I should leave it for a few hours and try again.

  • Second Try : Blanket Purchase Order or Contract Purchase Order by item Cate

    Hi
    I have a requirement that Strategic buyers will fill agreement with supplier by item Category level
    Agreement will be on Price level and will have expiration date
    The category level will contain list of items Part numbers which are the same item from technically :
    Our business is on the electronics contract manufacturing and we are producing for Customers from the High Tech industry .In order to keep each customer process and unique environment we are coding the item Part # per customer since of that the same electronic component having different part # per customer
    Each night we running MRP run (ASCP) and the Planner release Planned order to request ion
    The requirement is that the purchase requisition will derive the price from the agreement based on assigned Category level and will automatically convert to Purchase order
    Looking for your advise how can this be implemented ?
    Thanks
    Edited by: Shlomibekel on 11:50 25/05/2010

    Hi,
    Yes. It should work . The work of category based sourcing is nothing but assigning the correct sourcing rule/document to that specific actegory. All the item under this category will be sourced to same supplier/Supplier site/ Source document combination.
    Before running the ASCP/MRP try creating the requisition manually with the completed the Sourcing rule/ASL setup and check if the reuslt is satisfactory.
    If the manual requisition works fine then ASCP/MRP should use the same procedue.
    Thanks,
    Guru

  • Scored Items not starting at beginning on second try.

    I have a movie that has no actual quiz items yet when the
    student exits the course I want the LMS course summary page to read
    Completed - 100%, Passed. Score - 100%. I can achieve this on our
    IBM LMS by adding a scored interaction on my Next button on the
    next to last page. Works great. I get the results displayed that I
    want.
    The issue comes up when the student launches the course a
    second time. Not many do, but occasionally it happens. For some
    reason the movie does not begin on the first page. It launches and
    jumps to the page after the scored button, skipping the entire
    movie. I have tried moving the scored button to the first page, but
    the movie after launching jumps to a screen in the middle of the
    presentation. There is no logical reason as to why it jumps to the
    middle screen, it just does. I have tried placing the the scored
    interaction in a number of different places and even having
    multiple scored interactions, nothing seems to work. Any
    suggestions you might have would be greatly appreciated. Thanks for
    your help.

    CitizenseLearning,
    I have very limited experience with working with an LMS so
    take this for what it is worth, but this sounds like it may have
    something to do with bookmarking within the LMS itself. I say this
    since Captivate does not contain any kind of bookmarking capability
    itself and should always start on the first page unless there is an
    outside app (Flash actions script, LMS bookmarking, etc.) telling
    it to do otherwise.

  • When I try to open Firefox, it flashes open and closes. Second try opens OK.

    I have a quick launch icon I use to open Firefox. When I click on it, Firefox opens for about 1 second and closes. I click the second time, it opens fine.

    Sorry, Firefox 4 beta 1 is not compatible with the Samsung Intercept. For details, see: https://wiki.mozilla.org/Mobile/Platforms/Android#System_Requirements

  • FRM-92101 after second try logon

    Hi
    I've made an on-logon trigger. In that trigger I've made hardcoded 3 tries to logon.
    When I logon without any information, no username, no password and no CS the trigger continues and exit at the 3th time.
    But when I logon with the wrong un and pw, but the right CS..the first works and continues, but the second time I get the FRM-92101.
    Can somebody help me out?

    CODE ON-logon trigger
    IF un_old is null and pw_old is null and cs_old is null -- Wijzigingen IF 1
    THEN
         IF cs is null and un is null and pw is null -- Niets ingevuld IF 2 1e AANLOG
              THEN
              SET_ALERT_PROPERTY('LOGON_ALERT',ALERT_MESSAGE_TEXT,
    DBMS_ERROR_TEXT||'Retry Login?');
    button_pressed := SHOW_ALERT('LOGON_ALERT');
    IF (button_pressed = ALERT_BUTTON2) -- Annuleren IF 3
    THEN
    RAISE FORM_TRIGGER_FAILURE;
    ELSE
         logon_screen;
         get_connect_info;
         IF cs is null and un is null and pw is null -- Niets ingevuld IF 4 2e AANLOG
              THEN
              SET_ALERT_PROPERTY('LOGON_ALERT',ALERT_MESSAGE_TEXT,
    DBMS_ERROR_TEXT||'Retry Login?');
    button_pressed := SHOW_ALERT('LOGON_ALERT');
    IF (button_pressed = ALERT_BUTTON2)-- Annuleren IF 5
    THEN
    RAISE FORM_TRIGGER_FAILURE;
    ELSE
         logon_screen;
         get_connect_info;
              IF cs is null and un is null and pw is null --Niets ingevuld IF 6 3E AANLOG
                                       THEN
                                       message ('3.Login poging mislukt!'||CHR(10)
                        ||'Controleer gebruikersnaam, wachtwoord en database waarden!');
                        RAISE FORM_TRIGGER_FAILURE;
                        ElSE -- Ingevuld IF 6                         
                                                      logon(un,pw||'@'||cs, FALSE);
                                                      IF FORM_SUCCESS -- Gevuld 7
                                                      THEN
                                                      connected := TRUE;
                                                      clear_message;
                                                      ELSE
                                                 RAISE FORM_TRIGGER_FAILURE;      
                                                      END IF; -- Einde Gevuld 7                     
                                                 END IF; -- Einde IF 6
                             END IF; -- Einde IF 5
                                  ELSE -- ingevuld IF 4 2e AANLOG
                        get_connect_info;
                        logon(un,pw||'@'||cs, FALSE);
                                       IF FORM_SUCCESS -- Gevuld 10
                                       THEN
                                       connected := TRUE;
                                       clear_message;
                                                 ELSE     SET_ALERT_PROPERTY('LOGON_ALERT',ALERT_MESSAGE_TEXT,
                             DBMS_ERROR_TEXT||'Retry Login?');
                             button_pressed := SHOW_ALERT('LOGON_ALERT');
                             IF (button_pressed = ALERT_BUTTON2)-- Gevuld 13
                             THEN
                                       RAISE FORM_TRIGGER_FAILURE;
                                  ELSE
                                                      logon_screen;
                                                      get_connect_info;
                                                      IF cs is null and un is null and pw is null --Niets ingevuld IF 14 3E AANLOG
                                            THEN
                        message('6.Login poging mislukt!'||CHR(10)
                                  ||'Controleer gebruikersnaam, wachtwoord en database waarden!');
                        RAISE FORM_TRIGGER_FAILURE;
                        ElSE -- Ingevuld IF                     
                                                      logon(un,pw||'@'||cs, FALSE);
                                                      IF FORM_SUCCESS -- Gevuld 15
                                                      THEN
                                                      connected := TRUE;
                                                      clear_message;
                                                      ELSE
                                                      RAISE FORM_TRIGGER_FAILURE;     
                                                      END IF; -- Einde Gevuld 15                                                                                                               
                                            END IF; -- Einde Gevuld 12
                                            END IF; -- Einde Gevuld 11
                                       END IF;          -- Einde Gegevuld 10
                                  END IF;
                        END IF;     -- Einde IF 3
    ELSE -- ingevuld IF 2 1E AANLOG
    get_connect_info;
    logon(un,pw||'@'||cs, FALSE);
                   IF FORM_SUCCESS -- Gevuld 18
                   THEN
                   connected := TRUE;
                   clear_message;
                   ELSE
                             SET_ALERT_PROPERTY('LOGON_ALERT',ALERT_MESSAGE_TEXT,
    DBMS_ERROR_TEXT||'Retry Login?');
    button_pressed := SHOW_ALERT('LOGON_ALERT');
    IF (button_pressed = ALERT_BUTTON2)-- Gevuld 21
    THEN
    RAISE FORM_TRIGGER_FAILURE;
    ETC ETC ETC

  • Search Fails on Second Try of Same String or Page Refresh

    We have SharePoint 2013 with Enterprise Search site collection configured. It worked fine for three plus months now, but a week ago it started to display a rather strange behavior. A user enters a string to search, and upon running the search, the results
    show up as expected. But if one runs the same search immediately or later, an error comes up saying:
    "Sorry, something went wrong." Expanding the details of the error shows: "Unexpected response from server. The status code of response is '0'. The status text of response is ".
    I followed all advice related to this error, which none is quite the same since our status text response looks like null rather than a specific value. 
    I cleaned the cache for the farm on both app servers, I re-indexed and re-run search - no changes. Immediately after re-running search, one can check again the same strings that were run before, but re-running them a second time results in the failure again;
    it seems like a latched cache flag somewhere, but I have no idea where to look next. Also, we have enough memory on these servers and are not running out.
    Any ides what this could be?
    Thanks,
    Radu
    Radu P.

    Hi Radu,
    According to your post, my understanding is that when you run the same search again, you got an error.
    We can disable extended protection in IIS, then check whether it works.
    For more details:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/470354d3-0b78-4e7a-9d67-b14e4a563668/search-not-working-systemservicemodelserviceactivationexception
    There are two similar threads for you reference:
    http://tom-randomworks.blogspot.in/2013/01/sharepoint-2013-unexpected-response_15.html
    http://sharepointthing.wordpress.com/2012/11/18/sharepoint-2013-unexpected-response-from-server-the-status-code-of-response-is-500-the-status-text-of-response-is-system-servicemodel-serviceactivationexception/
    If you have any problems, please feel free to reply me.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

Maybe you are looking for