Looking for a approach to parse a file

I need to parse a file. The file is Oracle's tnsnames.ora file. The file is well formated here is a sample:
to10 =
(description =
(address = (protocol = tcp)(host = oxnard1)(port = 1521))
(connect_data = (service_name = to10.ln))
to9s1 =
(description =
(address = (protocol = tcp)(host = oxnard1)(port = 1521))
(connect_data = (sid = to9s1))
to9 =
(description =
(address = (protocol = tcp)(host = oxnard1)(port = 1521))
(connect_data = (sid = to9))
what would be supplied is XXXX = where XXXX = is some name after that the rest of it may or may not be on the same line and may or may not have different parts.But I do know a rule is: After the name and an = sign I must have a ( then at the end of the section it must be inclosed with a ) something like:
XXX = ( stuff and stuff )
I need a bit of advice on how to isolate a section of it. I have tried looking at Java's regular expressions and looking at a character by character reading in. any good ideas would be helpful.
Thanks

readLine() of RandomAccessFile(java.io) and StringTokenizer class of java.util package may help you.

Similar Messages

  • Scan\Look for a particular character in a file

    I would like to look for a particular character(@) in a file. The character might be in a word. When if find the character I want to read the actual whole word that contains that character.
    What's the best way of going abt this?
    Thx,
    Kapapra.

    Read the file line by line using BufferedReader.
    Tokenize each line on space.
    Loop through the token strings.
    For each token that contains the character that you are looking for (e.g. @) found using indexOf operator of the String class, print or save (or whatever you want to do with that token) that token.
    Continue reading the file line by line till the end of the file.
    Does this make sense? Look the java.io package API for the details on how to read the file and stuff.
    If anyone has more effecient method to do this, please share.

  • Looking for help with converting a ppsx file to a video format such as .mov or mp4

    Hi All,  I am looking for conversion software that will allow me to convert a ppsx file to a video file on OS10.5.8. 

    Hi Klaus1, Thanks for your response.  I can open and view the file without difficulty.  My issue is getting into a video format that I can upload to a Website for client viewing.  All the conersion products I can find are for a newer OS then 10.5.8.  I am working on a deadline of midnight tonight-and cannot upgrade that quickly.  So What I need is a conversion program that will still run on my OS

  • Looking for comprehensive program to create pdf file from gif image

    Hello,
    I'm looking for a program that can transform gif image file into pdf file. It is very importent to keep the same quality of the output document as the original image.
    I've seen Bridge CS5 in action and was very much disapointed, because the original gif image had 2 colors: black and white, took 60k Byte A4 paper size. But the output pdf file became somehow to 700k Byte size. When our proffi tried to lower the ppi or quality bar there was direct impact on the image quality.
    Long time ago Photoshop was able to export images as pdf files and one of the options of the pdf file was to keep the original image as gif, not as jpeg. Because jpeg is very costy format for black-white images and no-one wants to waste memory in vain, so I do not like to save pdf files of 1MB size for an image that takes 100k in gif.
    I do understand that nowdays using Photoshop to save pdf files is not the option anymore, isn't it ?
    What program can you suggest me to use ? I still prefer to use Adobe products, as long as I can, through I'm starting to get scared of sharp decline in quality.
    Thank you in advance.
    sincerely,
    Al

    No, I didn't. The last time I saw it, it was looking just as a regular Reader with a little more options and with an addon to MS-Office, to allow to save MS documents to pdf from inside MS-Office user interface products, and frankly, I do not highly admire there products at all, so I do not have MS-Office installed. But it was also long time ago. If the situation did changed since than,  I will try it.
    Thank you very much.
    I've just tried the Acrobat. It worked great ! Thank you. Just not all the images have options how to save them in pdf file, but that's ok for now

  • I'm looking for a program to convert midi files to sheet music on a Mac

    Hi,  I looking for a program like 'Notation Composer' or 'Midillustrator' (Windows based) that works on my MacBook Pro.  My computer skills are limited so I don't want anything to complex.  I have been using Notation Composer for a couple of years on a Windows based desktop and thought I would put my files on a MacBook Pro and to my amazement it won't work on macbook.  I'm not prepared to change my computer, so I'm looking at other options.  Cheers stweever

    Google search came up with Harmony Assistant.  Their are others.  You should also search MacUpdate and CNET Mac Downloads.  Only you can tell which software is too complex or not.

  • Looking for advice on export settings - one file to suit all purposes?

    Hi all, here is my current workflow when exporting:
    Adobe Premiere CS5 - Export to mpeg2-bluray or h264-bluray 5.1 file using surcode plugin, which gives me a seperate video and audio file which I then import into encore cs5 to author a bluray and/or dvd from. I then keep the original seperate audio and video files as an archive.
    Now I have upgraded to premiere CC 2014 I can not find a 1080p 25p export preset under either mpeg or h264 bluray. Somebody told me that I have to select upper fields first if I want 25p.. Not sure why this is the case with CC and wasnt with CS5?
    Anyway, this guy also said I'm losing quality by exporting my master in the way I do and that I should try something like cineform mov. I did this and the quality looked great on PC. I also got 25p in the options which puts my mind at rest about horrible interlaced lines popping up somewhere and although I didnt see the term surcode mentioned anywhere, I managed to get 5.1 audio in this file too.
    The problem with this method is that a) The file didn't import into encore CS5 (I was told it had too many audio streams for that file type) and also the file doesn't play back on my WDTV media player which is not essential but would be a nice plus (even if I need to buy a new media player)
    So with this in mind, which format/s would you suggest I export to?
    I would really appreciate your input!

    this guy also said I'm losing quality by exporting my master in the way I do
    your friend is right
    mpeg2 is highly compressed and not the best option for archiving
    for archives, i recommend exporting a lossless, full resolution master file
    that mirrors the frame rate and scan type of your final sequence
    my preferred format for this purpose is the free ut video codec*
    lossless - win or mac:
    http://www.videohelp.com/tools/Ut-Video-Codec-Suite
    you can then use your lossless, archive-ready master to quickly and easily
    encode files for other delivery options like blu-ray or web
    a) The file didn't import into encore CS5 (I was told it had too many audio streams for that file type)
    if you need to burn a blu-ray, you should use your lossless master
    to encode mpeg2 video / audio for import into encore
    ) and also the file doesn't play back on my WDTV media player which is not essential but would be a nice plus (even if I need to buy a new media player)
    ut .avi files play fine in windows media player,
    and i assume ut .mov files play fine in quicktime player*
    *i don't use cineform, and can't comment on it's merits or faults
    *i use a pc, and encode .avi files
    hahahahahahahahahahahahahaha!!!!

  • Help? Looking for better approaches to mutlithreading, parallelism (producer/consumer)

     Hi,
         So II would like to do some parallel processing of data using the multiple cores of my computer, and I'm trying to find a way to do this in labview.  I deally, I would liek to be able to take a given task, put the work into a work queue, have threads from each processor take a task from the work queue and process it in parallel until the work queue is empty, and put the result into a results queue where I could then write the results to a file. So in a text-based languange, the implmentation would be straightforward.. but I'm not sure how to go about this in Labview. 
           I've read about the different designs patterns, and was trying to use a Producer/Consumer approach with queues. What I wanted to do was read a list of files from a directory, stuff the paths into a queue (Work Producer), then have a second loop (Work consumer/Results Producer) dequeue each file, process it, and send the results to a second queue.  Then at the end, a final loop (Results consumer) would read all of the results.
     My question now is..  is there a way to do this more cleanly than what I have on the diagram?  Right now, I have to know in advance how many parallel tasks I want to use, then I have to wire up each task before executing the program.  If I move to a different computer, I need to change the wiring digram.  Is there a way to abstract this to avoid having to make huge changes to the block diagram?  I was considering trying to make the parallel portion fit into a subVI so that I could just copy and paste several sub-vi's to easily add and remove parallel threads..    but its not so simple to have to keep track of all the queue references, and etc..  
    Has anyone already done somoething like this? I feel like what i'm trying now is becomming a big mess
    Thanks

    You can run clones (instaciate from tempaltes) of the crunching code where each get a ref to the queue based on its name. When they see the queue is empty the terminate and close.
    Make sure your queue is full be fore you lauch them.
    There is supposed to be new property that tells you how many CPU you have but I can't find it at the moment.
    Have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Want to start PSE 12 in photo editor but it will only start in Orgaizer, can't get to welcome screen and the .exe file that Adobe said to look for does not exist on my files

    Have tried to start PSE 12 in photo editor but it continues to start in Organizer.  I do not want my pictures loaded in Organizer at all.  Saw a page on the web that said to click on an .exe editor file but that is not on my files.  Also cannot get a welcome screen to come up, only an organizer even though I checked it the first time to come up in photo editor.  I'm now having Organizer crammed down my throat.  Tried online chat but was cut off with the statement that no support is offered for v12 any longer.

    Hi,
    You failed to say which operating system you are running on so I'm assuming it is Windows of some type.
    You should be able to find the following files, using explorer, depending on your system.
    64bit system: "C:\Program Files (x86)\Adobe\Photoshop Elements 12\PhotoshopElementsEditor.exe"
    32bit system: "C:\Program Files\Adobe\Photoshop Elements 12\PhotoshopElementsEditor.exe"
    Double clicking on that should start the editor - suggest to create a shortcut to it.
    If you can't find one of those files, then you either installed it somewhere else or you need to re-install elements.
    Brian

  • Is there a way to lock the location of where iTunes is looking for music regardless of the itl file.  I am loading a remote itl file by default ever time but then it's looking for the music on a local drive instead of a network drive.

    So I have a number of PC's in the house that are dumping music into a central PC with a network shared drive.
    The music is dumped into the "automatically added to library" folder on the remote PC.  Itunes is always running in the background.
    When I open iTunes on my local PC a script retrieves the newest ITL file from the remote PC, then the script opens iTunes using the updated ITL file.
    This way I have a fresh copy of the remote library music every time.  The problem is the music location under advanced settings.  I can change it every time but I would like to make this as automatic as possible.  The question I guess is if there is a way to lock the music location or have it change via a script every time iTunes opens.

    You can't change the location of the media folder from a script, neither can you change which library file is opened. I assume your script simply copies the current master library into the normal location for the file on each client machine. Do you not get a file locked error? What about the other library files and the Album Artwork cache?
    Your scheme may work best if you use a common drive letter for your media folder and have it so the media folder is not inside the master library folder. E.g.
    Master library folder at X:\iTunes
    Master media folder at X:\iTunes Media
    Where all the computers see drive X: as the same object, be it the whole of that drive or a shared folder on it.
    If you have the typical arrangement (iTunes Media inside iTunes) then when you copy the library from X:\iTunes into C:\....\iTunes and start iTunes it will attempt to "correct" for the fact that you've apparently moved the library and reset the library folder to C:\....\iTunes\iTunes Media. It should still be able to find the media at the correct location, but if you accidentally load anything up from a client machine it will end up in a local folder.
    If you are not already familiar with it iTunes Folder Watch will be a useful tool for catching up with any additions made on the client computers. You should probably also ensure that each of the clients has the "Keep iTunes Media folder organized" option disabled.
    tt2

  • Looking for best approach to implement all ERP and CRM Analytics

    There is a scope to implement all the ERP Analytics (HR, Finance, SCM, Procurement & Spend, Project) and CRM Analytics (Sales, service, Marketing, Contact Center, Price, Loyalty ). Just want to know the best approach for impelmentation of both ERP and CRM analytics
    1- Work with two separate containers with separate execution plan for ERP and CRM
    2- Work with one container with one execution plan for both ERP and CRM
    3- Work with one container with separate execution plans for both ERP and CRM
    Also, Please let me know if there any standard document to achieve both the implementations simultaneously.
    Thanks!

    Answer, as always, is "it depends". Here is a list of things to consider w the 3 approaches you mentioned:
    1- Work with two separate containers with separate execution plan for ERP and CRM
    This is a good approach if you plan on a different frequency of ETL loads for each container or different timings. As long as the targets are the same and you run INCREMENTAL loads from both containers, then the refresh dates will be updated. This is usually a good idea if your ERP and CRM users have different timing and load requirements and do not want to "interfere" w each other. You will also have DATASOURCE NUM ID uniquely defined for each system so the data will be segregated. By default, each source system will have its own container
    2- Work with one container with one execution plan for both ERP and CRM
    This is good if you are ok w the same exact load time for both. Its a simple approach and all tables will be loaded at the same time to avoid any confusion.
    3- Work with one container with separate execution plans for both ERP and CRM
    Not sure what the advantage of this option versus keeping them in separate containers (like Option 1).
    I would also review the secion in the DAC guide for "MultiSource Execution Plans"
    if helpful, pls mark correct

  • Looking for a codec to use AVI files on Windows 8

    Thanks for you assistance. My new computer using Windows 8 doesn't take a shine to me using AVI files in Adobe Premiere. Prompts me to install a codec. Pretty sure there are a ga'zillion out there. Any suggestions on which is right? And one step further, how to properly install? Best regards!

    @ATRomano - First, thank you for your reply. I've been trying to correct this problem since purchasing the new computer in Dec, and this is effecting my livelihood.
    Here's a what I know.
    Downloaded Adobe Premiere 11 from Amazon in June 2013 onto my Sony Vaio laptop running on Windows 7. the AVI files from my Fujifilm Finepix 4500S camera were accepted. The AVI files are titled DSCF0217.AVI. for example.
    Computer crashed on T-day, so forced to buy new one. Also a Vaio, this time running on Windows 8. AVI files from my Fugifilm Finepix 4500S no longer work. Says I need a codec.
    Went to Best Buy. They spent two hours on it, nothing. There solution since the AVI files worked on Windows Media player, was to start uses Sony Vaio's editing software the comes with the computer, really?
    Then all of a sudden, the program is gone. Completely removed from my computer. All the projects and video/pics in elements included.
    So last night I redownloaded the software from Amazon. Thank goodness they kept the serial number.
    Surprisingly, the projects are still there, though when I open them most of the files in the timeline are AVI and appear as "Media Offline."
    When I try to add new AVI files to the time I receive this error message - "This type of file is not supports, or requires a codec to be installed."

  • TDMS - Looking for best approach

    Good day.
    We're trying to successfully implement TDMS to populate our development system / QA system with 1 year's worth of production data. We are currently using a sandbox with a copy of our dev. system as a playground to validate the data.
    Unfortunately, after executing a one year scenario, our Functional Analyst have found the data to be corrupt and unusable. All issues point to 2 major problems:
    1) Missing configuration (ex: top level Cost Center S group missing)
    2) Missing master data (ex: not all material masters transferred)
    We were curious what the proper approach to solving this problem would be?
    Here is the approach we took:
    1) Copy DEV to a Sandbox.
    2) Delete all un-nessassary clients
    3) Export main client (100)
    4) Import main client (config and user master data only)
    5) Execute TDMS Time based reduction for 1 year.
    We were curious if we could leverage any of the other package types to potentially resolve our issues.
    - Shell Creation: Should this package be executed first?
    - Master Data and Customizing: Will the master data from this package be deleted by the Time Based Reduction?
    Any help would be greately appreciated.
    Thank you,
    Charles.

    Hello,
    TDMS basically transfers the client dependant data and assumes that the repositories of the sender(PRD) and the receiver(QA) systems are same.Repository means that all client independant objects and cross client customizing be the same.
    The TDTIM scenario is a time based reduction scenario which transfers the data based on a given period.This package also transfers the master & customizing data along with the sliced transaction data.This package can be executed independantly with out running the TDMDC scenario.
    The TDMDC scenario transfers the Master data & Customizing only and not the transaction data.
    The TDSHL or shell creation creates an empty repository and makes the system ready for the TDTIM or TDMDC scenarios.However after the shell creation it is necessary that the TDTIM or TDMDC scenario is run to obtain consistancy.
    In your case, the material master should have been transferred as a part of the TDTIM/TDMDC package.Check if the conversion object for Material Master table is transferred.If not the trouble shooting provided for TDMS should help you to transfer a conversion object which has failed during migration.
    Regards,
    Sourabh

  • Looking for a b3d loader/parser written i java

    Can anyone help me with that? Or is the only way to write it myself...

    "Head First in Java" book I've heard is highly recommended. I wouldn't suggest certification books since in my opinion they are for developers who have taken several programming classes and are preparing to pad their resumes with certifications for jobs
    . You can go to the bookstore to see if its the book you want, then order it on-line a lot cheaper (www.amazon.com). After reading it, you have it on your bookshelf for reference (the index helps a lot to re-locate information). After you compile and run a few programs from the DOS command line, I would suggest downloading Eclipse Europa (search google for it). Its a free development environment many professional developers use. You'll have to install JDK first (its free, search google for it).
    If you want to eventually develop web applications, here are the books I would recommend (I dont expect you to read them until you're in college, but it gives you some idea):
    HTML
    JSP
    Servlets
    JDBC
    SQL
    Javascript

  • HT4972 My ipad 1 is stuck on IOS 4 as the IOS 5 update instructions do not work. When I use itunes update the software looks for an update file and the apple site doesn't have one!

    My ipad 1 is stuck on IOS 4 as these IOS 5 update instructions do not work. When I use itunes update the software looks for an IOS 5 software update file and the apple site doesn't seem have one anywhere!

    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 6.0.1. For the iPad Mini the iOS is 6.0.2. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update an iPad (except iPad 1) to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

  • Looking for OSX (1) or Third Party (2) Solution to tag Audio Files

    Hey all,
    I'm new here. I've signed up, because I'm looking for a way to Tag Audio Files. I've been doing Audio Diary over the years. Now instead of converting the Audio to Text, I'm looking for a way to identify Audio entries by adding Tags to them. I'm a little reluctant to use third party. you never now how long they survive. and tagging the files will be quite some work.
    so my question to you is: 1) Is there a way to tag and locate audio Files using the OS X (primary) or third Party (secondary?)
    thx
    Jazz
    ps: I know you can use the Command-I to add Spotlight Comments, but I've had some Issues that Spotlight sometimes does not locate the Files by the added Comment. further on I read about these problems in several Forums too.

    Hey Jazz. you can start by locating the files by doing a Find search - NOT Spotlight - and using the filetype. That will locate all the .mp3 or .ogg or whatever filetype they are and round them up for you.
    Once you do that, and you know how to quickly find them all, you can then get a script to batch process those files. You can use the Automator application to do that, so your next best bet would be to start dabbling with it, and see if there's any scripts available. (Im SURE there are.. there has to be..)
    I think you'll have success on the OSX Technologies threads.. the Automator and scripting stuff is there.

Maybe you are looking for

  • Bcp_init fails in Red Hat Enterprise Linux Server release 6.0

    Hi, I tried to do few basic BCP stuff using C. I have installed unixODBC 2.3.0 and MSSQL ODBC driver SQL Server Native Client 11.0. I tried connecting to my remote MSSQL Server(2008 r2 & 2012) using 'isql', it works! But when I tried running bcp_init

  • Request For Enhancement: Add method mouseIn() to JComponent

    I would like to propose that a new method be added to JComponent. This method would return boolean true if the mouse is currently over the JComponent and false if not. Method signature: public boolean mouseIn(). This method would make it easier to ac

  • Running OS X Lion at 640 x 480

    How do I run Lion at 640 x 480, I have an old CRT projector and this is the maximum resolution it will handle. Snow Leopard on my old MBP managed it but the minimum I can see on Lion is 800 x 600.. There must be some third party software or a work ar

  • 10g等待事件Streams AQ: qmn coordinator waiting for slave to start

    Top 5 Timed Events Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class CPU time 143 82.5 db file sequential read 2,747 24 9 14.1 User I/O Streams AQ: qmn coordinator waiting for slave to start      4             21             5,259        

  • How can we read NTFS on 10.8.4?

    All the question is in the title. Thanks!