Fixed size string and cluster files.

Hi, i need help for 2 things :
- How can i limit the string size that a user can fill. (example, 8 characters max).
- I 'd like to make a file containing 1 (big)cluster / record, with the possibility to modify then with the record number , but when i read it back, it says EOF reach. ( i join my .vi). I wish I could make files that work like those in basic/C programs.
Thank for help.
Attachments:
lecture_direct.vi ‏23 KB

Okay, I see where you made your mistake. In the read VI, wire the datatype to the Open File function and not the Read File. You can also write the data without converting everything to a string. I've attached modified versions of your VIs that do it that way.
Attachments:
enregistrement_direct_mod.vi ‏20 KB
lecture_direct_mod.vi ‏24 KB

Similar Messages

  • Raw devices and cluster file system

    what is difference between raw and cluster file system

    See to this thread if this can help
    http://asktom.oracle.com/pls/asktom/f?p=100:11:3285616048047775::::P11_QUESTION_ID:7931107631402

  • Big Strings and Flat Files

    Hi.
    I need to write a utility that will read a flat file, and the write a new output file.
    I/P Flat file will have many records(thousands).
    Each record will be around 1200 characters.
    Record format is fixed and fields known by position and length.
    O/P file will be subset of input records, with smaller record structure.
    O/P file must be flat file.
    So, I was imagining to just read in each line, stuff into StringBuffer, index each element required out into String, build new StringBuffer, for O/P, and dump to file.
    Any better way to approach this? Any slick way to take this long record string and map it into an object of some sort?

    It's not perfect - but here's one possible approach to the problem:class Mapper {
         private String _record = null;
         private Hashtable _fields = new Hashtable();
         public Mapper(String record) {
              _record = record;
              initElements();
          * Fill _fields with Points.  Each point is keyed by field-name,
          * and contains the start and length of that field.
          * Implementation is left as an exercise for the reader - the start below isn't very graceful...
         protected void initElements() {
              String eltName;
              Point p;
              eltName = "firstField";
              // Use Point.x for start, and Point.y for length
              p = new Point(firstStart, firstLength);
              _fields.put(eltName, p);
              // Repeat for all elements
          * Return string for a given field.
          * @param name Field being requested
          * @return field conteent, or null if field not found in this record.
         public String getField(String name) {
              if (name==null) return null;
              Point p = (Point)_fields.get(name);
              if (p==null) return null;
              // substr needs begin/endIndex, and returns from begin to end-1.
              // So, we can add length to begin, and it should Just Work.
              return _record.substring(p.x, (p.x+p.y));
    }Grant

  • Is there a maximum size for and EAR file?

    I'm using Jdeveloper 10.1.3.3.0. I've used it to deploy to OAS before with success. This past week I added a ton of content to the site. Now when I deploy the ear file is over 1GB. It used to be 120MB. During the deploy process the log shows "Deployment Incomplete". I never get the dialog box to complete the deployment (i.e. to undeploy the app then finish deployment).
    I've checked the disk space on OAS and have 7GB free.
    Is there some adjustment that I need to make? Is there a size limit? If so, how do I get my content on to the site?
    TIA,
    Dave

    Update on manually deploying my application.
    On OAS:
    I tried uploading from local machine to server in step 2 but after 10 minutes or so it had appeared to hang.
    I retried after manually copying the file to the server. In this case I got to step 2 where I set application attributes. On step 3 I left defaults and clicked deploy. In the progress message window after the Unpacking ...ear message I received error message:
    Operation failed with error: java.lang.OutOfMemoryError.
    I'm sure that I can increase memory to the compiler with a command line flag. Finding the command line though...
    It looks like the /tmp directory size is part of the problem. It's only .9GB.
    Note:
    On the jdeveloper side when I deployed to EAR I checked the compress flag. That reduced the overall size by 150MB.
    Regards,
    Dave
    Edited by: dgress on Jan 7, 2009 11:37 AM

  • WSUS catalogue size, location and log file

    Hi All,
    Quick question, where is the catalogue stored in the WSUS server? I am trying to find the size of the latest update synchronization that the client use and the size in total of the catalogue, is this possible? As our clients caused an issue pulling a 35MB
    catalogue file from the server, does this seem the correct size for a SCCM/WSUS delta update?
    I had a look at WSUS related logs (change and software distribution)but couldn't find the right info, it was a long day so any help appreciated on this as I could simply have missed it in those log files, or a point in the right direction would be great,
    thanks for your help
    many thanks

    Hi,
    Have you install SCCM with WSUS? If yes, to get better help, please post your question on the SCCM forum.
    https://social.technet.microsoft.com/Forums/systemcenter/en-US/home
    Best Regards.
    Steven Lee Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Smart album file size (megabytes) and/or file size (hxl)

    Hi,
    Is it possible to create smart album like:
    pic being < 50ko
    or lentgh being < 480 ?
    Thanks
    Benoit

    Afraid not.
    Regards
    TD

  • [svn:fx-4.0.0] 13535: Part 1 of fixing line endings in AS and MXML files so that line numbers are correct while debugging .

    Revision: 13535
    Revision: 13535
    Author:   [email protected]
    Date:     2010-01-15 14:45:38 -0800 (Fri, 15 Jan 2010)
    Log Message:
    Part 1 of fixing line endings in AS and MXML files so that line numbers are correct while debugging.
    We've got a widespread problem with line-endings (\r\n vs \n vs \r) because not all our files have svn:eol-style set to "native". (With this setting, the line endings are adjusted for the platform that you check out code onto. Without it, you can end up with all-Mac line endings on a Windows machine, WindowsMacUnix line endings on a Mac, etc. The goal is all-Win on Win, all-Mac on Mac, etc.)
    For schedule reasons, we've decided to minimize risk by fixing only AS and MXML files in frameworks/projects that contribute to our SWCs, because here line-ending problems can throw off line numbers and the debugger doesn't step through the right lines of code.
    You can't set svn:eol-style to "native" unless the line endings are already correct for your platform. Since I'm on Windows, I wrote a script to find a fix the files that had any \n or \n line endings. The files now have \r\n.
    QE notes: None
    Doc notes: None
    Bugs: SDK-24966
    Reviewer: Pete
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24966
    Modified Paths:
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.a s
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/core/ISelectableList.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/core/LayoutElementUIComponen tUtils.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/geom/CompoundTransform.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/geom/TransformOffsets.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/skins/halo/WindowBackground. as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/utils/MatrixUtil.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatche r.as
        flex/sdk/branches/4.0.0/frameworks/projects/osmf/src/org/osmf/media/MediaFactory.as
        flex/sdk/branches/4.0.0/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as
        flex/sdk/branches/4.0.0/frameworks/projects/rpc/src/mx/rpc/http/Operation.as
        flex/sdk/branches/4.0.0/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPMultiService.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/ButtonBar.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/DropDownList.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/HSlider.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/Panel.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/PopUpAnchor.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/Scroller.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/mediaClasses/Volum eBar.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/Dro pDownController.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/Dro pDownListBase.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/Scr ollerLayout.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/Sli derBase.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/effects/AnimateTransform.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/effects/supportClasses/Animat eTransformInstance.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/effects/supportClasses/MoveIn stance.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/events/SkinPartEvent.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCa ptureSkin.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/skins/spark/ScrollerSkin.mxml
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/styles/metadata/AdvancedInher itingTextStyles.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/styles/metadata/AdvancedNonIn heritingTextStyles.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/utils/LabelUtil.as
        flex/sdk/branches/4.0.0/frameworks/projects/wireframe/src/spark/skins/wireframe/NumericSt epperTextInputSkin.mxml

    Hi there,
    I follow the help from this post
    How to handle line break embeded inside CSV column
    Not a perfect way, but it is accepted in my case.
    Cheers,

  • Do we need to format data and log files with 64k cluster size for sql server 2012?

    Do we need to format data and log files with 64k cluster size for sql server 2012?
    Does this best practice still applies to sql server 2012 & 2014?

    Yes.  The extent size of SQL Server data files, and the max log block size have not changed with the new versions, so the guidance should remain the same.
    Microsoft SQL Server Storage Engine PM

  • How to resize a jpg/gif file to a fix size using jimi ?

    I have search from the web and didn't find any example on doing this.
    Can any one give example on how to resize a jpg image. let say 120x240
    to a fixed size 40x40 ?
    thank you

    Hi.
    When you got that image in form of a file, just load it and invoke the image's getScaledInstance(...)-method.
    Here's how it could work:
    import java.awt.*;
    public class Test {
    public static void main(String[] argv) {
      // define where the image comes from:
      URL toImage = new URL("file:/C:/test.jpg");  // or the like
      // get the image:
      Image image = Toolkit.getDefaultToolkit().createImage(toImage);
      // scale the image to target size (40x40 here):
      Image smallImage = image.getScaledInstance(40, 40, Image.SCALE_DEFAULT);
      // you might want to do other things like displaying it afterwards
    }HTH & cheers,
    kelysar

  • How can I auto export a PDF File using the "Smallest File Size" preset and set the Exported File Name based on information from an Imported PDF?

    Greetings all,
    I am trying to create a script to automate a PDF export process for my company for inDesign. I’m fairly new to inDesign itself and have no previous experience with javascript, although I did take C++ in high school and have found it helpful in putting this code together.
    We have an inDesign template file and then use the Multi-page PDF importer script to import PDF files. We then have to export two version of each file that we import, then delete the imported file and all of the pages to reset the template. This has to be done for nearly 1000 pdf files each month and is quite tedious. I’m working on automating the process as much as possible. I’ve managed to piece together code that will cleanup the file much quicker and am now trying to automate the PDF exports themselves.
    The files are sent to us as “TRUGLY#####_Client” and need to be exported as “POP#####_Client_Date-Range_North/South.pdf”
    For example, TRUGLY12345_Client needs to be exported as POP12345_Client_Mar01-Mar31_North and POP12345_Client_Mar01-Mar31_South.
    There are two templates built into the template file for the north and south file that are toggled easily via layer visibility switches. I need to get a code that can ideally read the #s from the imported Trugly file as well as the Client and input those into variables to use when exporting. The date range is found in the same place in the top right of each pdf file. I am not sure if this can be read somehow or if it will have to be input manually. I can put North or South into the file name based on which template layer is visible.
    I am not sure how to go about doing this. I did find the following code for exporting to PDF with preset but it requires me to select a preset and then type the full file name. How can I set it to automatically use the “Smallest File Size” preset without prompting me to choose and then automatically input some or preferably all of the file name automatically? (If the entire filename is possible then I don’t even want a prompt to appear so it will be fully automated!)
    PDF Export Code (Originally from here: Simple PDF Export with Preset selection | IndiSnip [InDesign® Snippets]):
    var myPresets = app.pdfExportPresets.everyItem().name;
    myPresets.unshift("- Select Preset -");
    var myWin = new Window('dialog', 'PDF Export Presets');
    myWin.orientation = 'row';
    with(myWin){
        myWin.sText = add('statictext', undefined, 'Select PDF Export preset:');
        myWin.myPDFExport = add('dropdownlist',undefined,undefined,{items:myPresets});
        myWin.myPDFExport.selection = 0;
        myWin.btnOK = add('button', undefined, 'OK');
    myWin.center();
    var myWindow = myWin.show();
    if(myWindow == true && myWin.myPDFExport.selection.index != 0){
        var myPreset = app.pdfExportPresets.item(String(myWin.myPDFExport.selection));
        myFile = File(File.saveDialog("Save file with preset: " + myPreset.name,"PDF files: *.pdf"));
        if(myFile != null){
            app.activeDocument.exportFile(ExportFormat.PDF_TYPE, myFile, false, myPreset);
        }else{
            alert("No File selected");
    }else{
        alert("No PDF Preset selected");
    So far my code does the following:
    1) Runs the Multi-Page PDF Import Script
    2) Runs PDF Export Script Above
    3) Toggles the Template
    4) Runs #2 Again
    5) Deletes the imported PDF and all pages and toggles template again.
    It’s close and much better than the original process which was almost 100% manual but I’d like to remove the Preset prompt from the PDF script and have it automatically select the “Smallest File Size” preset. and then if there’s a way to have it auto-fill in the file name so no user input is required at all other than selecting each file to import. (If there’s a way to setup a batch action for the multi-import script that would be even better!)
    Thanks in advance and if there’s anything else I can provide that would help please let me know! Even a nudge in the right direction will be a big help!

    If you hold down the option key, it will typically show the location. Or you can often hit option-return on the file and it will reveal the file in the Finder, instead of opening it.
    Final option is to open it, and just option-click the filename in the toolbar of Preview and it should show you the location.
    It's probably an attachment to an email you've received. If you have Mail set to cache emails and their attachments it'll be stashed in a subdirectory of ~/Library/Mail. Which is fine.

  • Asmca has grayed out Volumes and ASM Cluster File Systems 11.2.0.3

    I've got a two node cluster which is up and running with the latest 11.2.0.3 grid install on Oracle Linux 6.3
    I need to get a shared storage location I can use for File I/O testing, ASM looks like the solution with an ASM Cluster File System.
    When I run asmca I do not have the ability to create these volumes or file systems as they are Grayed out.
    I found some instructions on how to get it to work, and they said to use acfsload to start up the required daemons:
    [root@oracleA bin]# ./acfsload start -s
    ACFS-9459: ADVM/ACFS is not supported on this OS version: '2.6.39-300.17.3.el6uek.x86_64'
    I installed Patches: 13146560, 14596051 - Which I thought would fix the problem. Rebooted after successfully applying the patches, but asmca still shows them greyed out
    and not supported on this OS error persists.
    I see some posts online saying to edit osds_acfslib.pm and update it to allow for the supported ORACLE version
    Right now it shows: ($release =~ /^oraclelinux-release/))) # Oracle Linux
    under /etc it only has oracle-release - could that have something to do with it not passing the check?
    uname -r
    2.6.39-300.17.3.el6uek.x86_64
    From what I can tell this kernal should support asm..
    Any help in getting these shared storage asm disks setup would be very helpful, oracleasm creates them and sees them fine for databases. Thanks.

    Turns out the Kernel version 2.6.39 does not have support for the ASM Drivers for the ACFS mounting.
    I'm going to have to use Oracle Linux 6.2 (instead of Oracle Linux 6.3) and rebuild my RAC to get a supported version of the drivers -> Kernel version 2.6.32
    http://docs.oracle.com/cd/E11882_01/install.112/e16763/oraclerestart.htm#BGBGEDGA

  • PSD files sent over FTP given 1kb file size, archived, and have .bin appended to extension

    I'm trying to deliver PSD files to someone over our server's FTP. If the FTP shared folder is accessed via a browser (like safari which is the main thing I've been testing on), the files in are listed as being only 1kb in size when each is approximately 60MB and all have had .bin appended to the .psd file extension. When the file is downloaded it's still 1kb and when opened it is associated with the archive utility which attempts to unarchive it and produces and identically named and extensioned file of 4kb size which cannot be opened by preview or text edit or photoshop.
    Changing the extension does not help as suggested here http://forums.appleinsider.com/archive/index.php/t-25119.html . Also if the file is downloaded via 3rd party FTP software like cyber duck, though the file size is listed as 1kb, the correct size file is downloaded though still has the .bin extension. When this full sized .bin file is opened, archive utility instead of unarchiving attempts to archive it and produces a file roughly half the size which too cannot be opened. Speaking with apple care resulted in the suggestion that I use terminal command line to force the client to use binary mode when downloading the file which also downloads a file of correct size but with the .bin extension and that can not be opened.
    Is this a known issue with PSD files? I've not come accross this before, the server is configured correctly and different file types are successfully downloading with no changes to size or extension and then opening as they should upon receipt at the client side.

    Hi and thanks,
    that was my next port of call but I stumbled across a more permanent fix. Mac OSX server automatically converts files sent over FTP to something called MacBinary on the fly and it seems this process doesn't agree with PSD files. Someone else encountered this problem back in 2003 and found this solution
    http://forums.appleinsider.com/archive/index.php/t-25119.html
    speaking to apple care they also sent a link for the official mac instructions for achieving the same thing here
    http://support.apple.com/kb/TA20996
    and here
    http://support.apple.com/kb/TA20645?viewlocale=en_US
    in the second explanation it's important to note for anyone attempting to follow this that if you're fixing the problem on MacOsX server rather than just MacOSX it isn't necessary to enable the root account as it is automatically enabled by default. Simply log out and log back in as root and use the same password as the first administrator account you set up when the server was first configured.

  • Block size in tt for writing data to transaction log and checkpoint files

    Hello,
    what block size is TimesTen using when its writing data to transaction log and checkpoint files? Does it use some fixed block size during filesystem writes?

    Although in theory logging can write 2 KB blocks in almost all circumstances it will write 4 KB or larger so yes a filesystem with a 4 KB block size is fine for both checkpointing and logging.
    Chris

  • Saving jpeg and png files large file size

    Ive recently purchased web premium 5.5 and Im trying to save files in jpeg and png format in Photoshop and Im getting unexpectedly large file sizes, for example I save a simple logo image 246x48 which consists of only 3 basic colours and when I save it as a jpeg quality 11 it reports the file size in the finder as 61.6k, I save it as a png file and its 60.2k also I cropped the image to 190x48 and saved it as a png and the file size is actually larger at 61.9k saving as a jpeg at quality 7 the files size is a still relatively large 54k.
    I have a similar png non indexed colour logo on my mac I saved in CS3 on a pc which is actually larger at 260x148 and it's only 17k and that logo is actually more complex with a gloss effect over part of it. Whats going on and how do I fix it, It's making Photoshop useless especially when saving for the web
    Thanks

    Thanks I had considered that but all my old files are reporting the correct files sizes I have been experimenting and fireworks saves the file at png 24 at 2.6k and jpegs at 5.1k, but I don't really want to have to save the files twice once cut from the comp in photoshop and again in fireworks juggling between the two applications is a bit inconvenient even with just one file but especially when you have potentially hundreds of files to save.
    Ive also turned off icon and windows thumbnail in photoshop preferences and although this has decreased the file size they are still quite large at 27k and save for the web is better at 4k for the png and 16k for the jpeg. Is there anyway to get Fireworks file saving performance in Photoshop ? it seems strange that the compression in Photoshop would be second rate in comparison to fireworks given they are both developed by Adobe and Photoshop is Adobes primary image editing software.

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

Maybe you are looking for

  • How to access built in dictionaries

    My MacBook Pro running OS 10.8.5 has eleven built-in dictionaries and thesauruses in the Library. MacBook HD > Library > Dictionary > Apple Dictionary.dictionary MacBook HD > Library > Dictionary > Diccionario General de la Lengua Española Vox.dictio

  • So You Want to Change Squirrelmail's Default Color Scheme...

    I needed to do this, because I'm migrating users to Dovecot over time. In the event they connect to the old webmail site I want it to be obvious, so I changed the background color. This requires vi or some other plain text editor. Proceed at your own

  • Interactive Ratings to Search in Sharepoint 2013

    Hi All, I need to display  ratings in Search results page .Can anyone please help ??? Vinod

  • MS SQL Server visual studio 2012

    i'm using MS SQL Server visual studio 2012 to biuld naive bayse model after that i waint to connect the model to asp.net how ? ??

  • Connect a LJ 2100 printer to a USB port on my router

    I have a LaserJet 2100 printer with a parallel port cable.  Can I use a DB-25 to USB converter to connect the printer directly to my ASUS RT-N66U router to make it a network printer?  Will I need anything else (software, firmware, or ?).