Infinite for loop problem

hello there
i'm trying to make a ping program that if the user presses a button
the program pings on a server continusely and print the response
so i used the infinite for loop but when i'm trying to exit the program
it doesn,t exit?how to fix that? here is my code
import java.io.*;
import java.net.*;
import javax.swing.*;
import java.awt.Container;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class ReachableTest2 extends JFrame  {
public static void main(String args[]) {     
JButton btn=new JButton("Check The Ping");          
JFrame frame = new JFrame("Ping Check");
           frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent ev) {
                System.exit(0);
  ActionListener actionlistener=new ActionListener() {
      public void actionPerformed(ActionEvent evnt) {
                  if(evnt.getActionCommand().equals("Check The Ping"))         
                        try {
       InetAddress address = InetAddress.getByName("212.122.224.10");
       System.out.println("Name: " + address.getHostName());
       System.out.println("Addr: " + address.getHostAddress());
       for( ; ; )
       System.out.println("Reach: " + address.isReachable(3000));
     catch (UnknownHostException e) {
       System.err.println("Unable to lookup ");
     catch (IOException e) {
       System.err.println("Unable to reach ");
         frame.add(btn);
         btn.addActionListener(actionlistener);
         frame.setSize(250,150);
        frame.setVisible(true);
         frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
}

hi friend ,
i have made some changes to your code ,i hope this might help let me know if it works for you
import java.io.*;
import java.net.*;
import javax.swing.*;
import java.awt.Container;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class test extends JFrame {
public static void main(String args[]) {
JButton btn=new JButton("Check The Ping");
JFrame frame = new JFrame("Ping Check");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent ev) {
System.exit(0);
ActionListener actionlistener=new ActionListener() {
public void actionPerformed(ActionEvent evnt) {
     if(evnt.getActionCommand().equals("Check The Ping"))
          ping();
     frame.add(btn);
     btn.addActionListener(actionlistener);
     frame.setSize(250,150);
frame.setVisible(true);
     frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
          public static void ping()
               Runnable r = new pinging();
               Thread t = new Thread(r);
               t.start();
class pinging implements Runnable {
public pinging()
public void run()
try {
               InetAddress address = InetAddress.getByName("212.122.224.10");
               System.out.println("Name: " + address.getHostName());
               System.out.println("Addr: " + address.getHostAddress());
               for( ; ; )
               System.out.println("Reach: " + address.isReachable(3000));
               catch (UnknownHostException e) {
               System.err.println("Unable to lookup ");
               catch (IOException e) {
               System.err.println("Unable to reach ");
Regards

Similar Messages

  • Infinite for loop to load images

    I hope to load repeat images until user close the browser.
    But I find it is hard to use infinite loop to make it.
    Is there any other way to do it ??
    Thanks a lot
    for (;;){     <=================================== ???
    //jpeg = (String) session.getValue("JPEG");
    //int jpeg_ch = Integer.parseInt(jpeg,10);
    session.putValue("JPEG_NO",String.valueOf(jpeg_no));
    //int jpeg = (int)((Math.random()*123456789)%16);
    %>
    <img style="position: absolute; left:<%= x[jpeg_no] %>; top:<%= y[jpeg_no] %>; width: 160; height:120;" Src="http://192.168.10.110:8080/servlet/Servlet?jpeg=<%= jpeg_no %>">

    for(;;) is an infinite for loop
    while(true) is an infinite while loop
    please post your URL so that I can make sure to avoid going to this page. I certainly don't want the page to constantly be loading images forever.

  • Cursor for loop problem

    Hi to all!
    I have this sample data:
    CREATE TABLE person(id NUMBER PRIMARY KEY,
                        first_name VARCHAR2(30),
                        father_id NUMBER REFERENCES person(id),
                        mother_id NUMBER REFERENCES person(id));
    INSERT INTO person
    VALUES (1, 'John', NULL, NULL);
    INSERT INTO person
    VALUES (10, 'John''s son Bill', 1, NULL);
    INSERT INTO person
    VALUES (20, 'John''s daughter Briana', 1, NULL);
    INSERT INTO person
    VALUES (100, 'Bill''s son George', 10, NULL);
    INSERT INTO person
    VALUES (101, 'Bill''s son Matthew', 10, NULL);
    INSERT INTO person
    VALUES (200, 'Briana''s son Greg', 20, NULL);
    INSERT INTO person
    VALUES (201, 'Briana''s son Fred', 20, NULL);
    /Then I execute this PL/SQL anonymous block:
    SET SERVEROUTPUT ON
    DECLARE
        CURSOR children IS
          SELECT s.first_name name
          FROM person s, person p
          WHERE (s.father_id = p.id OR s.mother_id = p.id)
          AND p.id = 1;
        CURSOR g_children IS
            SELECT s.first_name gc_name
            FROM person s, person p
            WHERE (s.father_id = p.id OR s.mother_id = p.id)
            AND p.id IN (SELECT gs.id FROM person gs, person gp
                         WHERE  (gs.father_id = gp.id OR gs.mother_id = gp.id)
                         AND gp.id = 1);      
    BEGIN
        FOR c_rec IN children LOOP
          DBMS_OUTPUT.PUT_LINE(c_rec.name);
             FOR g_rec IN g_children LOOP
                DBMS_OUTPUT.PUT_LINE(g_rec.gc_name);
             END LOOP;
        END LOOP;
    END;I have this result:
    John's son Bill
    Bill's son George
    Bill's son Matthew
    Briana's son Greg
    Briana's son Fred
    John's daughter Briana
    Bill's son George
    Bill's son Matthew
    Briana's son Greg
    Briana's son FredHow could I modify nested for loop, so that I have output like this:
    John's son Bill
    Bill's son George
    Bill's son Matthew
    John's daughter Briana
    Briana's son Greg
    Briana's son FredSo that I have one child and then his children, and then second child and his/her children, and so on.
    Thanks!
    Edited by: Spooky on 2013.02.06 12:54

    Suri wrote:
    BluShadow wrote:
    You would need to parameterize your children query to it only get's the children of that parent.Hi Blu,
    I understood that it can be easily solved by CONNECT BY PRIOR clause.
    Just for curisosity I am asking you, Assume that if we dont know till what level children details exist in person table (for eg: John's son is Bill , Bill's son is XYZ , XYZ son is ABC etc), is there any better way to acheive this using parameter cursor. Oh yeah, sure... use recursion...
    SQL> CREATE TABLE person(id NUMBER PRIMARY KEY,
      2                      first_name VARCHAR2(30),
      3                      father_id NUMBER REFERENCES person(id),
      4                      mother_id NUMBER REFERENCES person(id)
      5                     )
      6  /
    Table created.
    SQL>
    SQL> INSERT INTO person VALUES (1, 'John', NULL, NULL);
    1 row created.
    SQL> INSERT INTO person VALUES (10, 'John''s son Bill', 1, NULL);
    1 row created.
    SQL> INSERT INTO person VALUES (20, 'John''s daughter Briana', 1, NULL);
    1 row created.
    SQL> INSERT INTO person VALUES (100, 'Bill''s son George', 10, NULL);
    1 row created.
    SQL> INSERT INTO person VALUES (101, 'Bill''s son Matthew', 10, NULL);
    1 row created.
    SQL> INSERT INTO person VALUES (200, 'Briana''s son Greg', 20, NULL);
    1 row created.
    SQL> INSERT INTO person VALUES (201, 'Briana''s son Fred', 20, NULL);
    1 row created.
    SQL>
    SQL> set serverout on
    SQL>
    SQL> declare
      2    procedure recurse_persons(father_id in number, lvl number := 0) as
      3      cursor cur_person is
      4        select *
      5        from   person
      6        where  nvl(father_id,0) = nvl(recurse_persons.father_id,0);
      7    begin
      8      for p in cur_person
      9      loop
    10        dbms_output.put_line('['||to_char(lvl+1)||']'||lpad(' ',lvl*2,' ')||p.first_name);
    11        recurse_persons(p.id, lvl+1);
    12      end loop;
    13    end;
    14  begin
    15    recurse_persons(null);
    16  end;
    17  /
    [1]John
    [2]  John's son Bill
    [3]    Bill's son George
    [3]    Bill's son Matthew
    [2]  John's daughter Briana
    [3]    Briana's son Greg
    [3]    Briana's son Fred
    PL/SQL procedure successfully completed.With that, we're just using one cursor definition that suits all, and using recursion to go down each branch of the hierarchy, regardless of how deep. Of course you then run the risk (if it's a very deep hierarchy) of getting a "too many open cursors" error.

  • Infinite for loop

    hi
    I have the following for loop:
    for (TreeMap <String, Integer> i = result; i.size()!=0; i.headMap (i.lastKey()))
    {out.println("keyword = " + i.lastKey() + " ; page no. = " + i.get(i.lastKey()));
    result is a tree map that contains several strings (the keys) and integers (values).
    I need to note that in the process of creating result some values (i.e. strings) were repeated and therefore their values were replaced (run over).
    When I run the program it just perform the loop again and again without getting rid of the last value / key pair in i in every iteration.
    Can anyone explain why this is?
    thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    hi
    I have the following for loop:
    for (TreeMap <String, Integer> i = result; i.size()!=0; i.headMap (i.lastKey()))
    {out.println("keyword = " + i.lastKey() + " ; page no. = " + i.get(i.lastKey()));
    result is a tree map that contains several strings (the keys) and integers (values).I need to note that in the process of creating result some values (i.e. strings) were repeated and therefore their values were replaced (run over).
    When I run the program it just perform the loop again and again without getting rid of the last value / key pair in i in every iteration.
    Can anyone explain why this is?
    thanks in advance.

  • MSI P67A-GD65 infinite boot/loop problem

    installed everything into my case and go to boot into the UEFI and nothing !
    i press the power switch, everything starts fine and the fans spin up and the LED's on the board are fine, waits 5 secs then it shuts itself off and tries the exact same process again. it keeps doing this until i cut the power !
    i've checked the 24pin etc, KB & mouse r fine, 2 different sets off RAM in every slot, cleared CMOS (i think).
    seems like a very common problem with this board after a bit of googling !!
    also tried
    Quote
    this is the 1st time ive used it !
    tried the OC genie button on and off.
    been sitting in the box unused for about 1.5 months. doubt that means anything tho.
    put the stock cooler on securely, and still the same problem !
    now tho, it wont start for about 3 secs after i press the power button
    and
    Quote
    disconnected all the SATA's bar 1, and still the problem :/!
    all the standoffs etc r fitted correctly and iv re-connected the 8 pin cpu and 24 pin. 1 stick off RAM in the 1st slot also :/!
    checked no molex connectors r touching the case metal either
    any suggestions?

    motherboard: MSI P67A-GD65 (B3) bought on march 31st and used today for 1st time
    CPU: intel core i7 2600K
    CPU Cooler: tried an alpenfohn matterhorn with Scythe 1850RPM gentle typhoon Push/pull also tried the stock cooler
    RAM Corsair CMD4GX3M2A1600C9 (2X2GB kit of 1600Mhz CL9 corsair dominator DDR3) and tried Patriot PSD34G1600KH (2X2GB kit of Patriot signature DDR3)
    PSU Corsair TX650 650w psu
    GPU XFX radeon 4870 1GB
    Case NZXT M59 + mainly scythe fans and a noctua and coolermaster
    DVDRW liteon DVDRW
    Storage 128GB kinsgton SSDnow V100, 1TB Samsung F3 7200RPM, 1TB Hitachi 7K100 7200RPM all sata 3gb/s
    Generic 5.25" fan controller
    2 x 12" blue CCFL's
    OS windows 7 x64 professional (installed on the SSD, but havent booted it yet as the board doesnt even get to BIOS :()
    peripherals Microsoft reclusa keyboard and gigabyte GM-6990 (i think) mouse
    monitor Benq g2222hdl connected via DVI
    the only things i have changed today are, put the new notcua fan in my case, changed the Motherboard and CPU from and Asus M4A78LT-M & Athlon II X4 640 to MSI P67A-GD65 (b3) & intel core i7 2600k. Also, put the alpenfohn matterhorn on today.
    everything is confirmed working apart from the CPU & Motherboard. everything worked yesterday, but i didnt have the necessary equipment to test the motherboard or cpu before using them together (today)
    hope this will help

  • Another Infinite Login Loop Problem - need help badly

    Hello. I need help.
    When I start up my iMac (24 inch last generation model) I can't log into the OS. When I enter my password I see the default OS wallpaper (nothing else) then it kicks me to a blue screen then right back to the login. Same thing over and over. I've already ran disk utility off of the install CD to repair permissions, etc... but no luck. This even happens when I enter into safe mode. I'm running the latest version of the OS.
    Can anyone help me?

    Restore the bootable backup/clone or Time Machine backup. Without one, you have a difficult situation. First thing to try is boot with your install disc, run Disk Utility, and repair the disk.

  • For Those Experiencing the Infinite Boot Loop on P67A-GD65

    My story in a nutshell - bought the original (non B3) P67A-GD65 from Newegg on the first day it was available along with 8 GB (2X4 GB) Corsair Vengeance DDR3-1600 ram and Intel i5 2500k processor.  Received the items, hooked them up on a test bench (rubber mb supports so no grounding issues) along with a Corsair VX-550 P/S (both 24 pin and 8 pin leads plugged in), GTX-460 video card (2 PCI-E 6 pin connectors plugged in), the default Intel i5 heatsink and a known good USB KB and mouse.  Promptly experienced the infinite loop boot issue others have described - fans on h/s and video card spin up, 1st APS LED lights for a fraction of a second then all 6 light up for 3 to 4 seconds then APS LEDs go out and fans on h/s and video card spin down.  No beeps from speaker and no video signal to monitor.  After everything has stopped spinning (about 3 to 4 seconds), the power comes back on and the cycle repeats exactly the same way every time until I turn off the power supply.  Here is what I tried:
    1.  Used only 1 stick of ram (tried in all 4 slots)
    2.  Pulled 1 stick of DDR3-1600 ram from my working X58 system (again tried in all 4 slots)
    3.  Different power supply (OCZ 520-ADJ)
    4.  Known good PCI video card instead of GTX-460 (in case there was some problem with power draw)
    Under each of these changes, the same infinite boot loop occurred.  Called tech support, they walked me through each step I had already tried and finally suggested I RMA both the MB and the CPU to Newegg.  Did so and the replacements worked fine from the start.
    Then came the B2 stepping issue.  Notified both Newegg and MSI that I had one of the B2 boards.  Newegg notified me they had the new B3 boards in stock.  Arranged for cross shipment where they would ship me the new board and then I would return the old one.  Received the new one last Friday.  Put it on the same test bench as above and the same infinite boot loop is now happening on the new B3 stepping board.  Just to test, put the cpu, ram and GTX-460 video card back into the B2 stepping board and everything works perfectly.
    Another test, since some people reported the infinite loop problem when they had failed to plug in the 8 Pin power lead to the mb, I unplugged the 8 pin connector on the working B2 stepping board.  The infinite loop problem is entirely different in this case.  When you press the power switch, the fans start to spin and the first LED lights for less than a second.  Then the LED goes off and the fans start to spin down.  After everything has stopped, it repeats until the power supply is turned off.
    This is my first MSI motherboard after 15 years of Abit and Asus with the occasional Gigabyte or EVGA thrown in and I am not happy with the QC I have experienced with this board!
    So to summarize, 2 of the 3 P67A-GD65 boards I received from Newegg have had this infinite boot loop problem.  Apparently, I have to RMA again.  Am I lucky or what???!!!
    Monte

    Quote from: BMSliger on 16-March-11, 00:05:11
    If it was the chipset causing this problem, it seems it would be a widespread complaint among all vendors.  I have looked at the Asus and Gigabyte boards and do not see this particular problem described and certainly not multiple users reporting the same problem.  I am giving up on this and will arrange an RMA and will see if I can talk Newegg into an Asus board for only the price difference.  MSI has a very good reputation in the industry, but it has been a disaster for me!!!
    Thanks for your replies,
    Monte
    Frankly, I can understand your frustrations on the problem but it is not fair to judge a brand by looking at the number of complains in a forum. I can guarantee you, there are more RMAs out there from all other manufacturers even before an user even knows that a Forum ever exist for them to post for enquiry and most of them aren't an IT engineer or hardware engineer by self.
    If you want to compare, I have also been in this industry for more than 15 years and I have many DOA boards from other manufacturers as well and DOAs after RMAs are common to me. When you handle thousands of PCs, laptops and mainframes, such things are really common.
    Back to your problem. Maybe I didn't make it clear on how I want to describe on my previous post for your issue in words. I am referring to having a chance to let the system boot into BIOS or past BIOS after multiple times of rebooting, then you can try to flash the BIOS. This is also not uncommon as I have encountered systems which are problematic but are able to boot into Windows after 15 to 20 times of infinite reboots by itself.
    How about processor? Tested it in another system yet? Or is this another unless suggestion to you?

  • Question about for-loop

    I have a for-loop problem:
    I want to write a two for-loops to produce this below output
    100
    200  205
    300  305  310
    400  405  410  415
    500  505  510  515  520
    600  605  610  615  620  625
    700  705  710  715  720  725  730 
    800  805  810  815  820  825  830  835Anyone has some idea, i seem to get stuck!

    vichet wrote:
    Yeah, you all are right! it's my homework.
    It looks kinda easy. but at the previous moment, I could not get it to solved.but you did. Good deal!
    By the way, do you have any idea on how I can learn to improve my skill to solve such problem quickly? It seems to take me long to solve this problem. and I am worried that it might take me long to write code later on as my brain does not seem to be robust :(Yep, practice, practice, practice. Try to stretch yourself. There are problems posted here every day, so why not try to figure them out?

  • Problem with continue in a for loop

    Hi all
    I have a variable of type Node[] which contains nodes like Text,ImageView and SVGPath etc...
    now i want to filter that group which means i want to separate the Text nodes for that i used a for loop as
    var abc:Node[];
    var abcsize=sizeof abc;
    var textarray:Text[]=for(i in abc){
    if(i.toString()=="Text"){
       i as Text;  //casting Node to Text
                     }//if
               else{
                      continue;     //if the node is not of type Text then i am skipping that one
                     }//else
          }//forwhen i am trying to compile this i am getting the compilation error as
    Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the
    Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues)
    after checking for duplicates.  Include in your report:
    - the following diagnostics
    - file 1.2.3_b36
    - and if possible, the source file which triggered this problem.
    Thank you.
        else{
    An exception has occurred in the OpenJavafx compiler. Please file a bug at the Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues) after checking for duplicates. Include the following diagnostic in your report and, if possible, the source code which triggered this problem.  Thank you.
    java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCContinue cannot be cast to com.sun.tools.javac.tree.JCTree$JCExpression
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:568)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2320)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava.visitIfExpression(JavafxToJava.java:3595)
            at com.sun.tools.javafx.tree.JFXIfExpression.accept(JFXIfExpression.java:48)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2320)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava$5.addElement(JavafxToJava.java:3007)
            at com.sun.tools.javafx.comp.JavafxToJava.visitForExpression(JavafxToJava.java:3212)
            at com.sun.tools.javafx.tree.JFXForExpression.accept(JFXForExpression.java:50)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava.translateNonBoundInit(JavafxToJava.java:1861)
            at com.sun.tools.javafx.comp.JavafxToJava.translateDefinitionalAssignmentToValueArg(JavafxToJava.java:1876)
            at com.sun.tools.javafx.comp.JavafxToJava.translateDefinitionalAssignmentToSetExpression(JavafxToJava.java:1917)
            at com.sun.tools.javafx.comp.JavafxToJava.visitVarScriptInit(JavafxToJava.java:1976)
            at com.sun.tools.javafx.tree.JFXVarScriptInit.accept(JFXVarScriptInit.java:67)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:598)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:628)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2306)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:598)
            at com.sun.tools.javafx.comp.JavafxToJava.access$700(JavafxToJava.java:89)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.makeRunMethodBody(JavafxToJava.java:2164)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.methodBody(JavafxToJava.java:2224)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.doit(JavafxToJava.java:2279)
            at com.sun.tools.javafx.comp.JavafxToJava.visitFunctionDefinition(JavafxToJava.java:2292)
            at com.sun.tools.javafx.tree.JFXFunctionDefinition.accept(JFXFunctionDefinition.java:93)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:509)
            at com.sun.tools.javafx.comp.JavafxToJava.visitClassDeclaration(JavafxToJava.java:1261)
            at com.sun.tools.javafx.tree.JFXClassDeclaration.accept(JFXClassDeclaration.java:141)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:521)
            at com.sun.tools.javafx.comp.JavafxToJava.visitScript(JavafxToJava.java:1147)
            at com.sun.tools.javafx.tree.JFXScript.accept(JFXScript.java:89)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:517)
            at com.sun.tools.javafx.comp.JavafxToJava.toJava(JavafxToJava.java:691)
            at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:728)
            at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:699)
            at com.sun.tools.javafx.main.JavafxCompiler.compile2(JavafxCompiler.java:785)
            at com.sun.tools.javafx.main.JavafxCompiler.compile(JavafxCompiler.java:685)
            at com.sun.tools.javafx.main.Main.compile(Main.java:624)
            at com.sun.tools.javafx.main.Main.compile(Main.java:312)
            at com.sun.tools.javafx.Main.compile(Main.java:84)
            at com.sun.tools.javafx.Main.main(Main.java:69)
    ERROR: javafxc execution failed, exit code: 4
    D:\work\javaFX\javaFX_workspace\Book_fix\nbproject\build-impl.xml:143: exec returned: -1Any one please help

    - This is a real bug in the compiler, obviously. I wonder if I haven't meet it already, or something similar. Maybe you should report it.
    - The problem is that your code is incorrect anyway: the branch with continue doesn't return a value, so cannot be used in the list building. Well, at least that's what I suppose which confuses the compiler. You can try and return null (which will be discarded) instead of using continue.
    - But your code can be much more efficient, compact and perhaps even more readable, using the powerful JavaFX sequence comprehension:
    var seqMixed = [ 1, "one", Text { content: "Ichi" }, Circle {}, 2, "two", Text { content: "Ni" } ];
    println(seqMixed);
    var seqFiltered = seqMixed[ obj | obj instanceof Text ];
    println(seqFiltered);
    seqFiltered = seqMixed[ obj | not (obj instanceof Text) ];
    println(seqFiltered);

  • I'm doing a scan around a line by sampling data 360 degrees for every value of z(z is the position on the line). So, that mean I have a double for-loop where I collect the data. The problem comes when I try to plot the data. How should I do?

    I'm doing a scan around a line by sampling data 360 degrees for every value of z(z is the position on the line). So, that mean I have a double for-loop where I collect the data. The problem comes when I try to plot the data. How should I do?

    Jonas,
    I think what you want is a 3D plot of a cylinder. I have attached an example using a parametric 3D plot.
    You will probably want to duplicate the points for the first theta value to close the cylinder. I'm not sure what properties of the graph can be manipulated to make it easier to see.
    Bruce
    Bruce Ammons
    Ammons Engineering
    Attachments:
    Cylinder_Plot_3D.vi ‏76 KB

  • I have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    i have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    Hi fais,
    Following through with what JB suggested. The steps involved in replacing the inner for loop with a while loop are outlined below.
    You can replace the inner for loop with a while by doing the following.
    1) Right-click of the for loop and select "Repalce" then navigate to the "while loop".
    2) Make sure the tunnels you where indexing on with the for loop are still indexing.
    3) Drop an "array size" node on your diagram. Wire the array that determines the number of iterations your for loop executes into this "array size".
    4) Wire the output of the array size into the new while loop.
    5) Set the condition terminal to "stop if true".
    6)Drop an "OR" gate inside the while loop and wire its output to the while loops condition terminal.
    7) C
    reate a local of the boolean "stop" button, and wire it into one of the inputs of your OR gate. This will allow you to stop the inner loop.
    8) Drop a "less than" node inside the inner while loop.
    9) Wire your iteration count into the bottom input of the "less than".
    10) Wire the count (see step 4 above) into the top input of the less than. This will stop the inner loop when ever the inner loop has processed the last element of your array.
    Provided I have not mixed up my tops and bottoms this should accomplish the replacement.
    I will let others explain how to takle this task using the "case solution".
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to create a loop for my problem? Please read for more detail.

    Hi guys,
    I am doing my project and currently i faced one problem and that is more towards looping i guess. My project is about embedding and I had done all the embeding stuffs already but I am only able to embed my barcode into image at starting at coordinate 0,0.
    What i want to know is how do i had to structure my loop so that i can embed my barcode even when i start at x=20 and y=30 for example?
    currently i used nested for loop which is why i can only start at 0,0.
    I wanted to make it something like this:
    for<lets make it x=20>
    for<lets make it y=30>
    <my code retrieve pixel at x=20 y=30>
    <my code retrieve pixel of barcode at x=0 y=1>
    end
    end
    end
    I wanted to have something like above where i can start at 20,30 but at that certain cooridnate i will starting retrieve barcode pixel at 0,0.

    So just say what you don't know how to do, because what I showed is exactly what you need.
    So please answer the following:
    1.) I have an image of my barcode and I don't know how to paint it onto another image.
    or is it
    2.) I have a routine that draws a barcode at a fixed location and I don't know how to get it to draw anyplace I tell it.
    or
    3.) I don't have anything yet, and I want someone to code this for me.
    or it is
    4.) Les you don't have any idea what I want to do, so here is what I need (pay more attention):
    but in any case (well except #3), you'll be better off if you can give us some code to look at and explain what you are specifically trying to do and where you are having problems.

  • Problem cycling through elements of an array using a for loop ~ error 200609?

    Hi,
    I'm outputting a 194-element array from a MATLAB script node into a for loop where the array is indexed then converted into a 8-bit boolean pattern which I'm trying to output using DAQ Assistant. I'm using LabVIEW 8.2 and a PCI 6133 DAQ using a counter(Ctr0InternalOutput) to time the output. The first element of the array goes through the loop perfectly however never makes it's way back through and throws error 200609: Generation cannot be started because the slescted buffer size is too small. Increase the buffer size. After probing the line before DAQ Assistant I confirmed only one element makes it through the loop and then throws this error? I've trying doing the same things with lower lowel DAQmx vi's using a DAQmx configure output buffer vi to override this buffer size problem, but still get the same result(not the error but same data flow problem)? Anybody know what's going on? I've included the vi's I've been working with. Thanks!
    Millie
    Attachments:
    Untitled 22.vi ‏228 KB
    Untitled 34.vi ‏180 KB

    Hi,
    I'm outputting a 194-element array from a MATLAB script node into a for loop where the array is indexed then converted into a 8-bit boolean pattern which I'm trying to output using DAQ Assistant. I'm using LabVIEW 8.2 and a PCI 6133 DAQ using a counter(Ctr0InternalOutput) to time the output. The first element of the array goes through the loop perfectly however never makes it's way back through and throws error 200609: Generation cannot be started because the slescted buffer size is too small. Increase the buffer size. After probing the line before DAQ Assistant I confirmed only one element makes it through the loop and then throws this error? I've trying doing the same things with lower lowel DAQmx vi's using a DAQmx configure output buffer vi to override this buffer size problem, but still get the same result(not the error but same data flow problem)? Anybody know what's going on? I've included the vi's I've been working with. Thanks!
    Millie
    Attachments:
    Untitled 22.vi ‏228 KB
    Untitled 34.vi ‏180 KB

  • Help in script logic - problem in FOR loop

    Hi Experts,
    We are using BPC 7.5 SP08. I have written a FOR loop in script logic default.lgf which is as follows:
    *FOR %TIM_MEM%=%TIME_SET%
    *XDIM_MEMBERSET TIME =%TIM_MEM%
    *WHEN P_ACCT2
    *IS "OSDU"
    REC(EXPRESSION=[P_ACCT2].[ASSTCAINVURO][P_ACCT2].[COGSUPRVIPSA]/[P_ACCT2].[ASSTUPRVTAQTY],P_ACCT2="COGSUIPSAO")
    *ENDWHEN
    *COMMIT
    *NEXT
    As per my requirement, all this members: [ASSTCAINVURO], [COGSUPRVIPSA], [ASSTUPRVTAQTY] exists for months September to next year's August. But in my input schedule, the months are from August to next year's July(which is the company's fiscal year). Consequently the loop runs for month August to next year's July while I need to run the loop 1 month late(i.e. September to next year's August). This was achieved earlier by hard-coding the time members which we cannot afford as this requires to update these hard-coded member IDs every year.
    We have also tried using the "NEXT" property of TIME dimension as follows:
    *XDIM_MEMBERSET TIME =%TIM_MEM%.NEXT
    but %TIM_MEM%.NEXT doesn't get the month in 'NEXT'.
    Please suggest if there is any way out to solve this problem.
    Thanks in advance.

    Hi Appu,
    Even if you restrict the scope using the XDIM statement, your script will just run the number of times as per the for loop. Actually, in reality, the same calculation is happening again and again, in your code; since your calculation is not based on the time member.
    To use the for loop effectively, you need to incorporate the time member in your calculation.
    Please look at the below sample code:
    *XDIM_MEMBERSET TIME = %TIME_SET%
    *FOR %TIM_MEM%=%TIME_SET%
       *WHEN P_ACCT2
       *IS "OSDU"
          *REC(EXPRESSION=<CALCULATION>,P_ACCT2="COGSUIPSAO")
       *ENDWHEN
    *NEXT
    And in your calculation, you can use statements like
    ([P_ACCT2].[ASSTCAINVURO],TMVL(1, [TIME].[%TIM_MEM%]))
    This will ensure that everytime (as per the for loop), the calculation works on separate set of data.
    Hope you got the idea.

  • Problem in executing cursor for loop

    hi all,
    I am facing following problem.
    We are using cron utility on unix to run pl/sql stored procedure.
    This procedure in turn calls separate procedures. However any one of the procedure does not end in pl/sql even though it has completed its intended processing.
    We are using cursor for loop for data processing and also using database link to fetch data from other instance.
    Can anyone help me on possible reasons for this problem

    The proc only needs a single 'open s_cursor for ...' statement where the query is a join between all the tables involved. You have obfuscated your query so much in the post that I can't construct it for you (your second select doesn't even join to the 's' table), but the point is that you don't need a cursor loop, just a single query.

Maybe you are looking for

  • Macbook Pro 4,1 - NVIDIA GeForce 8600M GT

    So, over the last 2 years, I very rarely used my Mac.  I had my work laptop, iphone and iPad.  In the last few weeks I started using the laptop for running the INSANITY workout videos(MP4) during my workout.  Sunday, June 30, during my early morning

  • Firefox won't display at all, comp thinks it's there but nothing.redid plugins also, no help. thanks, Steve

    Hi, firefox was working fine for the longest time and suddenly, it just wouldn't display on my screen. The icon is there, it looks like it's trying to load and nothing happens. I uninstalled it and reinstalled, didn't help. Did the updates on 2 plugi

  • ITouch 5 is not recognized by Windows 7

    Hi, I bought a used iTouch 5th gen and charger cable and have spent the last 5 hours trying to get it to sync to iTunes. I had a 4th gen iPod that i lost a month ago that worked perfectly with my computer. I have reconnected and restarted both device

  • QuickTime player/ Windows Media Player help

    I downloaded the WPM for mac and it is installed correctly with StuffIt. My problem is that when I try to open a WMV file, my computer tries to open it with QuickTime and then says that the file type is not recognized by Quicktime. How can I change t

  • Failure, interactive pdf sound function?

    I created book in InDesign CC with sound files attached. The sound feature on my interactive pdf document only works on some of the computers that I sent the document to. Some people get a sound icon which dosen't work, some recieve the file and the