Properties: how do I read the comments in it?

I'm using a Properties object to read key-value pairs. But I found I also need to read the comments in the properties file. How can I do that? :)

I think that once you start having that level of detail (eg descriptions) associated with properties, then you should go the XML route.
Property files are great, but for quick control of basically one-dimensional properties. You can use "load" on the file, they're easy to edit in just about any text editor, it's great. But once you need multi-dimensional attributes to the properties, you must use something richer.
If you're writing some kind of Properties file editor -- maybe you're forced to use Properties files for backwards compatibility but you're trying to make them easier to edit for non-techies? -- then you'd skip the Properties.load method, and parse them yourself, with FileReader as yawmark suggested. Of course once you're doing this, you'll be reading both the comments and the properties, and furthermore you'll be imposing some kind of convention ("comments always come before properties, not after", "a blank line separates comments") which can easily be violated, to your chagrin.
I say, either skip trying to read comments, or move up to XML or something, if you possibly can.

Similar Messages

  • When printing a signed document with Adobe Reader, the comment icons appear.  How do I prevent this

    When printing a signed document with Adobe Reader, the comment icons appear.  How do I prevent this ?

    When printing from Reader, select Document instead of Document and Markups:

  • How do you read the camera position in the 3d picture control?

    Hello,
    There is a method to setup the camera position, but how do you read the current camera position?  e.g. the user uses the mouse, ctrl, and shift, to change the camera position.  How do you read this new camera position?  There don't seem to be any properties to do this.
    I've read this thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=214629&requireLogin=False
    but the question was never answered....
    From the comments in that thread, even if you had the proper documentation for the "Model Matrix" property, you couldn't get the information necessary to calculation the camera position.

    Lorielle,
    Thanks for the VI.
    Could you point me towards a more detailed description of the "Modelview Matrix" property?  I've attached a screenshot from the online help.  It is not very helpful.
    Attachments:
    Modelview Matrix.jpg ‏71 KB
    Modelview Matrix1.jpg ‏71 KB

  • How do I read the selected value of a comboBox?

    I need to send the selected value of a comboBox in an HTTPService request. How do I read the selected value (not label or item or index) from the comboBox?

    > (not label or item or index)
    I suspect 'item' is what you need actually. Specifically the 'selectedItem' property which returns the whole of the selected object from your dataprovider. From that you can then extract the selected object's properties.
    e.g.  selectedValue = myComboBox.selectedItem.value;
    The example in tour-de-flex shows this - note:  'data' in that example is i think what you call 'value'.
    http://tourdeflex.adobe.com/flex4.0/ComboBox/sample.html  (right-click to view source)
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/suppor tClasses/ListBase.html#selectedItem
    hth
    Paul Evans
    http://www.creative-cognition.co.uk/
    http://blog.creacog.co.uk/

  • How can I read the image from database into form

    hi everyone
    if I have table like this
    create table test
    (id number(10),
    pic long raw);
    in this table record
    in form If I have block non database
    how can i read the image into non database item
    I try with this code but no good
    select pic into :photo from test where id=5;
    photo its non database item kind image
    how can i invoke image into item
    thanks alooooooot

    Hello,
    You can't select image with select query. You need to create another database block from test table which has item binds with database pic column. Now in where condition in test block's property you have to write id=5. Change test block's properties UPDATE ALLOWED, INSERT ALLOWED, DELETE ALLOWED to NO. Only Query allowed property set to YES.
    Now in your particular trigger write the code
    GO_BLOCK('test');
    Execute_Query;
    please mark if it help you or correct
    Regards,
    Danish

  • How can I read a comment from an lvm?

    Hello,
    I created an lvm using the Write to Measurement File express vi and I added a comment.
    To simplify it the line of the lvm created was:
    5 test
    where 5 is a random value and test the comment I input.
    My question is how can I read this comment.
    When I use the Read Measurement File express vi, the comment output
    returns empty.
    Thank you.
    Solved!
    Go to Solution.

    Hi epik78,
    I am not sure how you are adding your comment to the file, but when I made the simple VI below, I was able to see the comment that I input to the .lvm file in the comment indicator of the Read From Measurement File.
    Regards,
    Stephen S.
    Message Edited by Stephen_S. on 02-25-2009 03:18 PM
    National Instruments
    Applications Engineering
    Attachments:
    lvm comment.JPG ‏26 KB

  • How can I read windows comments in a JPEG file on my iMac

    I have 120, 000 photos, many with comments added in Windows Explorer, but while they are somewhere in the file data, they are not in ASCII coding so I cannot find any easy way to read them on my iMAC.  At the moment I have to use my Windows PC to read the comments while building slide shows on the iMac, which is not ideal.
    The Ideal solution would be a patch for Finder so that this data showed in the comments pane of the info window, but I expect that is asking to much.While I am on the subject of Finder, I also miss the ability to sort photos by 'Date Taken' which I cannot see any way to do in Finder.

    Thanks Terence,
    I found a piece of software called 'Reveal' in a related answer and using that I can see that the Windows Comments and Tags (Mac keywords) are in the EXIF metadata, with Tags 0x9c9c and 0x9c9e respectively.  Reveal shows the ASCII values of the characters, and I now remember writing a Visual Basic programme about 15 years ago just for my own amusement that unpacked this data and made it readable.  I seem to remember that there were also C++ routines at that time that purported to do the same thing, but I did not have a C++ compiler. 
    I take your  point about the editors, but I am new to the iMAC and still have a lot to learn.  I essentially have three new photo editors/organisers (iPhoto, Adobe Lightroom,  and Aperture) to learn plus Adobe Photoshop Elements in it's MAC guise,  and I am not prepared to use them seriously until I understand what they are doing. In the past I have not found any of the organisers able to cope with the number of pictures that I have - they just go away and huff and puff for hours or days  before crashing, if I let them lose on the complete set.
    Thanks for your help though.
    rojabro

  • I've been reading the comments re FCPX on MacBook Pro and now I'm scared. I'm taking a class now and thinking about buying to do videos for nonprofits. Won't be fancy stuff, but now wonder if it's a good choice. Also, heard Apple will drop support. Help?

    I've been reading the comments re FCPX on MacBook Pro and now I'm scared. I'm taking a class in FCPX and thinking about buying to do videos for nonprofits. Won't be fancy stuff, but now wonder if it's a good choice. Also, a classmate who was in CA last weekend said he heard that Apple will drop support of FCPX. Any truth? Advice?. I'm on 10.7.4 with 2.4 GHz Intel Core 2 Duo, 4 GB 1067 MHz. Thanks.    

    dkstj wrote:
    Also, a classmate who was in CA last weekend said he heard that Apple will drop support of FCPX.  
    While it is against the TOU of these boards to speculate on future products/updates what Thomas said is right: FCPX is quite a new product and it doesn't make any sense to drop it now.
    The only thing that MIGHT get dropped at a certain point is support for older hardware/OS as FCP X progresses.

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • 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.

  • How do I search the comments field in iTunes 11

    How do I search the comments field in iTunes 11 for windows

    I was suggesting you untick it.
    New search behaviour
    Old search behaviour
    Thinking that the old behaviour might prove more fruitful.
    If that doesn't help can you post a screenshot that shows what you're doing and why you think you're getting the wrong results?
    tt2

  • How can I read the trace data from Agilent(HP​)8510C in C++ using NI488.2 and PCI-GPIB ?

    Hello! I am trying to develop an application in C++ for measurements with Agilent(HP) 8510C network analyser using NI488.2 and National Instrument's PCI-GPIB card. In HPBASIC the trace data is read using OUTPDATA command which contains PREAMBLE, SIZE and then the data string in real and imaginary pair for the required points. The ibrd function gives data only for one point. Kindly guide me how I can read the whole trace and and separate out the real and imaginary data values. Regards, kapil

    Hey Kapil,
    It seems that in HPBASIC you were using an instrument driver for the 8510C. OUTPDATA is not a native HPBASIC function. National Instrument has similar instrument drivers for LabVIEW and CVI.
    http://zone.ni.com/idnet97.nsf/9b2b33e1993d8777862​56436006ec498/7b235254f3881ddb862568ab005fbd2e?Ope​nDocument
    http://zone.ni.com/idnet97.nsf/9b2b33e1993d8777862​56436006ec498/24ca7db880ab78ae862568ab005fbc0f?Ope​nDocument
    For example in the CVI instrument driver you will find a source file called hp8510.c. In the source code you will find a function called hp8510c_dataInRaw that sounds similar to the function that you described.
    Note that this example is designed for CVI, but it is possible that you could extract the information you need for C++. If
    you had a copy of CVI you could just add the files downloaded from the instrument driver to a project and then compile and run the project. It already contains a ready to run example that allows you to capture data and use your instrument.
    If you want try CVI you can download an evaluation copy on-line at http://ni.com/lwcvi/launch.htm.
    I hope this helps out,
    JoshuaP
    National Instruments

  • How can I read the printer snapshot file printers.xml

    How can I read the printer snapshot file printers.xml

    XML files are typically viewed using a web browser.
    Open the XML file and the default program should open it automatically.  If you are prompted to select a program, use the option that lets you choose a program and brows through the directories for your browser (for example, use Internet Explorer, Firefox, etc.).
    If need be, you should be able to right-click the file and select open with to choose the program to open it with.
    There are other XML viewers out ther, but web browsers are typically the default as XML is a web language.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • SapScript, How do I read the current line number?

    I have sections of text - each in it's own element with an 'include' of the standard text.
    These sections are variable in size.
    All elements are in the MAIN window.
    I do not want a paragraph to split over two pages.
    How do I read the current line number within the sapscript before the section prints so I can issue a new-page command at the beginning of the paragraph?
    Thanks!

    Yes, that does work for paragraphs.
    If I have multiple elements to print from within a loop where "at first, at each and at last" each call the Sapscript funtcion write_form - how can I keep the whole section together.  protect/endprotect will keep each element together but not the group of elements.
    There must be a way to find the current line number.

  • How can I read the EXCEL file while Program is running in background.

    Hi all Expert,
    How can I read the EXCEL file while Program is running in background.
    Thanks

    you need to place ur excel file on application server and follow this thread: Reading an Excel file from the application server?
    loots of information if you can search forum.. thanks

Maybe you are looking for

  • SYS.DBMS_AQ_IMP_INTERNAL.IMPORT_QUEUE_TABLE error during the import

    HI, while importing the 2 tables from production to lower env we are gatting the below error Processing object type TABLE_EXPORT/TABLE/POST_INSTANCE/PROCACT_INSTANCE ORA-39083: Object type PROCACT_INSTANCE failed to create with error: ORA-01403: no d

  • Datasocket buffering

    I have application1 and application2. Application1 is suppose to send data to application2 through dstp. Application1 acquires data from a NI-DAQ device at 20Hz (20samples/sec). The data is wired to the DataSocket Write. In application2, Data from Da

  • Inserting multiple options in a hyperlink

    I'm very new to the online help world. I've just recently had a 3-day class on RoboHelp HTML. I've been conveting a RH for Word into HTML and I've encountered a problem/question. In the Classic, Word version the previous author inserted a multiple to

  • Tab un alighned after transporting sapsript.

    Tabs are un aligned after transporting sap script in to qality. it displaying properly in dev but the header data is not aligned in qa. Is there some thing which I need to take care. Please let me know if any suggestions. Thanks,

  • What can I do to make IE detect my Shockwave?

    So, first of all, this is my first time posting here. Thank you all in advance for reading this. I've read through all the troubleshooting pages on Adobe's site but can't seem to work my way around this. I do have Adobe Shockwave (not Flash) installe