Can I make an awkwardly sized while loop

So I ended up writing my code looking like this (see screenshot attached) and I want to add the upper right part into the while loop on the left.
Is there a way to just make an awkwardly shaped while loop (which in this case would look like a lowercase R)?
Thanks
Solved!
Go to Solution.
Attachments:
Censored.PNG ‏28 KB

No and if NI implemented as much they would probably have to file for a new patent since the old one mentions its shape (I think).
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • How can I make a "Keyboard Lock" while iTunes is playing?

    How can I make a "Keyboard Lock" while iTunes or other apps are playing? They should work/play on, screen should still be on, only keyboard is (maybe Password-) locked.
    Thanx in adv, tttimo

    Menu > Apple > System Preferences > Keyboard > Keyboard Shortcuts Application Shortcuts > + > Application: Browse to Pages > Menu Title: Footnote > Keyboard Shortcut: hit combination of keys > Add
    You will need to restart Pages but should then see it next to your Menu item.
    Peter

  • Can't break out of a while loop

    Hi, I am doing a networking course, for which an assignment was to write an echo client and server. I did the assignment in Java and it works just fine. However, there is something I don't understand that is bugging me. I wanted a way to stop the server by either detecting when the client entered "quit" or when the user of the server entered "quit". This was not part of the assignment, but after trying many different things I really want to know (1) what I am doing wrong and (2) what the correct way to do things would be.
    I tried to put an "if" clause within the while loop so that if the client entered "quit" the server would detect that, close the socket connections, and break the while loop. But... it seems that I have done this wrong and I am not sure why.
    (Note - I am not a Java programer - just a beginner, and the course in question isn't a programming course. I did the program below by following some brief guidelines/tutorial. I don't even have any books on Java to consult right now - just ordered few from Amazon for any future projects.)
    The code:
    // EchoServer.java     - a simple server program. It listens on a predetermined port for an incoming connection.
    //                After a client connects they can input a line of text and
    //                the server will echo the exact same line back.
    import java.io.*;
    import java.net.*;
    public class EchoServer {
         protected static int DEFAULT_PORT = 3004;
         public static void main (String args[]) throws Exception {
              int portNumber;          
              try {
                   portNumber = Integer.parseInt(args[0]);
              } catch (Exception e) {
                   portNumber = DEFAULT_PORT;
              ServerSocket myServer = null;
                try{
                   myServer = new ServerSocket(portNumber);      
                   System.out.println("Echo Server started. Listening on port " + portNumber);
              } catch (IOException e) {
                   System.out.println("Could not listen on port: " + portNumber);
                   System.out.println(e);
              Socket clientSocket = null;                         
              try{          
                     clientSocket = myServer.accept();
              } catch (IOException e) {
                     System.out.println("Accept failed:  " + portNumber);
                   System.out.println(e);
              BufferedReader input = null;     
              PrintWriter output = null;
              try {               
                   input = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
                   output = new PrintWriter(clientSocket.getOutputStream(), true);
              } catch (IOException e) {
                   System.out.println(e);
              String theLine;     
              while(true){
                   theLine = input.readLine();
                   output.println(theLine);     
                   output.flush();
                        if (theLine.equals("quit"))  {
                             input.close();
                             output.close();
                             clientSocket.close();
                             myServer.close();     
                             break;
                        }     // end if
              }     // end while     
         }     // end main
    }          // end EchoClient

    A few observations:
    - You might as well exit after you have caught your exceptions, since none of the conditions I see would allow your program to run properly afterwards. You can either do that by a System.exit(int) or a return;
    - Although this s an example program, you should take advantage of doing things right. Addining a try-finally would be good for tidying things up. First declare your variables before the main try, otherwise the finally won't be able to do its job. For example (this won't compile as is):
    Socket clientSocket = null;
    ServerSocket myServer = null;
    InputStream in = null;
    OutputStream out =null;
    try {
      String theLine = null;     
      while( (theLine = input.readLine()) != null ){
        output.println(theLine);     
        output.flush();
        if (theLine.equals("quit"))  {
           break;
      }     // end while
    } catch ( IOException ex ) {
      ex.printStackTrace();
    } finally {
      if ( in != null ) {
         in.close();
      if ( out != null ) {
         out.close();
      // add other conditions to close other closeable objects
    }The reasoning is that if an exception were ever to happen you would be sure that the clean up would be done. In your current example you may risk having an inputstream left open. Also note that BufferedReader.readLine() returns null when its arrived at the end of its content.

  • What is the maximum size of indexed array that can be created during execution of while loop?

    Hello,
    I am using a ring acquisition to take in images. If i write them as files in the loop, it slows down the acquisition unacceptably. Therefore i am converting image to array and storing the array until the acquisition is complete and then reading the array and converting back to image to save. The program sometimes runs out of memory (after a couple of minutes). Can anyone think of a way where i can store the array/images within the execution (without losing image information), without slowing it down and to avoid this memory problem?
    I have included the VI.
    Thanks in advance for any help or advice.
    kindest regards,
    FraserD
    Attachments:
    LL_Ring_in_IMAQ_8_bit_array_then_write_as_png.vi ‏94 KB

    When you build the array of pictures you do it using auto-indexing out of a while loop. That means that memory is aquired for a copy of the previous picture array and the array is rebuilt on every iteration, this is slow and requires a lot of extra memory.
    If you want to speed things up try initializing a shift register with a 3D array of a size that will be able to hold a certain number of pictures, then replace the "pages" as new pictures are aquired, replace operations do not require copying of the previous array and will thus be much much faster. The difference is exeptional when dealing with large arrays/amounts of data.
    Now, the shift register buffer could be built into a functional global, and you can add a push/pop logic to it so that you can have a p
    arrallell loop that works on writing the elements to disk. You could use a que for this, but I think even though you specify a size limit to the que it still aquires memory as new elements are added (correct me if I'm wrong people...:-)), so a functional global acting as a circular buffer og fixed size frame for a que should be better.
    MTO

  • How can I transfer data between two while loops in parallel

    Hello,
    I have two while loops in parallel and I want to transfer data from the first to the second loop. The problem isthat data are transfered only when the first loop ends. I tried with queue but it doesn't work. How can I do, preferentially without global variable ?
    Thanks.

    I join a very simplified VI's because the real works with PXI, RT, ...
    When you run the "secondVI.vi", no data comes in array from the "firstVI.vi".
    As I said in my first message, I tried with queue too but it doesn't work, because when the terminal go out from the while loop, while loop have to be ended to send data.
    Attachments:
    transfer_data.zip ‏20 KB

  • Can't write to instrument in while loop.

    in  my case, I use 2 while loop for the progarm. one is to write the data to the instrument, another one is use local variable to change the data depend on time. the problem is the data which need write to the instrument does change. but another while loop doesn't write it to the instrument unless I push highlight excution in the diagram or choose save as in the file. could anybody help me to find the problem?

    Hi Akuma,
    the fact that it works when you highlight execution implies (perhaps) a race condition. The lightbulb serializes the execution of your VI, so that functions execute in succession although they don't depend on each other. When you then run the VI in realtime, some functions are executed at the same time, e.g. "VISA flush buffer" and "VISA write". It is important to define the order the VIs execute on your VISA interface for instance by wiring the error-cluster.
    If this doesn't help, then post your VI (or a simplified version) or a screenshot of the diagram.
    Greets, Dave
    Greets, Dave

  • Can I make purchases in iTunes while I'm at the Dominican republic

    I'm in the Dominican republic and wanted to make several purchases in iTunes.  But I keep getting the PayPal account is not verified even though I checked my PayPal account and there isn't any problems with it.  And I checked my iTunes account and there doesn't seem to be any problems with it either.  What can I do to make changes if necessary to make it work.

    If you have a U.S. account, the Terms of Sale stipulate you must be in the U.S. at the time of purchase. Certainly, many people have reported being able to purchase while outside of the country. However, others have reported issues.  I suspect that, because your account is funded through PayPalt, it's not going to work.

  • How can I make a control inside a loop in a subVI change value when the calling VI's control changes?

    Hi.
    I think this is a pretty basic LV question, but I have not been able to find a good solution.
    I am attaching VIs that show the problem I am having, but obviously, the real application is a lot complicated, which forces me to try to do it this way.
    The issue is: I have a subVI with a Boolean control inside a loop.  When the control is true I want some action to take place.  When the subVI is run on its own, it works fine, acting properly when I set the boolean control to true via the LV FPGA interface from the host.  However, when I use it as a subVI, in which the top-level VI calls several instances of the subVI, I have the Boolean controls in the top level VI.  What is happening is that the false Boolean value with which the top-level VI starts is passed into the subVIs, and not updated, even though the control is inside the loop.
    Can any one suggest a good solution?
    Thanks,
    AlejandroZ
    Attachments:
    CallingVI.vi ‏7 KB
    subVI.vi ‏8 KB

    Hi.
    I know the example I posted might seem silly, but it was just to illustrate the problem I am having.  In reality this is the application:
    I have some LV FPGA code which uses a few FPGA IO to implement a serial link to communicate with a device.  Most of the time we are getting data from the device, so the serial link is used to send a read command, read in the data and put it into a FIFO.  However, I also wanted the VI to support sending data to the device, so I added an array control to put the data you want to send, and a boolean control to tell it you want to send it.
    Since sending and receiving data are done using the same FPGA IO, they cannot be independent operations, because they would garble each other. Therefore, in the subVI I have a loop in which I first read data if there is any to read, then check the boolean write control to see if there is data to write.
    As I mentioned, this works perfectly for talking to a single device.  However, we run into the issue of this topic when trying to replicate this for several devices.
    One easy solution is to not have the loop in the subVI, and have it in the calling VI (I am favoring this simple solution right now).  The only reason why I have not done this yet, is that the subVI has more than one loop, so I am going to have to create several subVIs.  I just posted to see if there was an even simpler solution...
    There have been some other possibly good solutions proposed here, though I am not sure if they work in LV FPGA.
    Thanks for all your responses.
    AlejandroZ

  • Can I make a custom sized movie us iMovie?

    What I am looking to create is a demonstration for an iPhone application for a situation where recording in the emulator is not feasible. I thought I'd capture a bunch of screen shots and drop them in to iMovie then use transitions so simulate the behavior of the app such as screens sliding in etc. This works well with one major exception - I can only create a movie that is 4:3 or 16:9. As such when my new page slides in the black bar slides over it first.
    I was hoping I could make the canvas for my movie a custom size that matches the size of the iPhone screen then the transition would neatly simulate the way the application transitions between screens.
    I read an article for an older version of iMovie that suggested using a PICT file as a mask but this doesn't seem to work in iMovie 11 (or I am doing something wrong).
    Thanks in advance for any assistance.
    Chris.

    With iMovie 11 you could do this, but to fit the 4:3 aspect ratio, you would have to use Letter Boxing. To do this, select the screen shot jpeg in your project, and use the Rotate, Crop, Ken Burns Tool to select FIT.
    However, there is a solution that will let you use the exact dimensions of the iPhone. QuickTime Pro will let you customize the dimensions any way you want.
    You can get QuickTIme Pro online from Apple for about $30. You will need QuickTime Player version 7, which is an optional install on the OSX install disk (if you have Show Leopard). If you have Leopard, you probably already have QuickTIme Player 7.
    In QuickTime Player 7, click QuickTime Player 7/Registration/Buy QuickTime 7 Pro.
    There is a QuickTime discussion group if you need detailed help from experienced users.

  • How can I make my interntet wireless while keeping my desktop connected?

    I just got my Macbook Pro and I love it! One problem... I got airport extreme with it and I don't know how I can keep my PC desktop connected to the internet (no wireless) while having my Macbook wireless? Everyone at the Apple store just said to plug my computer in to the airport express.... What plug? I have broadband and am using an ethernet cable.... PLEASE HELP! THanks!
    MacBook Pro   Mac OS X (10.4.8)  

    I do have airport extreme ^^. When i plug the ethernet from the computer to the aiport base it doesnt work because its not connect to the broadband... how can i fix this?
    Apple's AirPort terminology can be a bit confusing as Apple uses the term AirPort Extreme for both their wireless cards and base stations. If you take a look at the following reference, you can confirm which AirPort you actually have. (ref: http://docs.info.apple.com/article.html?artnum=107908) If your AirPort Base Station has only one Ethernet port AND it's not shaped like a "flying saucer," then most likely, it is the AirPort Express Base Station (AX).

  • Windows 7 beta: can't make hdd icon disappear while in OSX

    When using OSX now, on the desktop there is now the hdd icon that includes all the windows 7 files. When I go to finder prefs and uncheck Show hard disks the hdd icon containing the windows 7 files still remains. In order to remove the icon I have to uncheck the finder Pref Show CDs,DVDs and iPods. Don't really want to do that since those things won't appear on the desktop when connected. Any ideas why the hdd icon is being recognized by OSX as a CD, DVD or ipod in the finder prefes?
    lenn

    Hi lenn,
    easiest way to not show the Windows Icon while in OSX is to boot into Windows and use the Explorer to rename your Windows partition (the c:) to something starting with a . (point).
    That usually prevents the Windows Icon to be shown on your OSX.
    Regards
    Stefan

  • How can i make my powerbook wokring, while closed?

    Hello,
    is there a way to close the powerbook and it is still working? i.e. i-tunes keeps running etc... So that it doesn't start sleeping in the moment i close it?
    Help, please!

    Hi again, Wibke.
    Yes, I understand that — but, from looking at Apple's KnowledgeBase, those were the only answers I found that seemed relevant. Close, but no cigar. Sorry.
    My first thought was to set the System Preferences »» Energy Saver Sleep slider selections to "Never" — but I'm sure that's ~trivial and something you tried.
    So I just did a quick search for [ sleep (lid OR cover) ] in the PowerBook forums. Lots of results. Perhaps some are helpful?
    Many folks who've posted seem to think that having at least one of: mouse, keyboard, monitor attached is required.  But see whether Mr. Lizard's post here works for you.
    Sorry, I don't have a PowerBook to test possibilities. If this doesn't help, I'd think that your initiating a new thread in the appropriate PowerBook forum would be most helpful.
    Regards,
    Dean

  • Noob Help with While Loop

    Sorry for the "Noob"-ness on this one. I am working on a program for class and I am having a problem with a while loop. So I opened a new document and began to code a while loop that is basic to test my while looping skill. Apparrently, I have none. Can anyone tell me why this While Loop will not work:
    public class test
         public static void main(String[] args)
         int LoanTerm = 0;
              while (LoanTerm < 3);
                   System.out.println (LoanTerm);
                   LoanTerm++;
    Thanks.
    FatherVic

    to explain, the ; means that the while loop body is empty, and you will just spin forever testing whether LoanTerm < 3, without doing anything else.

  • Timing with while loop

    Hello,
    How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,
    Attachments:
    while- loop.GIF ‏6 KB

    nichts wrote:
    Hello,
    How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,
    I would use as GerdW has mentioned,"elapsed time.vi" in a statement 1st case structure, after set time has elapsed> goto 2nd case structure. try not to use flat sequences....this can be done with case statements with transitional coding. I have noticed young LV programmers like to use flat sequences...I think it's a trap set up by LV developers? 

  • How can we make screen fields obligatory?

    hi, guru's
             how can we make screen fields obligatory while desiging a screen in screen painter (se51)?
    regards,
         satheesh.

    Hi,
    Go to attributes of the field in layout..
    go to program tab and check input field..
    and in drop downlist put required..
    Thats it..
    Reward points if it helps..
    Regards,
    Omkar.

Maybe you are looking for

  • Having problem with display of full name in finder bar!

    As shown in the image above, my full name in finder bar is not showing properly. When I select 'icon' from system preferences it shows correctly, but when I select full name or short name, it touches the top. Help me fixing this issue!

  • Spot Colors and Transparency

    In posters, brochures etc. designed with gradients,(AI10) when saving, I always get the "when spot colors are used w/transparency, changing them to process colors outside of illustrator can generate unexpected results." My printer wants spot colors a

  • Use of statefull RFCs in WebDynpro

    Hello, i want to create a WebDynpro application which uses RFCs. Every RFC call will relay on the fact, that ABAP-Memory updated in previous call can be accessed. What do you think, will it work? is it a correct strategie? Will it work if i use web s

  • Read the entire content of XML Form progamatically

    Hi, I want to write a program which can read the entire content of XML Form. In some of the xml form, some entity like Title etc are coming from Metadata property. But i want to read everything through the java code. I can read the xml file, but it d

  • IPhoto sync

    I have iPhoto on my iPad and iMac how can I keep them both in sync Thanks