How to manage high score file

Hello,
I have made i little game in CVI, in the end of the game user get a score base on the levels he passed and the level of difficulty.
As this is a school assignment i have to have a score board. I've made score board using a table and i read arguments from a txt file.
All I read is the name of the player and his score.
The trouble that I'm having is to check the txt file and see if the new score of the user can be put in the score board.
I need to known how I check if user's new score need to be put into the score txt file, and how to put it there.
Thanks in advacne!

Hello Slavik87!
If I understand your question correctly, want to are asking is how to read the text file, retrieve the highest scores from it and update the file again.
If you are asking about which functions to use, these are some functions you can use to perform the file operations:
fopen, to open the file
fputs, to write a string to the file
fgets, to get a string from the file
fseek, to navigate through the file
fclose, to close the file
Here are some suggestions about how you can manage the information in your text file:
Insert each new entry (name, score) on a separate new row, optionally using separators:
John Doe, 10
Kelly Smith, 43
Kevin Brown, 4
After reading these lines from disk, you would have to store the entries in some data structures (e.g. lists, structures) for your application to manage.
For optimization, you can also sort the rows based on the highest score, this way, when you want to retrieve the highest scores, these are already situated at the beginning of the file. However, when you update the rows, you would have to switch places of rows, when a person will have a higher score than the previous item(s).
Best regards!
- Johannes

Similar Messages

  • How to manage a data file using Business Contact Manager database tool

    I set up BCM on my desktop and now want to share with the rest of the office. I downloaded BCM database tool on the C drive
    of the server and all was well until I tried to move through the wizard. The only option that gets me to a data file is creating a database. However, I receive the error message "Cannot create a new database. The operation has been rolled back. Please
    make sure the database service is running". How can I make this work? Truthfully, I don't want to create a new database - I have already set one up; Restore only gives me the database server instance but no choices for the database name list. I have installed
    BCM on another co-workers desktop and allowed the database to be shared with her. What more am I missing? Why can't I get the server to see the data file?

    Hi,
    If the Database has not been shared, you can't connect to it.
    Please also confirm you have been granted permission to access the shared Business Contact Manager database.
    You can refer to this article below and there are some factors that you should consider:
    Business Contact Manager cannot connect to the shared database
    http://office.microsoft.com/en-us/outlook-help/business-contact-manager-cannot-connect-to-the-shared-database-HA010262548.aspx
    I hope it can be helpful.
    Regards,
    Melon Chen
    TechNet Community Support

  • How to manage media cache files in Premiere Pro CS5.5?

    I hope my question is not too complicated but I still haven't figured this one out.
    Here goes:
    Whenever I open a project in Premiere Pro, the media cache files used are always the same ones from a prior project.
    For example, if I open project ABC, the scratch disk used, the media cache and media cache files are from the ABC project file.
    Then, if I open another document, XYZ, the scratch disk and the media cache files are again stored in the ABC project file.
    HOW DO I CHANGE THE SETTINGS SO THE SCRATCH DISK AND MEDIA CACHE ARE THE ONES SPECIFIC TO THE PARTICULAR PROJECT I OPEN?
    So I don't have to move all the cache files manually or change the settings in Premiere every time I open a project.
    Sorry for the long description. Thanks for your help. Daniel Martel. Quebec. Canada.

    You can't (unless you want to store them next to the originals, a proposition I find untenable).  Some of the scratch disk settings are stored at the project level (things like video and audio previews), but the one's you're talking about are global - one setting for the whole program.
    I don't like that arrangement myself.  ALL scratch disks should be stored per project.
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • How to manage the PDF file

    Dear all,
    I have one question about Servlet. I have been using the Sun Java Application Server 8.0.
    0) Obtains the inputs (name, birthday) from the user
    1) Creates a PDF file, in which the inputs obtained are to be written
    2) Stores the PDF file in the external hard disk drive
    3) Only permits the same user to review the file
    My question is how to let the permitted user to view the file.
    a) Creates an HTML file with an appropriate Content-Type value
    b) Exports the PDF file to the HTML file
    If you are familiar with this problem, could you please help me to solve it?
    Thank you very much in advance.
    Yours faithfully,
    t91006sa

    Dear Saish,
    Thank you very much for your instruction. I found it very interesting.
    Following your instruction, I wrote the following code.
    Thank you very much again. You are very kind.
    BrendaAndEddie (t91006sa)
    <%@ page pageEncoding="UTF8" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.util.*" %>
    <%
         final String DIRECTORY = "C:/Documents and Settings/Administrator/Desktop/";
         final String FILENAME = "abc.pdf";
         final int OPTIMIZATION = 1024;
         response.setContentType("Application/Octet-Stream");
    // response.setContentLength(???);
         response.setHeader("Pragma", "no-cache");
         response.setHeader("Cache-Control", "no-cache");
         response.setHeader("Content-disposition", "inline; filename=\"" + FILENAME + "\"");
         byte buffer[] = new byte[OPTIMIZATION];
         FileInputStream fin = new FileInputStream(DIRECTORY + FILENAME);
         OutputStream os = response.getOutputStream();
         int size = 0;
         while (true) {
              size = fin.read(buffer);
              if (size == -1) {
                   break;
              os.write(buffer, 0, size);
         if (os != null) {
    os.flush();
              os.close();
         if (fin != null) {
              fin.close();
    %>

  • Question about how Oracle manages Redo Log Files

    Good morning,
    Assuming a configuration that consists of 2 redo log groups (Group A and B), each group consisting of 2 disks (Disks A1 & A2 for Group A and Disks B1 and B2 for group B). Further, let's assume that each redo log file resides by itself in a disk storage device and that the device is dedicated to it. Therefore in the above scenario, there are 4 disks, one for each redo log file and, each disk contains nothing else other than a redo log file. Furthermore, let's assume that the database is in ARCHIVELOG mode and that the archive files are stored on yet another different set of devices.
    sort of graphically:
        GROUP A             GROUP B
          A1                  B1
          A2                  B2The question is: When the disks that comprise Group A are filled and Oracle switches to the disks in Group B, can the disks in Group A be taken offline, maybe even physically removed from the system if necessary, without affecting the proper operation of the database ? Can the Archiver process be temporarily delayed until the disks (that were removed) are brought back online or is the DBA forced to wait until the Archiver process has finished creating a copy of the redo log file into the archive ?
    Thank you for your help,
    John.

    Hello,
    Dropping Log Groups
    To drop an online redo log group, you must have the ALTER DATABASE system privilege. Before dropping an online redo log group, consider the following restrictions and precautions:
    * An instance requires at least two groups of online redo log files, regardless of the number of members in the groups. (A group is one or more members.)
    * You can drop an online redo log group only if it is inactive. If you need to drop the current group, first force a log switch to occur.
    * Make sure an online redo log group is archived (if archiving is enabled) before dropping it. To see whether this has happened, use the V$LOG view.
    SELECT GROUP#, ARCHIVED, STATUS FROM V$LOG;
    GROUP# ARC STATUS
    1 YES ACTIVE
    2 NO CURRENT
    3 YES INACTIVE
    4 YES INACTIVE
    Drop an online redo log group with the SQL statement ALTER DATABASE with the DROP LOGFILE clause.
    The following statement drops redo log group number 3:
    ALTER DATABASE DROP LOGFILE GROUP 3;
    When an online redo log group is dropped from the database, and you are not using the Oracle Managed Files feature, the operating system files are not deleted from disk. Rather, the control files of the associated database are updated to drop the members of the group from the database structure. After dropping an online redo log group, make sure that the drop completed successfully, and then use the appropriate operating system command to delete the dropped online redo log files.
    When using Oracle-managed files, the cleanup of operating systems files is done automatically for you.
    Your Database wont be affected as you can operate with 2 redo log files in each group as The minimum number of redo log files required in a database is two because the LGWR (log writer) process writes to the redo log files in a circular manner. so the process will hang becuase you are having 2 only groups if you want to remove 1 add a third one and make it the current group then remove the one you want to be offline.
    Please refer to:
    http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/onlineredo.htm#7438
    Kind regards
    Mohamed
    Oracle DBA

  • IMovie 08 Galleries: How It Manages Your Video Files

    Good Afternoon,
    When you post any size video to your iMovie08 web gallery, it creates a file called an .M4V file. This file type is similar to a straight MPEG-4 except that it is a container that contains either or both audio and video and has instructions for specific players to work with it. That is to say, when you play a .M4V file containing video on just an audio iPod, the audio will only be extracted.
    This container file allows then a single format type to be used across portable devices. However, it is not an easy chore to change the compression with .M4V files (you'll now notice that you have just a few choices. Apple TV, iPhone, iPod, etc.) And you can't change the video parameters of these exports with iMovie.
    This is the file type that gets exported when you produce an iMovie08 web gallery. Both the upload and download files available to that site would be in the .M4V format which limits your bandwidth and compression flexibility. However, for the most part, it works well. Take a look at my newest video here on-line at my web gallery:
    http://gallery.mac.com/northwestphotos#100009
    If you want more flexibility in creating a higher bandwidth for your uploaded videos, consider using iWeb instead. iWeb doesn't care whether your file is .MP4 or .M4V. The beauty of .MP4 is that is allows you to specify all parameters of your video. Export to Quicktime from iMovie08, custom set the parameters and save to your desktop to drop it inside your iWeb movie page project.
    Clint

    Wow, thanks for the info. I use the HV20 as well, so I will have to play around. I knew the previous version didn't support Canons 24P, however the shots that you took with it I can tell that they were different.
    I guess I will have to play around a little more and post some footage.
    Again, great technique and well shot.
    "D"

  • How To Manage Premiere Cache Files On A Central Storage Server with Multiple editors

    Look for the proper recommended setup in a shared storage environment with multiple editors. Where do cache files reside on each editor locally or on the shared storage.
    This is in a Windows 7 Environment using EMC2 Isilon for our shared storage. We are running Premier Pro CC 2014 8.1 Caravan Build 8.2.0(65)
    Thanks
    Rodney

    Look for the proper recommended setup in a shared storage environment with multiple editors. Where do cache files reside on each editor locally or on the shared storage.
    This is in a Windows 7 Environment using EMC2 Isilon for our shared storage. We are running Premier Pro CC 2014 8.1 Caravan Build 8.2.0(65)
    Thanks
    Rodney

  • How to manage imported video files

    Hello
    I have now imported 7-8 hours worth of digital video to my internal HD on my new iMac (320 GB HD I believe)and have used 1/2 of its capacity up, causing my computer to slow down I believe..
    What do I do with the massive amounts of HD space video's will take up?
    I have been ruthlessly editing the material, but will soon want to punt even that stuff out to an external HD I imagine...
    Is an external HD the answer?
    If so, do I have to re-import it if I want to use it again in iMovie 08 in the future?
    OR will iMovie work from a source outside the internal HD?
    Thanks, I'm very curious about this...what do the pro's do..
    Stinkball

    Stinkball wrote:
    ... Is an external HD the answer?
    yes
    ... If so, do I have to re-import it if I want to use it again in iMovie 08 in the future?
    no: in iM08, you'll notice your new, firewire connected, MacOsExtended formatted (=do thate BEFORE usage...) in the lower left of the window.. drag your Events from old to new place..
    http://karsten.schluter.googlepages.com/im08tricks
    (Project Library (and Events) on External Harddrive)
    OR will iMovie work from a source outside the internal HD?
    it will work with any compatible (=MacOsExtended formatted) HDD, internal or external.. even usb2 connected drives do work ...

  • Static Files with same name. How does apex determine which files to serve?

    Hello, I'm using apex 4.2.1.00.08 and I cannot figure out how apex manages the static files and cannot find any help in the docs (other that some high level UI description).
    The application is serving some file and I cannot find which one it is in any easy way.
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen as
    SELECT *
    FROM wwv_flow_files
    WHERE flow_id = 0;
    and can apparently only be deleted using "SQL Commands" inside apex.
    the URL called is something like
    wwv_flow_file_mgr.get_file?p_security_group_id=13498126233076320&p_fname=myfile.css
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.
    apparently files linked to flow_id 0 have precedence over all the other files ...
    Thanks for clearing up a bit of "fog" on this issue.

    VC wrote:
    Go to that application > shared components > Static files you should see the file.the problem is that there are multiple files with that name, and that sometimes the file being served is linked to application "0" and it doesn't show in the "shared components" interface ...
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.Static files can be uploaded to apex with optionally associating with an application within that workspace.
    Files associated with an application are referenced using *#APP_IMAGES#*
    Files not associated with an application are referenced using *#WORKSPACE_IMAGES#*I referenced with #WORKSPACE_IMAGES#, but now I see that if I use #APP_IMAGES# the URL generated will also contain the application ID. This would help to discriminate between different files with the same name but linked to different applications ...
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen asWhy are you particularly interested in application 0?Because somehow APEX puts the files that I uploaded there ... they can be seen selecting from wwv_flow_files. Do they take precedence over all other files with the same name?
    Filename is unique for the given workspace[and application]I disagree. I have multiple files with the same name ... the root of this problem ...
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.How is your static file referenced??
    But not always, try associating an static file with and application and reference it using #APP_IMAGES# instead of #WORKSPACE_IMAGES#
    See
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_sub.htm#BEIDCGAJ
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/ui_file_manage.htm#HTMDB06011
    Thanks, but the documentation doesn't give much details ... apparently files referenced with #WORKSPACE_IMAGES# can still resolve to files linked to specific applications ... I would like to understand the actual workflow for the various cases (file references with APP_IMAGES, referenced with WORKSPACE_IMAGES, file associated with the application, with another application, with no application, with application "0" ...).
    Also, I find it somewhat misleading that you can have files associate with applications that don't exist anymore (e.g. have been deleted).
    Edited by: GChierico on Apr 11, 2013 2:16 PM

  • How can I delete event files from iMovie to save disk space?

    I have been shooting a lot of HD video of my son's soccer games and am now realizing some of the problems with the newer iMovie 10.   It appears to not allow for partial video deletion of videos in events (really too bad because previous versions of iMovie did this really well),  And, sometimes it will not actually move the deleted file to the Trash to help free up disk space on the computer.  This is also a problem because I have to did around in the View in Finder mode to find the events I just deleted in order to move them to the Trash manually.  Yeegads!  All of this said, what I appear to have happening is a huge amount of video that I never plan to keep (most of a 90 minute soccer game does not make it into highlights -- imagine that?) clogging up my hard drive.  My poor computer needs to have a cholesteral check.
    Any advice on how to manage large video files 40 minute HD files within (or outside) of iMovie 10 so that I can efficiently eliminate irrelevant content and actually delete files to prevent disk overload would be greatly appreciated.  I am thinking about using iMovie 9 to edit down and delete the unwanted footage and then update the files into iMovie 10 for some of its bells and whistles any problems with that?
    I must admit, I think iMovie 10 is a failure in certain essential ways.  It dropped Keywords, its deletion is not true deletion, and it's all or nothing when deleting an event.  I have always been a huge Apple fan, but this new release of iMovie 10 has not been a good user experience for me. I have read a lot of feedback from others with similar problems and issues with iMovie 10 and would really like to understand what Apple plans to do to address some of these defficiencies in what will hopefully be a much better next version.
    Thanks for any help you can provide.

    Hi PGWilli,
    If you are satisfied with 8.0 then you shouldn't need 4.01 at all. As long as all your bookmarks and personal information are in the newer version, go ahead and remove the older version.

  • IPhone High Score Data File/Sort Oddities

    Hello all.
    I am working on an iPhone game which is nearly complete but I am having trouble with the following high score sort/write code. I am aiming to keep up to 10 scores, sorted from highest to lowest obviously.
    The code creates a new data file with the current score added as first entry if there is no existing data file (and this works), or it creates a data file with the current score as first entry if a data file exists but is empty for some reason (and this works as well), or it adds the current score to a data file of existing scores if it is within the top ten or there are less than ten entries (this is where it gets odd).
    If there is one existing score in the data file, the current score is added and sorted properly. If there are two scores in the data file, the application crashes BUT the data file shows the current score was correctly added and sorted to the existing scores. If there are three existing scores, the application crashes and the data file remains unchanged.
    I have been over the logic many times and tried many different variations of the logic structure to no avail. I suspect it is something simple but I've been staring at it too long to see. Any ideas?
    If there is a better way to display the code/formatting on the forum, please let me know. It doesn't look pretty this way and there must be a way to make it more readable here. I tried to manually format it some to help. The code follows (score variable is brought in from another class but works properly in my tests). At the end I have repeated an isolated snippet of the code where I think the problem occurs.
    *CODE START:*
    int i, ii;
    struct highscoreentry {
    NSString *name;
    int highScore;
    struct highscoreentry structArray(10);
    FILE *fin = fopen("highscore.dat", "rb");
    if (fin != NULL) { //if the data file exists proceed here
    for (i = 0; i < 10; i++) {
    if (fscanf(fin, "%s %d\n", structArray(i).name, &structArray(i).highScore) != EOF) { //if data exists for this iteration proceed
    ii = i; //ii will be the last entry of existing data
    for (i = ii; i > -1; i--) { //will begin at last entry and work up the list of scores to sort
    if (score > structArray(i).highScore) { //if current score is higher than recoded score, recorded score moves down 1 place
    structArray(i + 1) = structArray(i);
    structArray(i).name = (NSString *)"JESSE";
    structArray(i).highScore = score;
    if (i == ii && ii < 9) //if there are less than 10 entries we will add another for our new entry
    ii = ii + 1;
    else if (score < structArray(i).highScore && i == ii) { //if current score is less than last recorded score it becomes new last entry
    structArray(i + 1).name = (NSString *)"JESSE";
    structArray(i + 1).highScore = score;
    if (ii < 9)
    ii = ii + 1;
    fclose(fin);
    if (fin == NULL) { //if the data file does not exist prepare data for new file
    ii = 0; //will be used to limit write iterations to this single new entry
    structArray(0).name = (NSString *)"JESSE";
    structArray(0).highScore = score;
    FILE *fout;
    fout = fopen("highscore.dat", "wb"); //should create/rewrite data file from scratch
    for (i = 0; i <= ii; i++) {
    fprintf(fout, "%s %d\n", structArray(i).name, structArray(i).highScore);
    fclose(fout);
    *CODE END*
    As far as I can tell by commenting out different portions of the code, the problem appears to be somewhere in here:
    *CODE START:*
    if (fin != NULL) { //if the data file exists proceed here
    for (i = 0; i < 10; i++) {
    if (fscanf(fin, "%s %d\n", structArray(i).name, &structArray(i).highScore) != EOF) { //if data exists for this iteration proceed
    *CODE END*
    ...but it baffles me that this works with one structure in the data file, crashes with two structures in the data file but correctly processes/sorts them and writes the file properly, and crashes with three structures in the data file without doing any additional work.
    Jesse Widener
    www.artandstructure.com

    Actually I've found online material to be adequately, and sometimes more than adequately, elucidating in learning the language. When I decided to take a stab at this I spent about 40 hours of my spare time the first week reading 2 or 3 different "takes" on the C/C++/Objective C language in addition to Apple's docs on their implementation along with the iPhone SDK. As I mentioned, I've thus far found the language quite clear and concise. I began my application the second week and this is the first time in 7 weeks of coding where I've felt the need to ask assistance. Every other problem I've solved, leaving no errors, warnings or leaks in my software and accomplishing every task I've set to this point.
    I find reading several different "takes" on a subject helps fill out an understanding from different perspectives. In this case, one perspective might lead the reader to believe or misunderstand the full use/context of a particular syntax, while reading from multiple sources can show the same syntax used in different contexts, broadening the understanding of its use, and that understanding can be user further to interpolate uses in a variety of situations.
    I am new to C/C++/Objective C and the iPhone SDK, but I am not new to programming. It may have been some time (other than hand-coding my website the last few years) and my language experience may be limited to BASIC, HTML, PHP and Javascript, but from my view learning a new language is relatively easy once you know one...even if it is BASIC. The general logic structure remains the same. The overall software design concept remans essentially the same. Both are going to use variables, arrays, subroutines, memory allocation/management, input and output of data, runtime logic, etc. I am 80-90% sure I know exactly how I want to attack a coding problem every time...I just need to know how to "say it in C".
    I don't remember when I first started coding, but I know by age 7 I wrote a karaoke style "Happy Birthday" for my great aunt with music playing through a Commodore 16 via "beeps" figuring the particular vibrations per second of the speaker (the hertz values) and durations for each note in time and pitch perfectly along with "lyrics" printed to screen with the music. To me, learning C is like learning a new foreign language. I took 2 years of French in high school and had to study at it but aced it nonetheless. I then opted to take Spanish but after a semester I opted to stop because the pacing was too slow. Learning Spanish after learning French was a piece of cake. They are in the same general language family and the syntax construction is very similar. I only needed the raw data of the words to fit to the rules I already knew. I didn't need to learn the same rules a second time.
    The C/Objective C language seems no more complicated than it need be, which is to say it seems simple in doing what it needs to do and I am impressed with that simplicity thus far. I am also impressed with Apple's implementation with regard to the iPhone. Being able to provide music via 4-5 lines of code using AVAudioPlayer is transcendental compared to "beeping" every note monophonically.
    Apple's explanations are very clear and concise. It is just, sometimes their examples are sparse or too narrow in scope to get a rounded context. However, their docs are very good and there is a wealth of information here on the net. My biggest complaint with Apple's docs really stems from the fact they seem to want to shove Interface Builder at everything and provide the code to do so but leave the reader stranded if the reader would rather stay within XCode exclusively and do more programmatically rather than leave that much "behind the curtain" work to Interface Builder...but it is a minor complaint.
    On pointers...I do understand the use of pointers, perhaps not to the nth degree as I am just starting out, but the concept makes sense to me. I understand they are not "content" but a memory address location of the "content". I also understand why pointing to a location which is undefined or unprotected is damaging to whatever may be in that location already and to the data being pointed since it can be inadvertently overwritten my some other memory using item.
    {quote}No. The (i < 9) condition is critical. Writing to structArray[10] will crash, since structArray[9] is the end of the array. In practice such a crash might not happen right away, though. If our program's data allocation actually ended at the end of the array, the crash would be immediate. But what usually happens when we write past the end of an array is that the beginning of some other data is overwritten.{quote}
    I need to slap my forehead on this one. I know better than that. I don't know why I missed that. Too many late nights I suppose.
    {quote}(NSString*) is called a type cast in that context.{quote}
    Yes, which is why I used it to deal with the incompatible type error I thought I had at that point, but I shouldn't have assumed by appeasing the compiler I was necessarily solving the problem.
    {quote} The best I can do for now is to caution that an enquiring mind, like all virtues, can be taken too far. I think it's important to compromise and copy good models sometimes. This isn't just to avoid reinventing the wheel. Sometimes it's good to remember we only have a limited time on Earth.{quote}
    Agreed...and I don't expect to understand every nuance the first time around. I expect to at least understand how each successful line of code works in its context, but I imagine some processes will take a few times through before it "clicks" how it works in a greater context than its own, and I am all right with that. I also understand deadlines are deadlines whether they be software development or otherwise and a broad eye needs to be kept to remaining on the track forward.
    Anyway, off to my day job.
    Thank you again...I began reading up on NSDictionary and NSUserDefaults last night. Will post soon.
    Jesse Widener
    www.artandstructure.com

  • How to transfer an xml file to NW Portal Knowledge Management from XI?

    Hi all,
    Anybody knows how to transfer an xml file to NW Portal Knowledge Management from XI?
    What kind of adapter type I have to choose? And which procedures I have to do in KM Portal? Create a folder, what kind of folder and permissions?
    Suggestions and ideas are appreciated.
    Thanks in advance,
    Ricardo.

    Hi
    Can anyone tell me how XI sends messages to applications like J2EE. In REceiver comm channel, I think we specify about the target system like J2EE appl.
    Aadapter Type: HTTP
                   Receiver
    Transport Protocol:  HTTP1.0
    Message Protocol:    XI payload in HTTP body
    Adapter Engine:      Integration Server
    Addressing Type:     URL address
    Target host:         localhost
    Service Number:      7001(Port number of Weblogic appl server--where my J2EE appl is deployed).
    Path     :  /Invoke/DisplayRes/
    Authentication Type:Use Logon Data for SAP System
    Content Type: text/xml
    Username:   xiappluser
    password:   xx
    XML code:   UTF-8
    I suppose XI sends msgs to http://localhost:7001/Invoke/DisplayRes/........
    in this example if am correct?
    Then I have given all tyhe necessary setting but my servlet is not able to display XML msg in browser?
    This is my servlet code:
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
         PrintWriter out = response.getWriter();
         BufferedReader brin =new BufferedReader(new InputStreamReader(request.getInputStream()));
         String inputLine;
         StringBuffer sBuf = new StringBuffer();
            response.setContentType("text/xml");
         while ((inputLine = brin.readLine()) != null)
             sBuf.append(inputLine);
             out.println("hi");            
                out.println(sBuf.toString());
             brin.close();
             out.flush();
    What went wrong?
    Help me, all helpful answers are highly rewarded.
    Thanks

  • High Score Table: Writing a Simple Text File with Flash and PHP

    I am having a problem getting Flash to work with PHP as I need Flash to read and write to a text file on a server to store simple name/score data for a games hi score table. I can read from the text file into Flash easily enough but also need to write to the file when a new high score is reached, so I need to use PHP to do that. I can send the data from flash to the php file via POST but so far it is not working. The PHP file is confirmed as working as I added an echo to the file which displayed a message so I  could check that the server was running PHP - the files were also uploaded to a remote server so I  could test them properly. Flash code is as follows:
    //php filewriter
    var myLV = new LoadVars();
    function sendData() {
    //sets up variable 'hsdata' to send to php
    myLV.hsdata = myText;
    myLV.send("hiscores.php");
    I believe this sends the variable 'myText' to the php file as a variable called 'hsdata' which I want the php file to write into a text file. The mytext variable is just a long string that has all the scores and names in the hiscore. OK, XML would be better way of doing this but for speed I just want to get basic functionality working, so storing a simple text sting is adequate for now. The PHP code that reads the Flash 'hsdata' variable and writes it to the text file 'scores.txt' follows:
    <?php
    //assigns to variable the data POSTed from flash
    $flashdata = $_POST["hsdata"];
    //file handler opens file and erases all contents with w arg
    $fh = fopen("scores.txt","w");
    //adds data to file
    fwrite ($fh,$flashdata);
    //closes file
    fclose ($fh);
    echo 'php file is working';
    ?>
    Any help with this would be greatly appreciated - once I can get php to write simple text files I should be ok. Thanks.

    Thanks for your help.
    I have got Flash working to a certain extent with PHP using loadVars but have been unable to get flash to receive a variable declared in PHP. Here's my Flash code:
    var outLV = new LoadVars();
    var inLV = new LoadVars();
    function sendData() {
    outLV.hsdata = "Hello from Flash";
    outLV.sendAndLoad("http://www.mysite.com/hiscores/test23.php",inLV,"post");
    inLV.onLoad = function(success) {
    if (success) {
      //sets dynamic text box to show variable sent from php
      statusTxt.text = phpmess;
    } else {
      statusTxt.text = "No Data Received";
    This works ok and the inLV.onLoad function reports that it is receiving data but does not display the variable received from PHP. The PHP file is like this:
    <?php
    $mytxt =$_POST['hsdata'];
    $myfile = "test23.txt";
    $fh = fopen($myfile,'w');
    //adds data to file
    fwrite($fh, $mytxt);
    //closes file
    fclose ($fh);
    $mess = "hello there from php";
    echo ("&phpmess=$mess&");
    ?>
    The PHP file is correctly receiving the hsdata from flash and writing it to a text file, but there seems to be a problem with the final part of the code which is intended to send a variable called 'phpmess' back to Flash, this is the string "hello there from php". How do I set up Flash and PHP so that PHP can send a variable back to Flash using echo? Really have tried everything but am totally baffled. Online tutorials have given numerous different syntax configurations for how the PHP file should be written which has really confused me - any help would be greatly appreciated.

  • I bought a new Iphone 4s and when I sync my apps over I lost all of my high scores. How can I get back my high scores as I do not want to start all over on some of the games

    I bought the new Iphone 4s. I backed up my old 3gs on Itunes store before trading in my old Iphone. I sync my new phone and I have all of my apps but non of the high scores. For example I played all of the angry birds and had three stars on all levels. Now I have the app on my Iphone but I am back no levels completed. How do I fix this problem. My Itunes store is on a PC running Windows 7

    Under the answer you want to mark as correct you should see a box that says Correct with a green symbol to the left and a box with Helpful with an orange star to the left. Click on the one you want.
    And thanks for thinking about that, it is appreciated.

  • How to manage huge (3 gb+) files in photoshop

    I have started creating 3gb+ files in CS2 photoshop and my computer is taking 3 minutes to open and 10 minutes to save, etc - driving me mad with the delays. My system (3.166 mhz core duo, ASUS P5K SE/EPU motherboard, 4GB Kingston DDR2 800 RAM, Quadro FX540 video card) copes well with 300MB files but not with these ones.
    Recently I moved my OS to Windows 7 Professional 64-bit in the hope that things would improve but any change was marginal.
    The files are multi-layered designs, 150 dpi, about 16 feet by 10 feet and 1.8GB flattened when they are printed.
    Whilst I know that the designs are pushing the boundaries/restrictions of photoshop I would appreciate any views of members who have figured out how to manage huge files. Any suggestions welcomed, whether hardware/software upgrades, photoshop hints (but the dpi and size cannot change), etc.

    Thanks,
    you've all been helpful. My files were being saved as Photoshop not tiffs but I found a 30 day free trial of CS4 Photoshop and that seems to be making a difference.  It looks like I'll have to purchase that along with some more ram.  My computer is a money pit!
    Thanks again

Maybe you are looking for

  • Setup problem - Extreme no longer found by Mac

    I'm trying to set up an Extreme base station and extend the network with an Express (and use airtunes). I had successfully set up airtunes, but the range was not being extended. After trying to change to a WDS arrangement, I now have a flashing amber

  • Macbook air or pro ?

    Hi. First, I apologise for my english, which is not vey good. So, I'm thinking of changing my old (3 years) white macbook 13' this summer. But I don't know if I have to choose the macbook air 13' or the macbook pro 13'... I'm a student and my tasks a

  • Changes taking place in BWD Infoobjects without actually changing them.

    Dear Experts We have have made certain changes ( like making them Authorization Relevent or Unit conversion ) in the Standard Infoobjects like in 0Material l, 0Plant, 0Bus_area etc. and tranported them to BWQ and BWP. Few days back I noticed that all

  • Bridge won't save metadata for .mov files

    Hi. I could be trying to do something that Bridge can't do (though I have read that it should). I am trying to add metadata to .mov files. Bridge allows me to enter the text both under 'File info' and in the Metadada IPTC Core fields, however when I

  • Runtime Shared Assets and dynamic folder structures

    I am using a CMS to load dynamic pages. Most of these pages have Flash content. The content SWFs all reference a SWF that holds shared library assets. The CMS undergoes periodic overhauls and the content gets shuffled. This results in broken links to