How to process a simple notepad file and extract something from it not all.

I am sending the text file from html page to servlet and i want to do something with that text file and the result would be in excel.
for example if my file contains:
Notepad file Contains:
CP STATE
MAU SB SBSTATE
NRM B WO
and i want only SB,SBSTATE in my excel file not MAU option in excel.
I want output in excel as:
SB SBSTATE
B WO
so please tell how to do this.
Please write some program to explain this,i will be very thankful to you.
BR//
Anubhav Gulati

I am not angry, I am just seriously helping you to become a developer :)
I've suggested you to use BufferedReader. It's API is descriptive enough (as all other API's of Sun tho). And the official I/O tutorial of Sun is also very helpful. Further on you only need to play with String#substring(), String#indexOf() and/or String#matches(), which are all already basic knowledge of the Java String API.
Or ask us the specific question/problem where you're stucking with, while you're trying to develop it.

Similar Messages

  • How can I read the bootstrap files and extract the fragment-URLs and fragment-numbers in plain text?

    How can I read the bootstrap files of any HDS Live stream and extract the fragment-URLs and fragment-numbers in plain text?
    Could it be that it is some kind of compressed format in the bootstrap? Can I uncompress it wirh  f4fpackager.exe? Could not find any download for f4fpackager.exe. I would prefere less code to do so. Is there something in Java of JavaScript, that can extract the fragment-numbers?
    Thank you!

    Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
    Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave.

  • When I export a playlist and then open in excel, do whatever sorting I want, I then save the file and reimport into itunes but not all the songs are there. It appears to be from "comma's" in the song name. Any solutions?

    I see songs such as "Monday, Monday" or "Paint It, Black" or even the artist name such as "Fireballs, with Jimmy Gilmer" which have comma's in them, being a problem when I try to do the following:
    1. Export a playlist which contains songs which are all there and play fine, but some have comma's in the title such as listed above.
    2. I then open that file in Excel and bring it in as a Tab-delimited file.  Everything lays out fine, and all the songs are thing (including those with comma's).
    3. I then sort the varoius fields I want (which I can't do in i-tunes because i-tunes won't sort it properly), and resave the file as a newly named file, which is also a .txt file.
    4. I then import that playlist into my itunes. It is exactly the same songs that I just had exported but i-tunes says some of the songs can't be found.
    I have traced this problem to comma's in the file name of the song such as listed above.  There must be a solution to this either as the file is opened in excel or in how it's saved or some other solution short of having to rename song/artists without using comma's. 
    Thanks.

    The additional problem is the file name of the song itself.  Even if I were able to delete the commas or replace with a space for example, changing the file name would result in itunes not being able to find the file.  I would have to go through each file (out of about 15,000+ songs) to find any that have titles such as described in this thread and change not only the song and artist in the fields, but changing the mp3 file itself. 
    I fear that I am really pretty much going to have to start with a list of songs that have no comma and then do a file compare to find those songs with commas and then just physically moving them into a new playlist I'm trying to create, but this is a royal pain as I want to be able to create a variety of playlists based on these chart dates/peak positions. 
    I'm trying to sort the songs in this manner:  I use different fields in itunes so that I can put the "peak position" of each song based on Billboard charts, as well as the date the peak position was acheived. I use the "comment box" for that.  I use the "grouping" field for my peak position.
    So I end up with something like "10/14/1980" in the comment box as the peak position for a song which is in the grouping field, and so forth.  If I try to sort the comments column in itunes for example, it won't sort properly. If I sort the Grouping field, it will bring up all the "1's", but that's followed by "10", 11, ...19, then "2", etc.  This is why I want to export the playlist and sort it as I want, and then reimport the playlist into itunes. 
    What I'm ultimately trying to achieve is a year-by-year peak position playlist so that I end up with every #1 song (in this case) from, say, January 1st 1980 and then every #1 song in sequential order for the rest of the year falls in line.  I have chart position dates from 1955 through 1999.  I have entered in all the data from Billboard books I own so I can really create some amazing playlists, but these commas are problematic. Had I known this ahead of time I would have made "Monday, Monday" as "Monday Monday" and not included commas, but it's too late for that.
    Any suggestions?

  • How to pass selection filters to logic and extract data from BI to BPC

    Hi everybody. I checked the forum and I found and tried some solutions but not matching my main aim.
    Scenario:
    In the input schedule I have a button which runs a data package to upload datas into BPC, coming from a BI cube.
    The pushbutton menu is ok. I tried also a solution suggested on the blogs and I can upload all transaction datas from BI to BPC successfully.
    But when I run the data load, I want to take from the BI cube ONLY the datas matching the CVW selected, not all the datas from the BI cube. Second needing is to upload during the run 2 keyfigures from BI to BPC with same selection filter.
    Example:
    - I select in the Current view  ENTITY:  ACME  and CATEGORY: CON
    - I want to upload the 0AMOUNT and 0QUANTITY from the BI cube to BPC of the 0COMPANY "ACME" and the 0VERSION: "CON"
    As I understand I can put in the Options of my transformation file using SELECTION , something to filter the datas, but I want that this is dependent from the current view selection. No extra prompts, and to upload the 2 keyfigures in the same process.
    Any idea is welcome.
    Thanks a lot in advance  for any help.
    Edited by: Walter Cista on May 29, 2010 9:29 AM
    Edited by: Walter Cista on May 30, 2010 7:14 PM

    Hi,
    thanks for the answer, but my situation is little bit different.
    I don't want to ask again with prompt to choose my ENTITY to the user, because I have on the main Input schedule, a menu button to choose ENTITY and so the user will just choose once.
    I also understood that the variables selected with the current view, can be found inside DEFAULT logic with [dimension].Currentmember, but I do not work with default logic. I have my own ZLOGIC, and during the call I would like to pass the ENTITY choosen by the user to the logic. In this way when I run my transformation to upload data from a BI cube to BPC cube, I only select a slice of datas, not all the datas in the cube. In short, if I can manage the [DIMENSION].CURRENTMEMBER I will only take from the BI cube the datas I want. As I know if in the TRASFORMATION OPTIONS, in SELECTION if I pass some datas, like ENTITY = ACME I upload to BPC only BI datas of company ACME.....
    So, I would like to do something like this.
    Any reply and help is welcome
    Walter

  • How can I move my address file and mail folders from one drive image to the active drive?

    I have a drive with recovered data from a crashed drive. How do I import the Thunderbird address file to the new, current drive ( also the mail folders ) ?

    Look at https://support.mozilla.org/en-US/kb/profiles-tb#w_how-to-find-your-profile to locate your profile on the recovered disk.
    If you are just starting TB with a new profile, the simplest thing to do would be to copy the recovered profile to the directory where your current profile is located. Then switch; see https://support.mozilla.org/en-US/kb/using-multiple-profiles to switch to the other profile
    If you have stuff in your current profile you need to save or merge, let me know and I will give you further instructions.

  • How do I process multiple files and turn them from raw to jpeg

    How do I process multiple files and turn them from raw to jpeg. Ive tried and it seems to go through the files but doesnt seem to process them or store them in the selected folder

    Yes that was the first thing I did. Then I used the process multiple files and selected a new folder to put them in and selected use open files and selected to turn them into jpeg. The images flash on the screen like they are being processed, but the folder never appears in library. Is it possible because there are a couple 16 bit files open that this corrupts the task. Do I need to create the folder first. Will elements not create the folder on its own.
    Thanks Vince

  • How to test the simple .java file in cactus

    dear friends,
    i have use the junit first time .And i am working in weblogic8.1 so i have use cactus .But i face the problem to use it.
    1. how to test the simple .java file in cactus.
    2.how to run the cactus in weblogic 8.1.

    Hi,
    It is because the converter works on byte code and it only supports a subset of the Java language (see the JC specifications). It is kind of like compiling you code on Java 6 and trying to run it on Java 5. The JCDK outlines the required compiler version.
    Cheers,
    Shane

  • How can one  read a Excel File and Upload into Table using Pl/SQL Code.

    How can one read a Excel File and Upload into Table using Pl/SQL Code.
    1. Excel File is on My PC.
    2. And I want to write a Stored Procedure or Package to do that.
    3. DataBase is on Other Server. Client-Server Environment.
    4. I am Using Toad or PlSql developer tool.

    If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
    1. Get your DBA to create directory object in oracle using the following command:
    create directory TEST_DIR as ‘directory_path’;
    Note: This directory is on the server.
    2. Grant read,write on directory directory_object_name to username;
    You can find out the directory_object_name value from dba_directories view if you are using the system user account.
    3. Logon as the user as mentioned above.
    Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
    function getData(p_filename in varchar2,
    p_filepath in varchar2
    ) RETURN VARCHAR2 is
    input_file utl_file.file_type;
    --declare a buffer to read text data
    input_buffer varchar2(4000);
    begin
    --using the UTL_FILE in built package
    input_file := utl_file.fopen(p_filepath, p_filename, 'R');
    utl_file.get_line(input_file, input_buffer);
    --debug
    --dbms_output.put_line(input_buffer);
    utl_file.fclose(input_file);
    --return data
    return input_buffer;
    end;
    Hope this helps.

  • How to remove a font file and its mapping from XML Publisher Administrator

    Hello,
    I am trying to remove a font file and its mapping from the XML Publisher Administrator. If this is not possible, is there a way to disable it?
    The reason why I am asking this is because we just got a new check printer, and I was able to print just fine. However, the MICR font was not coming up properly on the check, so I went ahead and configured the font with the XML Publisher Administrator. Now my check output is coming up blank after running the XML report publisher program. The only change I did was to upload the MICR font and mapped it.
    My template and rdf report file are working fine in another environment we have, so I know that's not the problem.
    Any help is appreciate it.
    Thanks.

    This is how you do it
    Font
    DELETE FROM xdo_lobs
    where lob_code like '<Font_name>';
    Font Mapping Set
    DELETE FROM xdo_font_mapping_sets_TL
    WHERE mapping_code like '<MAPPING_CODE>'

  • TS4036 how can I view backed up files and delete things I don't need

    how do I view backed up files and delete thing I don't need

    You can't view individual files contained in the backup.  You can control which apps are backed up, and whether or not the camera roll is included in the backup, by going to Settings>iCloud>Storage & Backup>Manage Storage, tapping the name of your device under Backups, then looking under Backup Options.

  • How can i make shorten systemlog files and joblog files on OS

    Hello
    How can i make shorten systemlog files and joblog files on OS

    Hello Jan,
    You can limit the size of system log.
    The size of the application server's System Log is determined by the
    following SAP profile parameters. Once the current System Log reaches
    the maximum file size, it gets moved to the old_file and and a new
    System Log file gets created. The number of past days messages in the
    System Log depends on the amount/activity of System Log messages and the
    max file size. Once messages get rolled off the current and old files,
    they are no longer retrievable.
    rslg/local/file /usr/sap/<SID>/D*/log/SLOG<SYSNO>
    rslg/local/old_file /usr/sap/<SID>/D*/log/SLOGO<SYSNO>
    rslg/max_diskspace/local 1000000
    rslg/central/file /usr/sap/<SID>/SYS/global/SLOGJ
    rslg/central/old_file /usr/sap/<SID>/SYS/global/SLOGJO
    rslg/max_diskspace/central
    Refer to http://help.sap.com/saphelp_nw70/helpdata/EN/c7/69bcbaf36611d3a6510000e835363f/content.htm
    for explanation of profile parameters.you can reduce the size of system log using rslg/max_diskspace_local and rslg/max_diskspace_central
    But you can't reduce the size of job log files on OS
    Rohit

  • How can I back up my files and photos on my iPhone to my iMac?

    How can I back up my files and photos on my iPhone to my iMac?

    You can back up the iPhone to your Mac with iTunes.
    Make sure, your iTunes version is up to date. Connect your iPhone to an USB port and launch iTunes.
    See this document: http://support.apple.com/kb/HT1766
    If you want a separate folder with your photos, download the camera roll contents by connecting the iPhone to USB. You emac will see it as camera and you can download the photos using Image Capture to a folder on your Mac, or using iPhoto or Aperture to your photo library.

  • How can i password protect some files and web sites?

    How can I possword protect some files and web sites on my mac air so others using my laptop can't access them?

    Set a password for your user; create other user accounts for when other people want to use it. You can create a "guest" login which gets wiped after every logout, if that's more appropriate for them.
    Matt

  • How do I record a sound file and send it as an attachment using my 4s?

    How do I record a sound file and send it as an attachment using my 4s?

    Hi,
    The following is the program[Click Here| http://saptechnical .com/Tips/ABAP/email/EmailProgram.txt] which will send any format file. Actual Creator of the program is Amit Bisht.
    Thanks & Regards,
    Rock.

  • How to design SQL server data file and log file growth

    how to design SQL DB data file and log file growth- SQL server 2012
    if my data file is having 10 GB sizze and log file is having 5 GB size
    what should be the size in MB (not in %) of autogrowth. based on what we have to determine the ideal size of file auto growth.

    It's very difficult to give a definitive answer on this. Best principal is to size your database correctly in advance so that you never have to autogrow, of course in reality that isn't always practical.
    The setting you use is really dictated by the expected growth in your files. Given that the size is relatively small why not set it to 1gb on the datafile(s) and 512mb on the log file? The important thing is to monitor it on an on-going basis to see if that's
    the appropriate amount.
    One thing you should do is enable instant file initialization by granting the service account Perform Volume Maintenance tasks in group policy. This will allow the data files to grow quickly when required, details here:
    https://technet.microsoft.com/en-us/library/ms175935%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396
    Also, it possible to query the default trace to find autogrowth events, if you wanted you could write an alert/sql job based on this 
    SELECT
    [DatabaseName],
    [FileName],
    [SPID],
    [Duration],
    [StartTime],
    [EndTime],
    CASE [EventClass]
    WHEN 92 THEN 'Data'
    WHEN 93 THEN 'Log' END
    FROM sys.fn_trace_gettable('c:\path\to\trace.trc', DEFAULT)
    WHERE
    EventClass IN (92,93)
    hope that helps

Maybe you are looking for

  • Unable to install OS X on Mini Mac

    I am trying to install OS X Lion on my Mini Mac.  Currently I am running OSX 10.4.11. 

  • Projects group/set for report painter

    Dear, I want to create a report painter report to compare cost of projects. I would like to be able to create groups for my projects, like you can do for internal order with KOH1, and use these for my report. how can I create these project groups and

  • Printing Word document from Mac

    When I print a word document I created, apostrophes are printing as some strange character that looks like a small 1 with an apostrophe above it. Any ideas how I can stop this?

  • No javaws in AMD64 Linux distribution

    Hey everyone! I'm trying to use Java webstart. I just installed jdk-1_5_0_07-linux-amd64-rpm.bin, and there is no javaws command, although it's man page is installed. linux:~ # ls /usr/java/jdk1.5.0_07/bin .             jarsigner  jdb        jstatd  

  • Slot CD Drive

    Where can I find a replacement CD drive for my iMac 400MHZ DV (Special Edition)? Preferably a DVD/CDR drive.