How do I retrieve binary cluster data from a file without the presense of the cluster size in the data?

Hey guys,  I'm trying to read a binary data file created by a C++ program that didn't append sizes to the structures that were used when writing out the data.  I know the format of the structures and have created a cluster typedef in LabView.  However the unflatten from string function expects to see additional bytes of data identifying the size of the cluster in the file.   This just plain bites!  I need to retrieve this data and have it formatted correctly without doing it manually for each and every single element.  Please Help!
Message Edited by AndyP123 on 06-04-2008 11:42 AM

Small update.  I have fixed size arrays in the clusters of data in the file and I have been using arrays in my typedefs in LabView and just defining x number of indexes in the arrays and setting them as the default value under Data Operations.  LabView may maintain the default values, but it still treats an array as an unknown size data type.  This is what causes LabView to expect the cluster size to be appended to the file contents during an unflatten.  I can circumvent this in the most simplest of cases by using clusters of the same type of data in LabView to represent a fixed size array in the file.  However, I can't go around using clusters of data to represent fixed size arrays BECAUSE I have several multi-dimentional arrays of data in the file.  To represent that as a cluster I would have to add a single value for every element to such a cluster and make sure they are lined up sequentially according to every dimension of the array.  That gets mighty hairy, mighty fast. 
EDIT:  Didn't see that other reply before I went and slapped this in here.  I'll try that trick and let you know how it works.......
Message Edited by AndyP123 on 06-04-2008 12:11 PM

Similar Messages

  • How can I retrieve my pages documents from another account in the iCloud

    I was using pages in my ipad. Then I bought a Mac Pro and signes with a new iCloud account. In order to sync it with my ipad I deleite the previous iCloud account from the divise and started it with the new account. I previously choose to keep all the documenta before deleten the account.
    Now when opened pages I can not see any of my previous doccuments

    You'll need to copy the Pages documents from the old iCloud account to the new one.  To do this, go to iCloud.com from your Mac and sign into the old account.  Launch Pages beta and confirm that your documents are still there.  Assuming they are, select them, then click the gear icon on the menu bar and choose Download Documents and choose the Pages format.  This will download copies of the documents to your Mac.  Drag the downloaded documents to your desktop and double-click on them to extract them from the .zip files.  Next, sign out on iCloud.com and sign back into your new iCloud account.  Launch Pages beta in the new account, then drag and drop the documents from your desktop to the Pages beta window to upload them to the new account.  You can now access the documents from devices signed into your new account.

  • How to get total number of pages from .doc file without using Office interop?

    Hi,
    Kindly help me in getting the total number of pages from a .doc file not .docx file using C#. I know how to get by using Office interop but I do not want to use Office interop.
    So, without office automation in C# let me know how to get the total number of pages from a .doc file.
    Regards,
    Ashok

    Hi Ashok,
    >> I know how to get by using Office interop but I do not want to use Office interop
    Could you tell us why you don't want to use Office interop?
    As far as I know, this is the easiest way to achieve.Hmmm,this is my answer
    http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.pagenumbers.startingnumber(v=office.14).aspx
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to save contents of a JTextArea to a file without the newline blocks?

    Hello everyone
    I have created a GUI with a JTextArea and a button to save the contents of the JTextArea to a text file. I am working on a windows platform. Problem is that when saving the contents to the file, the newline block appears within the file ignoring the newline in the JTextArea.
    Is there a way of saving these contents the way they appear in the JTextArea preserving the format they are displayed? I want to create a file that looks exactly the way my JTextArea looks like.
    Up to the moment i am using the following code which produces a rather confusing file:
    save.addActionListener(
                        new ActionListener() {
                             public void actionPerformed(ActionEvent e) {
                                  String textCaptured = textArea.getText();
                                  File file = new File("Log.txt");
                                  try {
                                       BufferedWriter out = new BufferedWriter(new FileWriter(file));
                                       out.write(textCaptured);
                                       out.flush();
                                       out.close();
                                  } catch (IOException e1) {
                                       // TODO Auto-generated catch block
                                       e1.printStackTrace();
                                  finally{
                                       JOptionPane.showMessageDialog(null,"Your log file has been created");
              );Thank you all in advance
    Christophoros

    Thanks uncle_alice.
    Your solution worked like a charm :)
    Have a nice day
    To anyone who might face similar problems heres the code:
    File file = new File("Log.txt");
                                  try {
                                       BufferedWriter out = new BufferedWriter(new FileWriter(file));
                                       textArea.write(out);
                                       out.flush();
                                       out.close();
                                  } catch (IOException e1) {
                                       // TODO Auto-generated catch block
                                       e1.printStackTrace();

  • The logic board on my MacBook Pro has failed. How do I retrieve all my data from the hard drive?

    The logic board on my MacBook Pro has failed. How do I retrieve all my data from the hard drive?

    Remove the drive and put it in an external enclosure. Backup the drive completely. Repartition and format the drive. Replace the drive into the computer. Take the computer in for the logicboard replacement.

  • My 12" powerbook logics card crashed. I have a 17". How do i retrieve my internet bookmarks from the 12" by putting it into Target mode on the 12" and looking into the hard drive on the 12"?

    My 12" powerbook logics card crashed. I have a 17". How do I retrieve my internet bookmarks from the 12" by putting it into Target mode on the 12" and looking into the hard drive on the 12"? Where on the 12" hard drive do I go to search for them?

    If the 12's logic board is trashed, I don't think you can get into FireWire Target Disk Mode. The computer has to start to get to FWTDM. Will it starte and run at all?
    If it won;t start, you will have to go inside and extract the hard drive. Then get this gadget:
    Newer Technology Universal Drive Adapter USB 3.0/2.0 - connects any 2.5", 3.5" or 5.25" drive
    It allows you to connect a bare drive to another computer that has USB. It will act just like an external disk drive. Assuming the 12's drive is not damaged due to the LB failure, you can retrieve files quickly.

  • How can I retrieve a lost password from my computer necessary to install Adobe flash player

    How can I retrieve a lost password from my computer necessary to install Adobe flash player

    Forgot Your Account Password
    For Lion, Mountain Lion, or Mavericks
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see:
           Reset a Mac OS X 10.7 Lion Password
           OS X Mountain Lion- Reset a login password,
           OS X Mavericks- Solve password problems,
           OS X Lion- Apple ID can be used to reset your user account password.
    For Snow Leopard and earlier with installer DVD
         Mac OS X 10.6- If you forget your administrator password,
         OS X- Changing or resetting an account password (Snow Leopard and earlier).
    For Snow Leopard and earlier without installer DVD
        How to reset your Mac OS X password without an installer disc | MacYourself
        Reset OS X Password Without an OS X CD — Tech News and Analysis
        How To Create A New Administrator Account - Hack Mac

  • TS4036 how do you retrieve a deleted video from an iphone 4S

    How do I retrieve a deleted video from my Iphone 4S?

    Photos/videos in the Camera Roll are included with the iPhone's backup. If your iPhone's backup was updated since the video was captured and the backup has not been updated again since it was deleted from the iPhone, you can try restoring your iPhone with iTunes from the iPhone's backup. Don't update the backup before doing so.
    Get more information here: https://discussions.apple.com/thread/391019

  • How do you retrieve deleted text messages from icloud

    How do you retrieve deleted text messages from icloud?

    Hope this helps
    I hope you created an iCloud backup.
    Here is what the iCloud backup can have in it.
    iCloud: iCloud storage and backup overview
    http://support.apple.com/kb/PH12519
    Good hunting

  • I sync a specific photos folder from my computer to my iPhone.  However, that folder was lost due to a crash on my computer.  But all of the Synced Photos are still on my iPhone.  How do I retrieve all those photos from my iPhone?

    I sync a specific photos folder from my computer to my iPhone.  However, that folder was lost due to a crash on my computer.  But all of the Synced Photos are still on my iPhone.  How do I retrieve all those photos from my iPhone?

    ManSinha wrote:
    Do you have a Windows computer or Mac?
    If Windows - and it has iTunes installed - you should see an Autoplay explorer when you connect your iPhone - this should let you see the pictures and transfer them back to your computer
    Wrong. That only works for pictures in the Camera Roll, not those in the Photo Album app.

  • How can I input read a line from a file and output it into the screen?

    How can I input read a line from a file and output it into the screen?
    If I have a file contains html code and I only want the URL, for example, www24.brinkster.com how can I read that into the buffer and write the output into the screen that using Java?
    Any help will be appreciate!
    ======START FILE default.html ========
    <html>
    <body>
    <br><br>
    <center>
    <font size=4 face=arial color=#336699>
    <b>Welcome to a DerekTran's Website!</b><br>
    Underconstructions.... <br>
    </font> </center>
    <font size=3 face=arial color=black> <br>
    Hello,<br>
    <br>
    I've been using the PWS to run the website on NT workstation 4.0. It was working
    fine. <br>
    The URL should be as below: <br>
    http://127.0.0.1/index.htm or http://localhost/index.htm
    <p>And suddently, it stops working, it can't find the connection. I tried to figure
    out what's going on, but still <font color="#FF0000">NO CLUES</font>. Does anyone
    know what's going on? Please see the link for more.... I believe that I setup
    everything correctly and the bugs still flying in the server.... <br>
    Thank you for your help.</P>
    </font>
    <p><font size=3 face=arial color=black>PeerWebServer.doc
    <br>
    <p><font size=3 face=arial color=black>CannotFindServer.doc
    <br>
    <p><font size=3 face=arial color=black>HOSTS file is not found
    <br>
    <p><font size=3 face=arial color=black>LMHOSTS file
    <br>
    <p><font size=3 face=arial color=black>How to Setup PWS on NT
    <BR>
    <p><font size=3 face=arial color=black>Issdmin doc</BR>
    Please be patient while the document is download....</font>
    <font size=3 face=arial color=black><br>If you have any ideas please drop me a
    few words at [email protected] </font><br>
    <br>
    <br>
    </p>
    <p><!--#include file="Hits.asp"--> </p>
    </body>
    </html>
    ========= END OF FILE ===============

    Hi!
    This is a possible solution to your problem.
    import java.io.*;
    class AddressExtractor {
         public static void main(String args[]) throws IOException{
              //retrieve the commandline parameters
              String fileName = "default.html";
              if (args.length != 0)      fileName =args[0];
               else {
                   System.out.println("Usage : java AddressExtractor <htmlfile>");
                   System.exit(0);
              BufferedReader in = new BufferedReader(new FileReader(new File(fileName)));
              StreamTokenizer st = new StreamTokenizer(in);
              st.lowerCaseMode(true);
              st.wordChars('/','/'); //include '/' chars as part of token
              st.wordChars(':',':'); //include ':' chars as part of token
              st.quoteChar('\"'); //set the " quote char
              int i;
              while (st.ttype != StreamTokenizer.TT_EOF) {
                   i = st.nextToken();
                   if (st.ttype == StreamTokenizer.TT_WORD) {          
                        if (st.sval.equals("href")) {               
                             i = st.nextToken(); //the next token (assumed) is the  '=' sign
                             i = st.nextToken(); //then after it is the href value.               
                             getURL(st.sval); //retrieve address
              in.close();
         static void getURL(String s) {     
              //Check string if it has http:// and truncate if it does
              if (s.indexOf("http://") >  -1) {
                   s = s.substring(s.indexOf("http://") + 7, s.length());
              //check if not mailto: do not print otherwise
              if (s.indexOf("mailto:") != -1) return;
              //printout anything after http:// and the next '/'
              //if no '/' then print all
                   if (s.indexOf('/') > -1) {
                        System.out.println(s.substring(0, s.indexOf('/')));
                   } else System.out.println(s);
    }Hope this helps. I used static methods instead of encapsulating everyting into a class.

  • How is it posible to get the File name, size and type from a File out the H

    How is it posible to get the File name, size and type from a File out the HttpServletRequest. I want to upload a File from a client and save it on a server with the client name. I want to conrole before saving the name, type and size of the file.How is it posible to get the File name, size and type from a File out the HttpServletRequest.
    form JSP
    <form name="form" method="post" action="procesuploading.jsp" ENCTYPE="multipart/form-data">
    File: <input type="file" name="filename"/
    Path: <input type="text" readonly="" name="path" value="c:"/
    Saveas: <input type="text" name="saveas"/>
    <input name="submit" type="submit" value="Upload" />
    </form>
    proces JSP
    <%@ page language="java" %>
    <%@ page import="java.util.*" %>
    <%@ page import="FileUploadBean" %>
    <jsp:useBean id="TheBean" scope="page" class="FileUploadBean" />
    <%
    TheBean.doUpload(request);
    %>
    BEAN
    import java.io.*;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletInputStream;
    public class FileUploadBean {
    public void doUpload(HttpServletRequest request) throws IOException
              String melding = "";
              String filename = request.getParameter("saveas");
              String path = request.getParameter("path");
              PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.java")));
              ServletInputStream in = request.getInputStream();
              int i = in.read();
              System.out.println("filename:"+filename);
              System.out.println("path:"+path);
              while (i != -1)
                   pw.print((char) i);
                   i = in.read();
              pw.close();
    }

    Thanks it works great.
    Here an excample from my code
    import org.apache.commons.fileupload.*;
    public class FileUploadBean extends Object implements java.io.Serializable{
    String foutmelding = "geen";
    String path;
    String filename;
    public boolean doUpload(HttpServletRequest request) throws IOException
         try
         // Create a new file upload handler
         FileUpload upload = new FileUpload();
         // Set upload parameters
         upload.setSizeMax(100000);
         upload.setSizeThreshold(100000000);
         upload.setRepositoryPath("/");
         // Parse the request
         List items = upload.parseRequest(request);
         // Process the uploaded fields
         Iterator iter = items.iterator();
         while (iter.hasNext())
         FileItem item = (FileItem) iter.next();
              if (item.isFormField())
                   String stringitem = item.getString();
         else
              String filename = "";
                   int temp = item.getName().lastIndexOf("\\");
                   filename = item.getName().substring(temp,item.getName().length());
                   File bestand = new File(path+filename);
                   if(item.getSize() > SizeMax && SizeMax != -1){foutmelding = "bestand is te groot.";return false;}
                   if(bestand.exists()){foutmelding ="bestand bestaat al";return false;}
                   FileOutputStream fOut = new FileOutputStream(bestand);     
                   BufferedOutputStream bOut = new BufferedOutputStream(fOut);
                   int bytesRead =0;
                   byte[] data = item.get();
                   bOut.write(data, 0 , data.length);     
                   bOut.close();
         catch(Exception e)
              System.out.println("er is een foutontstaan bij het opslaan de een bestand "+e);
              foutmelding = "Bestand opsturen is fout gegaan";
         return true;
         }

  • I have over 2000 photos on my iPad2. I have backed them up to my PC. How can I delete most of these from my iPad without deleting them one at a time?

    I have over 2000 photos on my iPad2. I have backed them up to my PC. How can I delete most of these from my iPad without deleting them one at a time?

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
     Cheers, Tom

  • How do I get text to flow from one page to the next in Pages 5?

    How do I get text to flow from one page to the next in Pages 5 with the Maverick system?

    What may be overlooked in Pages v5 is the notion of combining Text Boxes via the Menu > View > Show Arrange Tools. When you select two Text Boxes, an extra panel unfolds at the bottom of the Arrange Tools window. Uncheck one Text Box and this panel abruptly disappears.
    One can achieve text flow effects between Text Boxes differently based on how one positions the Text Box overlap, and choice of effect above. Though not the accustomed flow found in Pages ’09 v4.3, flow does occur. Consider the possibilities of combining a Shape and a Text box to cut an irregular Text box.
    If I create two Text Boxes and position them side by side with outline touching and choose Unite, this creates one larger Text Box and text flows across and down. On the otherhand, if I overlap the upper left corner of a lower Text Box over one above and to the left, then choose Union, pasted text fills the first Text Box and then flows across and down into the other box. Here is a Union example:
    Intersect will leave a small Text Box where the two overlap, so not much value there. Subtract will cut a chunk out of one Text Box that is the size of the overlapping piece of the second Text Box:
    And Intersect will leave an island in the center where the two Text Box overlap, with flow jumping over this bridge.
    Clearly, this is not what we were accustomed to in the past, but with imagination, style, and layout tuning, it does offer alternative Text Box creativity and layout. Of course, there is the option of simply returning to the previous Pages version for true Text Box linking that most will want to use.

  • How do I use just the audio from a clip without the video?

    Can't remember how to use just the audio from a clip, without the video.  FCP X can't select like FCP&

    Edit just the audio into the timline.
    The disclosure triangle next to the edit buttons.

Maybe you are looking for

  • Can anyone solve this cmos puzzle?

    Attached are two CMOS circuits created in Multisim 10.1 (10.1.197) The first circuit was created after the second. I'd created two identical oscillators with both CMOS gates and a CMOS IC, but neither of them responded with anywhere near the correct

  • MacBook overscan on 1080p

    I recently connected my MacBook to my new asus ve246 24 inch monitor. The monitor has a 1080p max resoultion and is connected to the MacBook using a minidvi to hdmi cable. Now when I use the monitor in clamshell mode (the MacBook screen is closed and

  • Re: Getting the current selected Row & column in adf table

    Hi, Our requirement is we have to retrieve both the current row and column in adf table. We can retrieve the current row in the backing bean like ViewObject view = getViewObject(); view.getCurrentRow(); Is it possible to retrieve selected column id o

  • Creation of Position on Workflow  Approval

    Hi We have a scenario like when we are creating any position or org. unit in the T code PP01 a Work Flow should trigger immmediately to the supervisor for approval on approval only the user should be able to create new postion on OM. Is there any sta

  • How can I transfer attachments on my emails to imac apps like pages or numbers

    How can I transfer email attachments to my imac apps like pages or numbers, so that I would be able to rearrange?