How come this doesn't work?
for (i=0;i!=(row*col);i++){
total+=parseFloat(eval("value"+(i+1)));
trace(total);
trace(parseFloat(eval("value"+(i+1))));
total is a variable from a dynamic text box and the
eval("value"+(i+1)) variables are from input text boxes. The
trace(parseFloat(eval("value"+(i+1)))); displays the values entered
in the input boxes correctly but the trace(total); displays NULL
everytime.
Variables row and col both = 2, and the input text values =
random integer (entered by user).
I'm probably missing something really stupid but i can't see
what is wrong with this.
Ah forget it, i just had to do total = 0; before hand, even
though when i did this without using eval() it worked without
having to be pre defined.
Similar Messages
-
I try to run this but it won't work.
cArray[0].scores[0] = (Double.valueOf(jtfQuiz2.getText())).doubleValue();
I am using 0 for the indexes just to see if I can get something in them. Then I try to see if anything has been put in them by calling :
jtfQuizAvg.setText(String.valueOf(cArray[0].scores[0]));
I declared an array of 50 objects like this.
CIS[] cArray = new CIS[50];
I have a class (CIS) in a package that I have imported. I am trying to get the scores of the individual tests in to the scores[] array found in that class I have imported.
CIS[] cArray = new CIS[50];
Please please help me!Well, you don't say what your problem actually is, other than "it won't work", but one thing you should be aware of is thatCIS[] cArray = new CIS[50]; doesn't create an array of 50 CIS objects. Rather, it creates an array that can REFERENCE 50 CIS objects. You still have to create each object as you need it. So if you are getting a NullPointerException, that's because you needcArray[0] = new CIS(); before you use cArray[0].
HTH
Robin -
How come Safari doesn't work?
Running OS 10.4.7. Go to the Google search field box at the top of Safari. Enter ussr. This will be the first result:
Soviet Union - Wikipedia, the free encyclopedia
The USSR was created and expanded as a union of Soviet republics formed ... Established by four Soviet Socialist Republics, the USSR grew and from 1956 to ...
en.wikipedia.org/wiki/USSR - 127k - Jul 21, 2006 -"
Click on it and Safari just spins a colorful beach ball until it needs to force quit.
I find this beach ball happening more and more. I'm typing this in Firefox 1.5.0.4. And will have to stay with it now.
In having to force quit Safari I lost a huge text reply I was typing in Safari when I did a search for ussr and got frozen out from anything in Safari.
It' can't be that difficult for Apple to fix Safari can it?bzmacmom --
Have you done these?Do you have internet apps SpeedDownload, iGetter, PithHelmet, Acid Search, Safari Enhancer ? Or Norton or Virex? Sometimes non-apple internet apps need updating or uninstalling. If you do, let us know which ones and which version, please.
Have you done these?
1. Empty your cache & History settings via the Safari menu
2. Trash your Icons Folder:
HD>Users>Home>YourName>Library>Safari -->Icons
Restart Safari and a new folder will be automatically regenerated.
(This folder saves favicons of all the sites you visit. Needs cleaning periodically -- or you can change that file's preferences to "Read Only"
rather than "Read & Write." This will keep it from growing in size.)
3. Launch Font Book and check all fonts for duplicates. A duplicated font will have a bullet beside the font family and you can resolve duplicates by selecting the font and at the menu bar, go to Edit > Resolve Duplicates.
Do this for each font with a bullet next to it.
If you're still having problems:
4. Shut down your computer . . . unplug the computer, modem, and router, if you have one. Let everything sit for 2-3 minutes. Plug everything back in, start up your modem & router, then restart your computer.
Let us know, OK? -
How come this does not work?
String str = null, gene="";
int count = 0;
boolean return_proteins=true;
while (((str = in.readLine()) != null) && return_proteins ){
int index = str.indexOf("gi|");
if (index>-1)
count++;
gene = str.substring(index+3);
System.out.println(str.substring(index+3));
//System.out.println(str.substring(str.indexOf("VALIGN=\"TOP\">") + 13));
//index = str.indexOf("(nr-Homo-sapiens)");
//if (index>-1)
//String valign = str.substring(index+17,str.indexOf("</TD>"));
//System.out.println(str.indexOf("</TD>"));
StringTokenizer token = new
StringTokenizer(str,"gi|");
While (token.hasMoreTokens())
String subStr=token.nextToken();
System.out.printIn(token.nextToken+"");
outfile.write(count+":" + gene +": \n");
}Each line of the following part contains errors that shall prevent your code from being compiled:While (token.hasMoreTokens())
String subStr=token.nextToken();
System.out.printIn(token.nextToken+""); -
I Try to open an Indesign document. The message: it is made in a newer version. Go tot CC: Help/Give your Adobe id/Start Indesign again and try to open the document. This doesn’t work. How to solve this problem?
What version are you running?
What version was it made with? -
when I use Mail and want to paste an emailadress with a right mouse click in the adres field this doesn't work, ofcourse cmd V works. How can I solve this
YAY! That did it.
Thank you so much.
And a Very Happy and Prosperous New Year to you!
bonnie -
How can I hide an app from the list of purchased apps using iOS6? With iOS 5 you can swipe the icon to display a red Hide icon, but this doesn't work with iOS 6. Suggestions (that work) will be appreciated.
Yes. On a computer. Not ios6.
On iTunes on your computer under purchased, select the x on the top corner. That will hide them. -
This doesn't work in Windows 8. Anybody know how to get this dialog box in Windows 8?
Hello,
Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
Then perform these steps:
*Click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
*In the Firefox options window click the ''Advanced'' tab, then select "General".
*In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
*Now, restart Firefox and see if the problems persist.
Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
* [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
* [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
Did this fix your problems? Please report back to us!
Thank you. -
My Ipad2 won't turn off. I have tried the reset method by holding both buttons down for at least 10 seconds, but this doesn't work. I can't get onto the internet via wi-fi either (don't have a 3G card fitted). All other functions seem to be working OK including charging. Not had this problem before, but I recently upgraded software to 5.1.1 so is there a bug in there somewhere?
Look at last link.
Look at iOS Troubleshooting Wi-Fi networks and connections http://support.apple.com/kb/TS1398
iPad: Issues connecting to Wi-Fi networks http://support.apple.com/kb/ts3304
iOS: Recommended settings for Wi-Fi routers and access points http://support.apple.com/kb/HT4199
Additional things to try.
Try this first. Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
Change the channel on your wireless router. Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
How to Quickly Fix iPad 3 Wi-Fi Reception Problems
http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
If none of the above suggestions work, look at this link.
iPad Wi-Fi Problems: Comprehensive List of Fixes
http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
Fix iPad Wifi Connection and Signal Issues http://www.youtube.com/watch?v=uwWtIG5jUxE
Unable to Connect After iOS Update - saw this solution on another post.
https://discussions.apple.com/thread/4010130?tstart=60
Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
~~~~~~~~~~~~~~~
If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
Cheers, Tom -
How does this IMPORT statement works
can any one tell me how does this statement will work..
I am wokring on Solution manager system , where in there is a function module SSF_FIELD_LIST
to which system passes form name.
import fields to fieldlist
from database stxfcontr(sf) id l_fullname.
stxfcontr is a table which contains value of in a diff
Regards,
mayankIt will import data object stored in memory under named fields to your custom data object fieldlist .
The table which it is stored is name stxfcontr under RELID (memory area) SF .
Cluster key (key of the entry) in that table is behind var l_fullname
Anyhow I think [this link|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/frameset.htm] is more that any explanation. Once you study it, you will understand the above.
Regards
Marcin -
Confused as to why this doesn't work...
I wrote this code correctly, but it doesn't seem to work. I'm not sure if I'm leaving something out or not using something correctly. If anyone can tell me why this doesn't work, it would be greatly appreciated!
P.S. in the actionPerformed method, I want to put the window to close once someone clicks an "ok" button. How is this done? I've tried using setDefaultCloseOperation(3), but it doesn't seem to work.
peace,
Mark
//?2002 Copyright. MJA Technologies. All Rights Reserved.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class About extends JFrame implements ActionListener
JTextArea textarea;
JPanel panel1;
JButton okbutton;
String output;
public About()
super("Pages");
Container container = getContentPane();
textarea = new JTextArea();
textarea.setText("Pages 1.0 beta 0\n?2002 MJA Technologies.\nAll Rights Reserved.");
container.add(textarea);
setDefaultCloseOperation( 3);
setVisible(true);
setSize(400, 300);
public void actionPerformed(ActionEvent event)
if(event.getSource() == okbutton)Oh see, you said this:
"P.S. in the actionPerformed method, I want to put the window to close once someone clicks an "ok" button. How is this done? I've tried using setDefaultCloseOperation(3), but it doesn't seem to work."
so I said this:
"setVisible(false)"
NOOOOOOOOOOOW you say the TextArea doesn't show up...that's a whole other problem.
Jeeeeeeeeeeeeeeeez.
So what layout manager are you using in the container? (hint hint) -
'this' doesn't work with static main declaration
Hi!
Is it normal that the class instance accessor 'this' doesn't work when using the public static void main method? When yes, can somebody explain why?
Marc
example:
public class JavaTest
static String hello = "Hello world";
public static void main(String args[])
System.out.println("hello before modifying:" + hello);
changeData(hello);
System.out.println("hello afterwards:" + hello);
public static void changeData(String hello)
// here comes the error
this.hello = "Hello Luxembourg";Can you tell me why 'this' does not work here, Dmitri
S.?According to "The Java Language Specification",
"keyword this may be used only in the body of an instance method, instance
initializer or constructor, or in the initializer of an instance variable of a class. If it
appears anywhere else, a compile-time error occurs."
You've tried to use it in static method which may be executed when there is no instances of that class (as it happens in your code) and does not correspond to any particular instance of the class while "this" means "this class instance". -
Hİ
My ipad's screen is black. When it take charge, I can hear sound but still black. I press and hold both the sleep and home buttons for about 10 to 15 seconds but this doesn't work. Screen still black! PLS HELP ME!How long did you let it charge? It may take 30 minutes before the iPad responds when the battery is completely drained. Let it charge for at least 30 minute using the wall charger. Then rest the iPad. Press and hold both the Home button and the Sleep/Wake button continuously until the Apple logo appears. Then release the button and let the device restart. You will not lose data doing this. It's like a computer reboot.
If the iPad restarts let it continue to charge until the battery is 100%.
If the iPad still does not start make an appointment at an Apple Store to have your device examined by a technician. Or contact Apple Support. -
I get an "install failed" message. "Recovery system can't be created—click restart to return to previous version of OS X." This doesn't work. My Mac continues to try to install Mountain Lion. What is the elegant way to get my system back?
The first time I attempted to install ML was on a late 2011 MBP. It ran for three minutes then gave me the error message: Could not install OSX due to an unexpected error. I was using the original ML install app, not a USB or other drive.
After a couple of restarts wiht the same result I saw a message to the effect that the install was trying to close open apps. I closed apps manually a few times to no avail. I shut down instead of restarting then booted into Safe mode (hold down the shift key when starting) and that did it. The install went smoothly after that.
I since installed ML in two iMacs using a cloned copy of the install app on a USB drive. This time I shut down the computers and booted into Safe Mode first and there were no problems.
I don't know if this issue is the one causing you these problems but it is a simple enough solution to try.
Jay -
I transfered my iWork '09 to my new Mac Air. Now my Keynote won't open. I get message, "An unexpected error has occurred, please quit and reopen Keynote." This doesn't work.
so Keynote still isnt working after installing, I thought you had it sorted from your last post.
If you have not done so remove any files relating to iWork and Keynote and reinstall iWork
files that must go are:
the iWork ’09 folder from the main HD > Applications;
the iWork ’09 folder in HD > Library > Application Support
the individual iWork application plist files found in HD > Users > (your account) > Library >
There are a number of free application removal tools that will do this for you:
trashme webpage
apptrap webpage
appcleaner webpage
Maybe you are looking for
-
CFOLDERS - CFX_HISTORY table giving me problems in ABAP
We are going to use CFolders in our environment. I have an issue with the CFX_HISTORY table when I try and use it in a ABAP report. I get the following message when I try and include it in a ABAP program: "CFX_HISTORY" must be a flat structure. Y
-
Trouble with iPod setting screen
Right, Ive got all my music on my 5G 30gb iPod, the problem is, I also have a movie I want to put onto my iPod but Im not having much luck with it. I successfully coded the movie using HandBrake, and its currently under "movies" in my library. Howeve
-
My widgets on my dashboard aren't working. I've tried restarting my computer, and they're still unresponsive. Any solutions?
-
Where can i find this slideshow template?
I've seen this slide show interface on a few different sites: http://downtownrivals.com/store/DeasVail/Shirts/Girls/299 When you click on the images it darkens the screen and then brings up a flash slide show. I'm assuming that this is some sort of t
-
I am OCP forms 6i , pls tell me how long is it valid for ?
I have done OCP in developers track in 2005 for oracle SQL,PLSQL, FORMS 6i and would like to know how long its valid. I mean is there any end date for this certification? Thanks