f



javascript

Hi all 
I wounder if some one can help me i have to write a program that sums
numbe3rs together using a for loop.
The numbers are 1 to 10 then one to 20 then 1 to 10,000.

// A program for summing numbers from one to biggestNumber

Var biggestNumber;
Var theSum = 0;

its got to start like this. Im having problems with this one
viicki

-- 
v davies

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-tools/200512/1
0
vicki
12/16/2005 11:27:29 AM
comp.lang.java.softwaretools 2938 articles. 1 followers. Post Follow

1 Replies
1090 Views

Similar Articles

[PageSpeed] 54

On Fri, 16 Dec 2005 11:27:29 GMT, "vicki via JavaKB.com" <u16404@uwe>
wrote, quoted or indirectly quoted someone who said :

>// A program for summing numbers from one to biggestNumber
>
>Var biggestNumber;
>Var theSum = 0;
>
>its got to start like this. Im having problems with this one
>viicki

see http://mindprod.com/jgloss/javasript.html
-- 
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
0
12/16/2005 12:31:39 PM
Reply:

Similar Artilces:

java.lang.Set with elements of type java.lang.Set
Roughly I do something along the lines of: Set set = new HashSet(); Set elem = new HashSet(); set.add(elem); // now we change the elem and add it again to the set elem.add(some object here); set.add(elem); I found out the hard way that 'set' may now contain 'elem' either once or twice, the reason being that 'elem.add()' changes the hashCode of elem such that it is not noticed that it is in 'set' already on the 2nd 'set.add()'. Question: What I would actually want is an IdentityHashSet() set = new IdentityHashSet() but this does not...

Error occurred during intialization of VM java/lang/NoClassDefFoundError: java/lang/Object
Good day to all, I have installed the j2se/netbeans binary bundle on red hat 9. I can run everything perfectly as root but when I try to compile with any other user I get: Error occurred during intialization of VM java/lang/NoClassDefFoundError: java/lang/Object When I saw this it seemed like a permissions problem but I checked the permissions and everything seemed fine. All users have execute permissions of javac and java. I have read other threads dealing with the same or similar problem but have not reached any solution yet. I would appreciate if anyone that has run into this type of problem and has solved it if he/she could give me a hand or if anyone could just point out what I should be looking for in this type of problem. Thanks in advance... gek ...

CheckBox in Column of JTable: Exception: java.lang.String cannot be cast to java.lang.Boolean
Hello, I have discovered a hidden error. My project was working for awhile, but then I started to get the below error. My error comes from the fact that I'm using a checkbox in a jtable, and I'm using the below "getColumnClass". Thank you, compile: run: Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at javax.swing.JTable$BooleanRenderer.getTableCellRendererComponent(JTable.java:5412) at javax.swing.JTable.prepareRenderer(JTable.java:5735) at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2114) at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:2016) at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1812) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at javax.swing.JComponent.paintComponent(JComponent.java:778) at javax.swing.JComponent.paint(JComponent.java:1054) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5221) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1482) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1413) at javax.swing.RepaintManager.paint(RepaintManager.java:1206) at javax.swing.JComponent._paintImmediately(JComponent.java:5169) at javax.swing.JComponent.paintImmediately(JComponent.java:4980) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:770) at javax.swing.RepaintM...

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object (ant/tomcat/spring)
Hi, I've been trying to get Spring working with ant and tomcat. Ant was building just fine, but I came in today and tried to build it and got this: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object ?!?! Makes no sense to me. There _is_ an older version of java installed on my machine; but JAVA_HOME and ANT_HOME are set to the correct paths, and <which java>and <java -version> produce the correct version. Any help would greatly alleviate my frustration! Thanks in advance... Courtney ...

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object (ant/tomcat/spring)
Hi, I've been trying to get Spring working with ant and tomcat. Ant was building just fine, but I came in today and tried to build it and got this: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object ?!?! Makes no sense to me. There _is_ an older version of java installed on my machine; but JAVA_HOME and ANT_HOME are set to the correct paths, and <which java>and <java -version> produce the correct version. Any help would greatly alleviate my frustration! Thanks in advance... Courtney ...

java.lang vs java.util
Surprising to see something defined in java.lang <http://developer.android.com/reference/java/lang/Iterable.html> depend on something defined in java.util <http://developer.android.com/reference/java/util/Iterator.html>. Surely the hierarchy should go the other way? On 4/1/2011 9:11 PM, Lawrence D'Oliveiro wrote: > Surprising to see something defined in java.lang > <http://developer.android.com/reference/java/lang/Iterable.html> depend on > something defined in java.util > <http://developer.android.com/reference/java/util/Iterator.html>. > > Surely the hierarchy should go the other way? I think Iterable may make it into java.lang because of its significance in the foreach statement. Patricia On 04/02/2011 12:23 AM, Patricia Shanahan wrote: > On 4/1/2011 9:11 PM, Lawrence D'Oliveiro wrote: >> Surprising to see something defined in java.lang >> <http://developer.android.com/reference/java/lang/Iterable.html> depend on >> something defined in java.util >> <http://developer.android.com/reference/java/util/Iterator.html>. >> >> Surely the hierarchy should go the other way? Not if it wants to be consistent with http://download.oracle.com/javase/6/docs/api/ don't'cha think? And the so-called "hierarchy" of java.util and java.lang is that they are equal. The language reserves for itself the entire panoply of java.* and javax.* packages. > I think It...

Poll: Is a Java Method an Instance of the Java Class java.lang.reflect.Method? Please reply with YES or NO.
Hi, Poll: Is a Java Method an Instance of the Java Class java.lang.reflect.Method? Please put YES or NO as the first word in your reply. Add comments after it if you wish. I'll make a YES/NO count after some time. Kind regards, Paka Paka Small wrote: > Poll: Is a Java Method an Instance of the Java Class > java.lang.reflect.Method? It's not subject to vote. It's defined by the language. You might as well ask, "Is 'int' a primitive or a reference type?". Your vote will not change reality. > Please put YES or NO as the first word in your reply. Add comments > after it if you wish. > > I'll make a YES/NO count after some time. And what exactly do you hope to accomplish by this exercise? Distinguish who knows Java from those who don't? A method is not a class, and a class is not a method. That's reality in Java. The law of gravity is not subject to repeal by opinion, and neither is this. Instead of wasting your time and trying to waste ours conducting meaningless polls, why don't you read the material linked upthread and learn the truth for yourself? Learn the truth and it will set you free, or at least keep you from making errors like claiming that methods and classes are the same in Java. -- Lew On 5 feb, 20:38, Lew <lewbl...@gmail.com> wrote: > Paka Small wrote: > > Poll: Is a Java Method an Instance of the Java Class > > java.lang.reflect.Method? > > It's not sub...

java.io.File to java.lang.String
What's the best way to get the contents of a file represented by ajava.io.File object into a String? Benjamin wrote:> What's the best way to get the contents of a file represented by a> java.io.File object into a String?> You don't specify what you consider best so how about simple as best? Now for my curiosity, why would you want to do this?import java.io.*;public class test { public static void main(String[] args) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); File f = new File(args[0]); FileInputStream fis = new ...

java.lang.IllegalStateException: No Java compiler available
tearing my hair out on this one.Thuis started as an upgrade issue till i realised that my un-usedtomcat5 installation didn't work either with my test jsp.I have, in desparation, un-installed all java / tomcat libs and re-installed only those required to get thetomcat6-6.0.14-1jpp.noarch.rpm (and the band-waggon) loadedfirst I installed java_app_platform_sdk-5_02-linux.binthis shows (after I set alternatives to point to the /opt/SDK/jdkdirecrtory)[root@squirrel ~]# javac -versionjavac 1.6.0java shows the same.I have set the following in profileCLASSPATH=$JDKHOME:$JDKHOME/lib/tools.jarJAVA_H...

java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
Hi, Can anyone help me for this exception which I am getting whil trying to conenct to MYSQL server thru TOMCAT. Thanks Maneesh org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver', cause: java.lang.NoClassDefFoundError: org/aspectj/lang/Signature at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) at foo.DBTest.init(DBTest.java:23) at org.apache.jsp.test_jsp._jspService(test_jsp.java:51) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache...

java.lang.UnsatisfiedLinkError: no lsxbe in java.library.path
Hello i got following exception: java.lang.UnsatisfiedLinkError: no lsxbe in java.library.path My source code looks like the examples of the Notes homepage. import lotus.domino.*; public class Main extends NotesThread{ public static void main(String argv[]){ System.err.println(System.getProperty("java.library.path")); // System.load("C:/Programme/lotus/notes/lsxbe.dll"); Main t = new Main(); t.start(); } public void runNotes(){ try{ Session s = NotesFactory.createSession("localhost&qu...

How to define java.lang.Object using java IDL
Hi all, I have a function like: boolean method(java.lang.Object param). How can I define this using java IDL? In another words, I need to pass an instance of java.lang.Object from Client to Server using CORBA. Is this possible? I would be nice simply to typecast the Object at Server-side into whatever needed. How about without typecasts, is this possible in any way, for example using a helper function like: java.lang.Object anyToJavaLangObject(Any value) Code examples ?!? Thanks in advance Juha Rossi ...

Java in JavaScript
I want to use an HTML form incorporating JavaScript and also a Java applet. My idea is to have text entered in a webform, captured by the JS and then a Java applet called with the form text as the input argument. The applet will then manipulate the text and return a string back to JS for additional processing before being submitted as web form mail. I know how to invoke the applet from JS with input text: document.myApplet.newText(tempText) // invokes method in Java class and in the Java class: public void newText(String s) { this.whatToSay = s; etc. } but what I don't know how to...

Javascript or Java ?
I have done one Javascript project. It ended up with 1000 lines of code. The next one will be 10-20 times as big and my question is whether I should switch to Java. I have always programmed in Pascal, the last 10 years using Delphi. (And I will stick with that for non-web based applications.) What I missed most in the Javascript project was a good development environment with integrated debugger. So, an important part of the question about Javascript/Java is about the ease of development when the project gets bigger. Is there a good environment for Javascript? And what other considerat...

Navigate between Sibling Java Methods of java.lang.Object on OO Tumia
Hi, Your are kindly invited to check out the scenario "Navigate between Sibling Java Methods of java.lang.Object": 1. The user surfs to for example java.lang.Object.equals(java.lang.Object): http://www.tumia.org/en/directory/en/java.lang.object.equals%28java.lang.object%29_p1.html 2. The user selects some external links about java.lang.Object.equals(java.lang.Object). 3. The user selects a Related Instance (for example java.lang.Object.getClass()) that as a Sibling of java.lang.Object.equals(java.lang.Object) is a method of java.lang.Object. 4. The system displays http://www.tumia.org/en/directory/en/java.lang.object.getclass%28%29_p1.html 5. The user selects some external links about java.lang.Object.getClass(). The user repeats steps 3-5 for other sibling java methods until done. On the object-oriented directory Tumia "Navigate between Sibling Java Methods of java.lang.Object" is a specific scenario of the use case "Navigate to Related Tumia Instances". In fact this sibling relationship between the concerned java methods is automatically derived from the link "of java.lang.Object" those java methods have in common. By the way troughout Tumia these kind of sibling relationships derived from a common link are being automatically realised and presented to the user for navigating. Sibling Energy Instances that Mitigate Earth Global Warming 2000 AD are a similar example: http://www.tumia.org/en/directory/en/nuclear_energy_p1.html Kind...

Navigate between Sibling Java Methods of java.lang.Object on OO Tumia
Hi, Your are kindly invited to check out the scenario "Navigate between Sibling Java Methods of java.lang.Object": 1. The user surfs to for example java.lang.Object.equals(java.lang.Object): http://www.tumia.org/en/directory/en/java.lang.object.equals%28java.lang.object%29_p1.html 2. The user selects some external links about java.lang.Object.equals(java.lang.Object). 3. The user selects a Related Instance (for example java.lang.Object.getClass()) that as a Sibling of java.lang.Object.equals(java.lang.Object) is a method of java.lang.Object. 4. The system displays http://www.tumia.org/en/directory/en/java.lang.object.getclass%28%29_p1.html 5. The user selects some external links about java.lang.Object.getClass(). The user repeats steps 3-5 for other sibling java methods until done. On the object-oriented directory Tumia "Navigate between Sibling Java Methods of java.lang.Object" is a specific scenario of the use case "Navigate to Related Tumia Instances". In fact this sibling relationship between the concerned java methods is automatically derived from the link "of java.lang.Object" those java methods have in common. By the way troughout Tumia these kind of sibling relationships derived from a common link are being automatically realised and presented to the user for navigating. Sibling Energy Instances that Mitigate Earth Global Warming 2000 AD are a similar example: http://www.tumia.org/en/directory/en/nuclear_energy_p1.html Kind...

warning: [deprecation] in java.util.Date(java.lang.String) has been deprecated
Dear Java Programmers, When compiling my Java program I get the following warning: "warning: [deprecation] in java.util.Date(java.lang.String) has been deprecated" on for example this statement: new Date("09/23/2003") The code is used to generate the dates on a webpage. Depending on the language of the webpage the generated format is different. For example English (see "Date" and "Choose publication" on the page opened): http://home.scarlet.be/kenya-belgium/list_5_en/a_kenyan_birthday_party_and_a_belgian_birthday_party.html French: http://home.scarlet....

Instance java.lang.Object.getClass() of Class Java Method on OO Tumia
Hi, You are kindly invited to check out the Instance java.lang.Object.getClass() of Class Java Method on the object oriented directory Tumia: http://www.tumia.org/en/directory/en/java.lang.object.getclass%28%29_p1.html - Click some java.lang.Object.getClass() links or in the upper toolbar: - click the "-->"-button for the following java.lang.Object.getClass() links or - use the Tumia Instance combobox to select another Instance or - use the Tumia Class combobox to select another Class or - use the Relat. Instan. combobox to select a Related Instance. Kind regards, Paka Small ...

Instance java.lang.Object.getClass() of Class Java Method on OO Tumia
Hi, You are kindly invited to check out the Instance java.lang.Object.getClass() of Class Java Method on the object oriented directory Tumia: http://www.tumia.org/en/directory/en/java.lang.object.getclass%28%29_p1.html - Click some java.lang.Object.getClass() links or in the upper toolbar: - click the "-->"-button for the following java.lang.Object.getClass() links or - use the Tumia Instance combobox to select another Instance or - use the Tumia Class combobox to select another Class or - use the Relat. Instan. combobox to select a Related Instance. Kind regards, Paka Small ...

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
Hello all, how is everyone doing; good I hope. Anyways, I was wondering how I can edit the jvm settings. I have the following error: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space I read that this is caused by not having the jvm set high enough in memory; or an infinite loop. If I try to edit the jvm settings; do I do this in eclipse or add some commands to my actually code? Any thoughs, always apprecited thanks again. "Michael" <mbialowas@shaw.ca> wrote in message news:TtWZf.8710$nf7.4484@pd7tw1no... > Hello all, how is everyone doing; good I hope. Anyways, I was wondering how > I can edit the jvm settings. I have the following error: > Exception in thread "main" java.lang.OutOfMemoryError: Java heap space > > I read that this is caused by not having the jvm set high enough in memory; > or an infinite loop. > > If I try to edit the jvm settings; do I do this in eclipse or add some > commands to my actually code? > > Any thoughs, always apprecited thanks again. Hi, If you're using Eclipse, try adding the following: choose the menu option "run", the "run" again, and you get an option screen. There, you choose "new" to define a new configuration for your current project. As soon as you have done that (or select an existing project), there are several tabs on the right. One of them reads "(x)= Arguments". Select that one, and add th...

java.lang.NullPointerException at com.sun.kvem.midp.MIDP.run(MIDP.java:651)
Hi Friends, Does any one has any idea about the following StackTrace. I am using CLDC1.1 and MIDP2.0 with Sun Java Studio Mobility. Any help will be highly appreciated. java.lang.NullPointerException at com.sun.kvem.midp.MIDP.run(MIDP.java:651) at com.sun.kvem.environment.EmulatorInvoker.runEmulatorImpl(EmulatorInvoker.java:116) at com.sun.kvem.environment.EmulatorInvoker.runEmulatorSameVM(EmulatorInvoker.java:105) at com.sun.kvem.environment.EmulatorInvoker.runEmulator(EmulatorInvoker.java:63) at com.sun.kvem.environment.ProfileEnvironment$KVMThread.runEmulator (ProfileEnvironment.java:240) at com.sun.kvem.environment.ProfileEnvironment$KVMThread.run(ProfileEnvironment.java:262) Greetings, -- ...

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
I'm using matlab 7.9.0 and I got this error: Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space how can I solve this error? I create a file C:\Program Files\MATLAB\R2009b\bin\win32 with the name java.opts with -Xmx2024m and I got the same error "Norberto Barroca" <norberto.barroca@hotmail.com> wrote in message <hh5gga$nc8$1@fred.mathworks.com>... > I'm using matlab 7.9.0 and I got this error: > Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space > > how ...

SGI Java issue "Exception in thread "main" java.lang.UnsatisfiedLinkError: poll0"
Hello all; I'm trying to debug an issue with a java script called, SelectSockets. It appears to be a fairly common one found on the web. I downloaded the SGI Java v1.4.1 installation from SGI's webpage and installed it using SGI's swmgr application. The installation was very straight forward and there were no errors when I installed the package. Then I ran /usr/java2/bin/javac SelectSockets.java to make the SelectSockets.class file. Then I ran /usr/java2/bin/java SelectSockets, and got the following error message: =================================================...

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space #3
2007a, student version on windoz XP SP2. I use GUIDE, and after sometime of using it, I notice it gets sluggish in its response to editing and I see the following Java errors on the console: "Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space" I am not sure why it runs out of RAM so fast. as I have 4 GB of physical RAM. I did a google on the above and I see that others have seen this. I wonder if there is any update on this problem that someone from Mathworks or others can comment on. Is this still a problem in later Matlab releases...

java.lang.ClassCastException
Hi all, inside one of my Class i've method which make this operation: ...... Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress(new URL("http://localhost:8080/axis/services/")); call.setOperationName(new QName("urn:SalutoWS", "saluto")); Object rispostaWS = call.invoke(new Object[]{"sum"}); array = (ArrayList)rispostaWS; ........ When is doing this, it's return the follow exeption: java.lang.ClassCastException At the line (array = (ArrayList)rispostaWS;). How can be possible that the line can't make the cast betwee...

Web resources about - javascript - comp.lang.java.softwaretools

JavaScript Kit- Your comprehensive JavaScript, DHTML, CSS, and Ajax stop
Your comprehensive JavaScript, DHTML, CSS, and Ajax stop

Let's Code: Test-Driven Javascript by James Shore — Kickstarter
James Shore is raising funds for Let's Code: Test-Driven Javascript on Kickstarter! A screencast series focusing on rigorous, professional Javascript ...

Eloquent JavaScript: A Modern Introduction to Programming
... and pragmatics. I loved the tutorial-style game-like program development. This book rekindled my earliest joys of programming. Plus, JavaScript! ...

Lightbox (JavaScript) - Wikipedia, the free encyclopedia
On a Lightbox-enabled page, a user can click an image to have it magnified in a Lightbox window, which resizes itself according to the size of ...

Open Directory - Computers: Programming: Languages: JavaScript: Tools: Obfuscators
about dmoz - help Top : Computers : Programming : Languages : JavaScript : Tools : Obfuscators Tools for obfuscation/compression JavaScript code. ...

Facebook Open-Sources JavaScript Static-Type Checker Flow
The latest software to be open-sourced by Facebook is Flow , a static-type checker for JavaScript . (more…) New Career Opportunities Daily: ...

Under the Hood: The JavaScript SDK - The use of polyfills - Facebook
Facebook Engineering hat eine Notiz mit dem Titel Under the Hood: The JavaScript SDK - The use of polyfills geschrieben. Du kannst den vollständigen ...

Quickstart: Facebook SDK for JavaScript
This quickstart will show you how to setup the SDK, load social plugins, trigger a dialog, and get it to make some basic Graph API calls.

Facebook App Devs Get Javascript
It has been an oft-lamented fact of the Facebook Platform thus far in its life that, in order to use all but the most simple of Javascript functionality–the ...

Badass JavaScript (@badass_js) on Twitter
WebGLWorker is an open source library that allows using WebGL from Web Workers. Great work as always from @kripken . blog.mozilla.org/research/2014/… ...

Resources last updated: 3/23/2016 1:12:58 AM