FileIO - trailing junk...

Okay, there's a major weakness with FileIO - if your save
file already
exists, and the data you're saving over it is smaller than
its previous
size, you end up with a bunch of trailing junk at the end of
the file, which
can confuse matters when that file gets loaded up again the
next time.
What's the best way of dealing with this? Is there some way
to cut the file
off at the end of the new data being added? Or is it better
to just
completely delete the file and recreate it from scratch every
time? (This
method probably works the most reliably, but it takes twice
as long.)
Another method I'd heard was to follow your data with a bunch
of blank
space, enough to overwrite any stray data, though determining
how MUCH blank
space varies greatly depending on the situation. Finally,
there's the
possibility of adding a terminator character after the data
which you
program your Open File function to recognize as "End of
Data", and ignore
any junk after that.
If the first method (cutting off the file) is possible, I'd
think that'd be
the best method. Deleting and recreating it is reliable, but
has a drawback
in terms doubling your save time. The other two methods could
work, but
don't really address the real problem - they both leave the
file bloated
larger than it needs to be, and you end up with extra useless
junk (or
spaces) at the end of your data. What method would you guys
think is
preferable overall?

I generally do the delete and create method. For the projects
I've woriked on the size of the text files are fairly small in KB
even if they are a lot of pages of text, so they save pretty fast.
Even if the speed doubles, that seems a small sacrifice to me for
having a clean file.
So for what it is worth...

Similar Messages

  • Creating a User-defined Selection variant for Transaction ME21N

    Hi,
    In transaction ME21N with the 'Document Overview' feature turned on we can view a list of standard selection variants. I would like to add a user-defined selection variant to that list. There is an OSS Note 377180 present which describes how to do that but(as per transaction SNOTE) that note cannot be implemented in our system. Is there any other way to get that done?
    Any help would certainly be appreciated.
    Thanks,
    Alam.

    So I am having a similar issue. I have a fixed length flat file with 3 different record types.
    1 a header ( length is 82 bytes with the first byte set to H ( single record always the first )
    2 a detail record ( length is 382 bytes ) with the first byte set to D ( multiple records )
    3 a trailer record ( length is 82 bytes ) with the first byte set to T ( single record always the last )
    I created a UD OTD with 3 elements for each record type, RECORD_TYPE is the first field 1 byte. Matching for each on either H,D, or T. When I try and test the OTD with the Run Test button I get an unmarshal error
    <SOD>""<POS>"HACCUMULAT..." failed input match, Fog#431, after <no path>: failed node: trailing junk in fixed/parent
    HACCUMULATED BENEFIT TRANSACTION FILE 20080801 20080825 0 0
    D ar3531 ar3531 ar3531 ar3531000 55887027260 30.000 30 5098765 20080804 000T114 120080806 82820P30000001024511 25.00 0.00 25.00 0.00 25.00 25.00 0.00 0.00 0.00 0.00 0.00T
    TACCUMULATED BENEFIT TRANSACTION FILE 20080801 20080825 2894 0 0
    Not sure whats going on, so if anyone has any suggestions on where to look that would be great
    Thanks

  • Slow when watching movie trailers

    Hi there
    I encounter a very annoying problem. When I'm watching a trailer using Front Row, it won't play without stopping once or even twice. It stalls and then a blue progress bar comes up at the bottom of the screen, and it seems to download the trailer again...
    What's the problem with the way trailers are being played within Front Row ? Maybe Apple might give us more bandwidth ?
         Max

    I Alllllmost wrote a nasty-gram to Apple a little while ago but after seeing all of the posts here in this, I backed down. I totally miss the old FR and the way it played trailers... and I'm a trailer junkie! While watching the new CJ4 trailer, it paused as the others do and really riled me up! Anyway, do you guys think we'll see a chage any time soon? My upgrade to 10.5.2 didn't fix didley!

  • HT1657 What happened to English films on iTunes in Switzerland???

    What happened to English films on iTunes in Switzerland?

    Justin J. Rebbert wrote:
    Yeah, you can download them from Apple and from other sources. But then you have to add them to iTunes manually, you have to write (or copy & paste from somewhere else) descriptions, and jump through other hoops to get the same end result that used to be one-click-easy from within iTunes directly. Unless you don't care about having them neat and organized and stuff like that.
    Add me to the list of disappointed trailer junkies.
    This is an unfortunate side affect and agree that it is cumbersome if you wish to include all the extra info iTunes used to provide. I suggest sending your disappointment to apple via the iTunes feedback channel at http://www.apple.com/feedback
    J.C

  • [SOLVED] I see files with a trailing '~' in my folders: file.html~

    I don't see these files when i use my default file browser, but when I use my FTP app (filezilla) I see all kinds of files with a trailing '~'. Example: file.html~
    Does anyone know what these are? Are they temporary backups? I only see them when I'm in filezilla (along with all my hidden files)
    I'd like to know what they are because when I delete a file (via filezilla for example) the other files remain.
    I just wanna make sure i'm not leaving junk on my hard drive...
    Last edited by trusktr (2010-02-22 22:38:19)

    trusktr wrote:
    oh interesting, so it's vim and gedit that make the files.
    I use gedt to make files (html, php, etc), upload them to my site, then immediately delete them, and the ~ files are left behind. Will they be auto-deleted by the system or something eventually?  Or do they stay there indefinitely until I manually delete them?
    :scratches-head:
    I thought they only remain behind if vim is not closed properly. Like if you close the terminal window instead of :wq

  • Timescape trailer fun

    I dont know about YOU.. but sometimes I play with stuff I didnt shoot... mainly cause I have no camera.
    So whats left to play with ??? YES !  conversions, and exports if those conversions fit into my mouse computer and CS3 ( which is way underrated ).
    The only thing cs3 cant do is HD ( on my mouse).  and some other stuff.. but nothing you cant work around somehow or other.
    Anyway, I just took the 4k file from timescape.org trailer and using mp4Handbrake made it a 1024x576 m4v.
    CS3 hated that...for one thing the program monitor when you open the project has all sorts of gibberish in it even before you put a clip on the timeline !
    Yikes !
    When you put the m4v on the timeline it is horrible...waaay horrible.. lots of clusters of pixelated areas etc... basically looks like junk.
    Sooooo, ( here is where I have my FUN ! ) IF YOU take that m4v and put it through streamclip and make an avi ( 1024x576 ) progressive high quality etc..you end up with a 1 gigabyte file ( avi ) from the 40 meg file ( m4v )... and WOW... it is BEAUTIFUL !
    Oddly..when you start the project once again for 1024x576 you get the program monitor gibberish... but once you put the avi file on timeline ( and it conforms )... you see BEAUTIFUL stuff !!!!!  how cool is THAT ?? !!
    This has nothing to do with anything unless someday someone with cs3 wants to download or ingest or whatever 4k stuff and downscale to something you can actually USE IN CS3 with a mouse computer... but you never know... might come in handy.

    when I watch this segment of trailer I wanna yell... " flaps DOWN.....beak UP ! "

  • Thunderbird fails to send email when "Scan email for junk mail" option is checked in Server Admin

    I have 2 clients that need to send mail through my server, one Mac and one Windows. The Mac uses apple mail and the Windows machine uses Thunderbird.
    Apple Mail will send fine, it is set up for "Use Default ports 25, 465, 587" and "Use SSL" and "Authentication: MD5 Challenge-response".
    Thunderbird refuses to send and I don't even see any errors showing up in the Console on the OS X server under smtpd entries.
    If I uncheck the "Scan email for junk mail" option on the server, then Thunderbird will send fine.
    Thunderbird is set up as: "smtp port 587 (default)" "connection security: STARTTLS" "Authentication method: Encrypted Password"
    May or may not be relevant: I use virtual domains as well as aliases.
    Server: Mac OS X Server version 10.5.8

    Solved it, looks like maybe the smtpd settings for sasl authentication may not have been correct. I followed everything in http://osx.topicdesk.com/content/view/38/41/ the "Frontline Spam Defense for OS X server" guide and now can send mail just fine from Thunderbird Winodws and from Apple Mail.

  • Report Pdf output getting Junk characters for some boiler Plate fields

    Hi All
    For Dunning Letter Report registered in Oracle Applications,made changes in Column headings like added customer number as Kunde for German Letter
    but in pdf output it's appearing as junk characters even date field is happening like that. It's happening for German, Spanish, Italy and French Letters. Working ok for Netherlands, English.
    any input to fix this solution will be great
    Thanks
    Kamalakar.G

    Maybe you check the NLS_LANGUAGE-settings on the client where you "edit" the reports-definition.

  • How can I migrate my junk-mail settings from one Mac to another?

    I would like to move my junk mail settings from one Mac to another. I found this article (https://kb.siteground.com/how_to_synchronize_the_junk_email_settings_in_mac_mail /), but can't locate the file indicated in the article, so I suspect that the article is out of date (though it's not dated).
    Both machines - MacOS 10.9.5; Mail 7.3.
    Any insights much appreciated!
    Best,
    Doug

    Make your user library visible and see if you can find it.
    Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder.  Select Library.

  • Please help me open an iMovie trailer, moved to my iPad from my PC. I can view it on my iPad but am unable to import it into the app to edit it.

    I created a trailer on an iPad at a workshop to use in my classroom. I retrieved it from my PC and can view it on my iPad mini, but the iMovie app won't open it. I need to edit it. Desperately need help. I want to show it to my students tomorrow. Thanks! I've checked other threads here but can't find a solution.

    Hi Leica 42,
    I never said that a PP file moved to your ipad cannot be straight edited in keynote. Nor did I say that you needed a third party solution...
    My response was to offer an option (Jump) because like many others, you're having problems.
    Check out the app store and user Keynote reviews. There are more (by 1) 1 star ratings than 5 star ratings for the current version. There are 72 ratings of 3 or more stars while there are 78 ratings of one or two stars. In terms of statistical significance, the numbers are pretty equal, but I prefer to deal with an app that shows more top stars and fewer bottom stars. Some posters have been on here with your same question, so I'm thinking maybe, just perhaps, Keynote is not perfect. 
    Pro tech reviews vary, many given at the time it was released. Many do not point out that they actually used Keynote before the review. Google Keynote for more pro tech reviews where reviewers have actually used the app.
    http://www.techradar.com/us/reviews/pc-mac/software/business-and-finance-softwar e/apple-keynote-ipad-689424/review
    http://www.theverge.com/2013/10/29/5042880/apple-iwork-2013-refresh-complaints
    http://www.igeeksblog.com/ipad-presentation-apps/

  • How can I create a fIlter to delete only "junk" from the server?

    One of my E-mail accounts is that of a major client. I handle their customer service online. Normally our protocol is to always leave all messages on the server, so for that one Thunderbird account, I have it set to never delete messages on the server.
    But the account recently started getting a lot of junk messages. Thunderbird is doing a remarkable job at marking those and placing them in the junk folder for that account. I would like to create a filter that could remove them from the server, preferably those more than "x" days old so I could monitor the activity to be sure that no important message are removed.
    I did notice that in "Filters" I can create a custom filter from a header of my choice, but can't seem to create what I want which is:
    - after mail is marked as Junk by Thunderbird to delete those messages from the server if they are older than "X" days (my choice of "X").
    - not delete any other messages from the server for that account

    I believe that did it! Thank you. I am running those changes on a secondary E-Mail address for the same job and server and it appears to be working properly.

  • Blank screen after looking at a junk e-mail

    Last night I was looking at my e-mail inbox(on outlook.com) and after deleting an e-mail the next e-mail came up.  It was from a sender whose name I did not know and the subject line was "thanks".  A quick glance at it mentioned some junk about a deposit of $2,000,000 that will be given.  I could see it was garbage and was about to delete it when my screen went blank.  I tried to move or click the trackpad and nothing happened.  After about 10 seconds I hit the main power button and the screen came back and everything looked normal.  I deleted the e-mail right then.  Since then the computer has been working fine but I am concerned that e-mail installed some malware.  Am I right to be concerned? I never clicked anything in the e-mail, just looked at it for 3 seconds before going to delete it.  Any advice?  Thanks. 

    No you should be alright, but perhaps never say never
    If you wish to scan your computer the
    use sophos free for home use or Clam xav  also free from the app store
    http://www.sophos.com/en-us/products/free-tools/sophos-antivirus-for-mac-home-ed ition.aspx
    Many on here will say that malaware does not exist and that placing antivius on a mac is not needed
    but coming from using a pc I have had no problems with sophos.
    from usa today
    http://www.usatoday.com/story/tech/columnist/komando/2013/02/14/tech-myths-mac-s oftware-megapixels-camera/1910521/

  • Exception on JaxRpc invoke trailing block elements must have an idattribute

    hi all ,
    I am calling a target system from a bpel process .
    but while invoking i am getting the below error .
    ""*exception on JaxRpc invoke: trailing block elements must have an id attribute*""
    my schema file is as below ,
    can any one let us know the reason behind the issue .
    -----------------------------------xsd file----------------------------------------
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema elementFormDefault="qualified"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://www.viva.com.bh/vivaportal"
    targetNamespace="http://www.viva.com.bh/vivaportal"
    xmlns="http://www.viva.com.bh/vivaportal">
    <xsd:complexType name="error">
    <xsd:sequence>
    <xsd:element name="errorCode" type="xsd:int" minOccurs="0"/>
    <xsd:element name="errorDescription" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="preRegistrationCheck"/>
    <xsd:complexType name="preRegistrationCheckRequestType" xmlns:tns="http://www.viva.com.bh/vivaportal" >
    <xsd:sequence>
    <xsd:element name="MSISDN" type="xsd:int" minOccurs="0" />
    <xsd:element name="timestamp" type="xsd:dateTime" minOccurs="0" />
    <xsd:element name="source" type="xsd:string" minOccurs="0" />
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="preRegistrationCheckResponseType">
    <xsd:sequence>
    <xsd:element name="resultCode" type="xsd:int" minOccurs="0" />
    <xsd:element name="PIN" type="xsd:int" minOccurs="0" />
    <xsd:element name="error" type="tns:error" minOccurs="0" />
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="prePasswordResetCheck"/>
    <xsd:complexType name="prePasswordResetCheckRequestType">
    <xsd:sequence>
    <xsd:element name="MSISDN" type="xsd:int" minOccurs="0"/>
    <xsd:element name="timestamp" type="xsd:dateTime" minOccurs="0"/>
    <xsd:element name="source" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="prePasswordResetCheckResponseType">
    <xsd:sequence>
    <xsd:element name="resultCode" type="xsd:int" minOccurs="0"/>
    <xsd:element name="PIN" type="xsd:int" minOccurs="0" />
    <xsd:element name="error" type="tns:error" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="registerUser"/>
    <xsd:complexType name="registerUserRequestType">
    <xsd:sequence>
    <xsd:element name="MSISDN" type="xsd:int" minOccurs="0"/>
    <xsd:element name="password" type="xsd:string" minOccurs="0"/>
    <xsd:element name="timestamp" type="xsd:dateTime" minOccurs="0"/>
    <xsd:element name="source" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="registerUserResponseType">
    <xsd:sequence>
    <xsd:element name="resultCode" type="xsd:int" minOccurs="0"/>
    <xsd:element name="error" type="tns:error" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="authenticateUser"/>
    <xsd:complexType name="authenticateUserRequestType">
    <xsd:sequence>
    <xsd:element name="MSISDN" type="xsd:int" minOccurs="0"/>
    <xsd:element name="password" type="xsd:string" minOccurs="0"/>
    <xsd:element name="timestamp" type="xsd:dateTime" minOccurs="0"/>
    <xsd:element name="source" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="authenticateUserResponseType">
    <xsd:sequence>
    <xsd:element name="resultCode" type="xsd:int" minOccurs="0" />
    <xsd:element name="error" type="tns:error" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="resetPassword"/>
    <xsd:complexType name="resetPasswordRequestType">
    <xsd:sequence>
    <xsd:element name="MSISDN" type="xsd:int" minOccurs="0"/>
    <xsd:element name="operation" type="xsd:string" minOccurs="0"/>
    <xsd:element name="oldpassword" type="xsd:string" minOccurs="0"/>
    <xsd:element name="password" type="xsd:string" minOccurs="0"/>
    <xsd:element name="timestamp" type="xsd:dateTime" minOccurs="0"/>
    <xsd:element name="source" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="resetPasswordResponseType">
    <xsd:sequence>
    <xsd:element name="resultCode" type="xsd:int" minOccurs="0"/>
    <xsd:element name="error" type="tns:error" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="deleteUser"/>
    <xsd:complexType name="deleteUserRequestType">
    <xsd:sequence>
    <xsd:element name="MSISDN" type="xsd:int" minOccurs="0"/>
    <xsd:element name="timestamp" type="xsd:dateTime" minOccurs="0"/>
    <xsd:element name="source" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="deleteUserResponseType">
    <xsd:sequence>
    <xsd:element name="resultCode" type="xsd:int" minOccurs="0"/>
    <xsd:element name="error" type="tns:error" minOccurs="0"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="preRegistrationCheck" xmlns:tns="http://www.viva.com.bh/vivaportal"
    type="tns:preRegistrationCheckRequestType"/>
    <xsd:element name="preRegistrationCheckResponse"
    type="tns:preRegistrationCheckResponseType"/>
    <xsd:element name="prePasswordResetCheck"
    type="tns:prePasswordResetCheckRequestType"/>
    <xsd:element name="prePasswordResetCheckResponse"
    type="tns:prePasswordResetCheckResponseType"/>
    <xsd:element name="registerUser" type="tns:registerUserRequestType"/>
    <xsd:element name="registerUserResponse"
    type="tns:registerUserResponseType"/>
    <xsd:element name="authenticateUser" type="tns:authenticateUserRequestType"/>
    <xsd:element name="authenticateUserResponse"
    type="tns:authenticateUserResponseType"/>
    <xsd:element name="resetPassword" type="tns:resetPasswordRequestType"/>
    <xsd:element name="resetPasswordResponse"
    type="tns:resetPasswordResponseType"/>
    <xsd:element name="deleteUser" type="tns:deleteUserRequestType"/>
    <xsd:element name="deleteUserResponse" type="tns:deleteUserResponseType"/>
    </xsd:schema>
    -----------------------------------------------end-------------------------------------------

    Anybody has solution on this? I too getting similar exception when Callingl a web service with soapenc:arrayType from BPEL
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>exception on JaxRpc invoke: trailing block elements must have an id attribute</summary>
    </part></bindingFault>
    This is what the documentation says. Any body has steps or examples
    4.13.4 SOAP-Encoded Arrays Not Supported
    Oracle BPEL Process Manager does not support SOAP-encoded arrays (soapenc:arrayType).
    Use the following workarounds:
    · Call a service with soapenc:arrayType from BPEL, but construct the XML message more manually in the BPEL code. This enables you to avoid changing or wrapping the service. However, each time you want to call that service from BPEL, you must take extra steps.
    Thanks
    N Reddy

  • Trail Balance in report painter

    Hello Friends,
    i want to create trail balance report In report painter(table:faglflext). My issue is if the cumulative balance i.e (Dr. - Cr.) of G/L is positive then the balance should be shown in debit side column, if the cumulative balance i.e (Dr. - Cr.) of G/L is negative then the balance should be shown in Credit side column. will you please let me know how and where to write this logic...
    Thank You....

    Hello,
    Normally, reports S_ALR_87012277 - G/L Account Balances and S_ALR_87012301 - Totals and Balances serve the purpose of outputing trail balance for accounting staff.
    Kind regards,
    John Chin

  • I have an SD card that my husband uses for a trail camera. The camera does not have a delete function for the pics, so I put the SD card in our MAC and we can view the pics but when I go to delete them it says that the files cant be deleted. What can i do

    My husband has an SD card he  uses for his trail camera. We put it in our mac book pro and can look at the pictures but when I go to move them to the trash it tells me that the files can't be moved to the trash because they cant be deleted. I have Nikon camera software on my mac and it pics up and asks if you want to import the pics and if you want them deleted from the devices afterwards. I tried that but I get a message afterwards that says that some files were not able to be deleted. When I go to check, none of them were deleted. How can I clean of the SD Card? I do have a camera I could stick it in, it would just be nice to know how to do it from my mac. Also, the files are jpg. if that matters.

    AFAIK cameras offer their own built-in format utility for inserted SD cards.  You should use that.  Otherwise, refer to the manual that came with your camera to determine precisely how your SD cards need to be formatted to work properly.  Personally, I'd suggest Partition Scheme: MBR, and Filesystem: FAT32.
    Try to limit the number of formats you perform on the SD cards, though, as you're reducing their lifespan.  I believe formatting causes re-writes to a portion of the SD card that has fewer read/write cycles than the rest of the card as a whole.

Maybe you are looking for

  • Should I use an IDE for GUI development?

    I have never wrote a GUI before and am wondering if I should use an IDE such as Glade (or something else) or if I should write everything by hand?  I want to develop with GTK.  What do you guys suggest?  EDIT: Also the reason I was thinking of using

  • Clear the  inspection

    Hi All, while do the GR for the material from the vendor , the stock posted to the quality . since we maintained the QM view in the material master with the quality control key 0007. Now we need to  transfer the stock from quality to unrestricted . h

  • Cannot open photo .jpeg in PSE10, picture corrupt?

    Yesterday I scanned a picture and started working on it in PSE10. After six hours I'm nearly done and decided to save the file and stop for the day. Tonight I tried to open the picture to finish it off but instead I get a pop-up saying "Could not com

  • How do I download Adobe Premiere Pro CC?

    I cannot download Adobe Premiere after fixing a bug on my computer. Download links on Adobe are just for bug fixes and updates and it doesn't allow you to just re download the program Adobe Premiere Pro CC.  Can someone help? Thank you. Message was e

  • Creating new Faceting Property

    Hi everybody, I have created new types of SKUs, and now I would like to refine my search results with the new attributes of the new SKUs types. I want to create new facets to show my attributes, but I don't know how to set the new attributes on the l