How can I build an array not knowing final size at startup?

Hi,
I need to be able to build an array with a certain number of rows but that number is not known at runtime. Instead it can't exceed 5 in a certain time period. So my question is: every 20 seconds I need to send out the 5 row array but if lets say 10 rows of data come in in 20 seconds I am not sure how to handle the data to have it build 2 arrays and send them out one after another at the elapse of the 20 seconds as opposed to just sending an array with 10 rows and losing half the data on the receiving side. Please any help will be appreciated,
Alex

I understand that you have to send a least a message every 20 seconds (could be empty ?), but can you send more messages if you get more data (e.g. 3 message of 5 rows in 20 sec) ?
If you can, then all you have to do is to trigger the sending of a message each time the array size reaches 5, or if 20s ellapsed since last sent message.
Here is an example, using shift registers. there is a random data generation so that you can see it working (if you set the time between data long enough, then you will see the data sent after 20 sec. Well not exactly 20 sec, but i guess you can figure this out later by yourself...)
I hope this will be of any help
Attachments:
dynamic_array.vi ‏36 KB

Similar Messages

  • How can I convert an array off byte into an Object ?

    Hi folks...
    I�m developing an application that comunicates a PDA and a computer via Wi-Fi. I�m using a DataStream ( Input and Output ) to receive / send information from / to the computer. Most off the data received from him is in the byte[] type...
    How can I convert an array off byte ( byte[] ) into an Object using MIDP 2.0 / CLDC 1.1 ?
    I found on the web 2 functions that made this... but it uses a ObjectOutputStream and ObjectInputStream classes that is not provided by the J2ME plataform...
    How can I do this ?
    Waiting answers
    Rodrigo Kerkhoff

    There are no ObjectOutputStream and ObjectInputStream classes in CLDC. You must know what you are writing to and reading from the DataStream. You should write the primitives like int, String to the DataOutputstream at one end and read those in exactly the same sequence at the outher end using readInt(), readUTF() methods.

  • How can i build a java parser/interpreter

    How can i build a java parser/interpreter
    i know java offers a tokenizer, how can i use it for build a parser or interpreter that recognize tags like this:
    <query db="db1" select="row1, row2">
    and then perform some actions

    how can i use it for build a parser or interpreter that recognize tags like this:A compiler design class would help understand the issues involved.
    Or as suggested if you are merely trying to parse XML then there are variety of existing solutions.
    Of if not XML and you already understand the principles of compiler design (formally or perhaps with experience with lexx/yacc) then you could use JavaCC
    http://www.webgain.com/products/java_cc/

  • How can I use my array in another method.... Or better yet, what's wrong?

    I guess I'll show you what I am trying to do rather and then explain it
    public class arraycalc
    int[] dog;
    public void arraycalc()
    dog = new int[2];
    public void setSize(int size)
    dog[1] = size;
    public int getSize()
    return dog[1];
    This gives me a null pointer exception...
    How can I use my array from other methods?

    You have to make the array static. :)
    Although I must admit, this is rather bad usage. What you want to do is use an object constructor to make this class an object type, and then create the array in your main class using this type, and then call the methods from this class to modify your array. Creating the array inside the other method leads to a whole bunch of other stuff that's ... well, bad. :)
    Another thing: Because you're creating your array inside this class and you want to call your array from another class, you need to make the array static; to make it static, you must make your methods static. And according to my most ingenious computer science teacher, STATIC METHODS SUCK. :D
    So, if you want to stick with your layout, it would look like:
    public class arraycalc
         static int[] dog;
         public static void arraycalc()
              dog = new int[2];
         public static void setSize(int size)
              dog[1] = size;
         public static int getSize()
              return dog[1];
    }But I must warn you, that is absolutely horrible code, and you shouldn't use it. In fact, I don't even know why I posted it.
    You should definitely read up on OOP, as this problem would be better solved by creating a new object type.

  • All the sudden my iPod shuffle no longer shows up in my devices on my computer nor does iTunes show it?  Why would this happen? How can i fix this? Anyone know?

    All the sudden my iPod shuffle no longer shows up in my devices on my computer nor does iTunes show it?  Why would this happen? How can i fix this? Anyone know?

    Start with the "Shuffle not recognized" section in this Apple support document.
    http://support.apple.com/kb/TS1412#q2
    B-rock

  • How can i build table with two user name columne  ?

    How can I build view with two columns for user name ( one create and the other
    Can change also ) 
    And to display full name ( the user name is the key but not display  ) ?

    Hi,
    Creating View
    •     From initial screen of data dictionary(T.Code: SE11), enter the name of object i.e. view.
    •     Select view radio button and click on the push button.
    •     Dialog box is displayed for types of views.
    •     Select the view type.
    •     On the next screen, you have to pass following parameters.
    •     Short text
    •     In the table box you need to enter the table names, which are to be related.
    •     In join table box you need to join the two tables.
    •     Click on the TABFIELD. System displays the dialog box for all the table fields and user can select the fields from this screen. These fields are displayed in the view fields box.
    •     Save and Activate: When the view is activated, view is automatically created in the underlying database system. As long as the table exists in the database, the view also exists (Unless you delete it).
    Regards,
    Bhaskar

  • How can you build time series measures in OBIEE without using TODATE AGO fu

    How can you build time series measures in OBIEE without using TODATE and AGO function?
    Please provide steps to build time series
    measures in OBIEE without using TODATE and
    AGO function. Dashboard results not storing
    in cache when using TODATE and AGO functions.
    eventhough its cached users queries not
    hitting cache because queries doesn't match
    exact date time when using TODATE and AGO
    functions. so I want to build queries using
    sysdate and some simple calculations. Please
    send your inputs/ideas for my questions..
    Thanks in Advance

    This can be using Msum function in answers. Use the following formula, here dollars is my metric. Change the formula based on your metric.
    Msum("Sales Measures".Dollars ,2) - "Sales Measures".Dollars
    the report will be cached and better performed compared with time series. check ti
    - Madan Thota

  • In v.11, how can I capture video but not audio from a camera?

    In v.11, how can I capture video but not audio from a camera?

    Rodney
    I see what you mean....Premiere Elements 10 appears to be the last version that had options for the user to select Capture Video and/or Audio in the its Capture Window.
    If you are doing DV data capture firewire into the Premiere Elements 11 Capture Windows and want a final file without audio and you cannot do this at the camera level, then consider....
    1. Do the Capture "to the Timeline" - video linked to audio result on the project's Video Track 1
    a. Right click the Timeline DV AVl and select Delete Audio and then edit accordingly.
    or
    b. Import the DV AVI but, when you go to export it, in the export settings, remove the check mark next to Audio so that the export contains only the video portion.
    Publish+Share/Computer/AVI with Presets = DV NTSC Standard
    Please let us know if any of that worked for you.
    Thank you.
    ATR

  • How can I build Windows Like Help In Oracle Developer ?

    Could anyone help me by giving the information that how can I build a windows like help system ?
    Thanks In Advance.
    Saiful Alam

    I remember that in Oracle Develope 6.0 demos there are lots of this kind of help,but I don't know how to do it.If u can solve this problem,pls post it.

  • How Can I Build Mailing List Portlets?

    I want to make a portal with a mailing list portlet. I need to know how can I build the servlet for my apache server.

    By a mailing list portlet, do you mean a portlet where users can sign up for different mailing lists, or do you mean a specific mailing list that would archive all the messages sent to the list?
    In any case, if you have an existing application that manages a mailing list (like a list on listbot.com), one of the options you could investigate is to integrate that application as an External Application to Portal and leverage the Single Sign On capability.
    null

  • How can I build Instalation Program for java applet?

    I want to build on line internet game based on java applet.
    Uset must instull the game to his computer.And this program mast Connect to the server when user enter
    to this application.Not from explorer,but from my application,like when i enter to ICQ.
    My questions:
    How can i build instalation program in java?
    How can i connect to the server when user enter into my game not from explorer but from game?
    Thanks,Maya.

    Hi Maya
    First of all an Applet does not have to be "installed" as you would with a normal application. The browser handles the install and execution of the applet.
    Check out this URL for more about applets:
    http://web2.java.sun.com/docs/books/tutorial/applet/index.html
    On the subject client/server pairs - see:
    http://web2.java.sun.com/docs/books/tutorial/networking/sockets/index.html
    If you decide to make the game an application instead check out Sun's WebStart - under the products section.
    That's about all the help I can give you.
    Programming a game is a complicated subject - I am doing one too:
    http://hjem.get2net.dk/mhjembaek/armageddon/
    Kind reg,
    Hjembaek

  • How can i build a manchester coding in labview signal processing?

    how can i build a manchester coding in labview signal processing?
    mean to say that how can i digitize my audio input.i waqnt to convert my audio input into manchester coded data format!!!
    kindly post related VIs
    regards
    Solved!
    Go to Solution.

    idma-
    Check out the LabVIEW FPGA example http://zone.ni.com/devzone/cda/epd/p/id/6126
    Generate Manchester Signal
    Basic example showing generation of a Manchester encoded data stream. The data to be sent is generated in one loop and passed to a FPGA FIFO. The subVI which generates the Manchester data stream reads the data bytes form the FIFO and passes them to the digital output. The subVI prepends a simple header to each data packet which allows a reader (see next example) to synchronize and acquire/parse the data. The header consists of a thee half bit pulse followed by a one half bit pulse. The three half bit pulse is not a valid component of regular Manchester encoding and can therefore be differentiated from the rest of the protocol. In addition it can be used by the receiver to to easily measure the bit rate of the protocol. By dividing the length of the three half bit pulse in half (3/4 of a bit), the receiver has a measure to differentiate between full and half bit pulses in the rest of the protocol.
    Generate and Read Manchester Signal
    An extension of the previous example which adds a Manchester receiver subVI. You must physically wire the digital output channel to your input channel to loop back the data outside the I/O connector of your FPGA R series card or C series module. The Manchester receiver subVI is expecting the data packet to be prepended by a header as explained in the previous section.
    I will see if the is a more precise example but this should help
    Sam S
    Applications Engineer
    National Instruments

  • How can i get a array from a JSP ?

    Hi all,
    i have a STORED PROCEDURE like this:
    static public void getMyArray(double [] xx) {
    for (int i=0; i<myarr.length;i++){
    myarr=3.145*i;
    xx=myarr;
    return ;
    how can i get the array with XSQL and transform with a XSL ?
    Is this at all possible?
    Thanks for any help.
    Achim

    u r asking how ca u get array from jsp?
    and u r asking xsql ...some stuff i couldnot understand .can u repeat the question properly?
    null

  • How can i get music to not show up on my phone that i dont want there

    how can i get music to not show up on my phone that i dont want there

    If the app is G-Toolkit and you have a Gmail app on your iPhone, delete the Gmail app.  Apparently the G-Tool kit is tied to a Gmail app.  From searching the web my impression is that G-Toolkit is not spyware and is from a legitimate company that produces app for several platforms.

  • How can I have multiple WINDOWS (NOT tabs) with INDEPENDENT content?

    How can I have multiple '''windows''' (''not ''tabs) with '''independent''' content?
    I used to be able to open separate windows with Firefox, and the content could be completely different in each window. No matter what I did in any window, no OTHER window open at the time, nor any of the content therein, was affected. This is no longer the case and it is extremely frustrating for me.
    I do ''not ''like tabs and do not use them. I prefer multiple windows plus I am so used to using them, for so many years now! But with v9.0.1 I suddenly can no longer do what I've always done with my browser without this aggravating problem constantly reminding me that I can't have what I want in firefox anymore.
    Or can I? Does anyone have a solution I don't realize exists?
    Thanks,
    Sowelu

    AppleScriptObjC can use pretty much everything in the Cocoa API, so yes, it is possible.
    Note that a view is not the same as a window, and a window can have multiple views. There are also many ways to implement "tabs";  take a look at some of Apple's applications - they use various mixtures of toolbars, checkboxes, and radio buttons, for example.  An application such as this will be a lot more involved than what you have done so far though, using custom classes and subclassing existing ones, so be prepared to do a lot of reading and researching.

Maybe you are looking for

  • Tax code BW does not appear in any G/L account item

    Hi Gurus, I have a requirement with Brazil client, they have got two types of taxes (PIS and COFINS) For which I created 2 tax codes BW & BX (with 100% & 100%). I created two tax conditoins ZPIS & ZCOF with access sequence MWST. I assigned tax codes

  • Please help: Case Statement - ORA-01722: invalid number Error

    Hi All, I'm trying to use Case statement to recode Cancelled statuses into two groups 'Reject' if the difference between first date and last date is less than 29 and 'Accept' if the difference between first date and last date is greater than 30 Here

  • Update with EAP SIM

    Free Mobile, provider in France, uses now Eap-sim on his network Free Wifi! The request of this compatibility will be now important from french customers! I see that Xperia S has this Eap-sim while it is absent in Android 4! So it is Sony who has add

  • After Archive and Install, my Home folder is not quite right....

    I did an A&I last week and am slowly getting it back to the way it was (minus the problems) but am wondering if my Home Folder has all it should- it seems like it should have more in it so I am just double checking. In my Home Folder I have these ite

  • The Finder and previews of files in cover flow

    Just looking at the Leopard video. When I go to the finder and have the cover flow options selected, I don't see any previews of anything on my folders. The folders all have generic names. Nothing like the video tour on apple website. I can't see a p