NotThereAnymore 8 Light Poster

I am running Excel 2007 on Windows 7 Ultimate Edition 64-bit. I was sent a spreadsheet which uses the earlier Excel format (97 to 2003). I can open and edit it fine, but when I save I get a message saying that I am using features which are not compatible with that file format. All I did was bold my font and change its color to navy blue in each cell that I added. I was told to do this in order to distinguish my cells from the cells of my co-workers. I think it's something else though, because I've noticed that some cells will have the cursor start at the top of the cell and others will have the cursor start at the bottom of the cell. I want my text to be at the same alignment for each cell. How can I fix these issues?

NotThereAnymore 8 Light Poster

Since I don't have a way to test out your code right now, I can at least point out one possible issue, and I'm also assuming that by DrawSeed, you meant DrawLeaf. You never end your glBegin(GL_QUADS) statement in your DrawLeaf function. That may cause potential problems if you're trying to draw stuff later. I've seen OGL do some funky things when missing a line like that.

Yeah, I just realized what you pointed out. I'm thinking of doing a loop for the GroworShrink method but I'm not quite sure how to go about it. I'm new to L-systems.

NotThereAnymore 8 Light Poster

i just put java on my computer and how do i know if i did it the right way i go to my control panel and go to advanced and click on the internet that i do have for it to work and its still not working

It depends. Are you talking about the Java Runtime Environment (the program used to open Java files online) or are you talking about the Java Development Kit (used to create Java programs and applets)?

NotThereAnymore 8 Light Poster

I'm working on a project using Lindenmayer systems(http://en.wikipedia.org/wiki/L-system) to simulate the animation of a tree growing. It uses recursion to determine how the branches and leaves of the tree appear. The program uses OpenGL and my programming language is C++.

Here's what I've defined my L-System with:

derivative length: 10 (my seed (called treeSeed) is set to 0 currently so that I could test the base scenarios of my recursions)
F--> G[-F][+F]GF
G --> GG

A few issues:

a) When I only call DrawTwig in DrawTree, the tree displays as it should. However, when I call DrawTree and DrawSeed at the same time, the window itself displays but I lose the rest of my scene. If I call DrawSeed before DrawTree, the sky and horizon display, but the tree trunk itself does not appear. Yet, when I comment out DrawSeed, the tree draws properly. I have a feeling it has to do with my coordinates but I am not sure.

b) I am trying to complete the GroworShrink method. When completed, it will determine whether the tree shrinks or grows during the animation. However, I am not sure how to complete it. I have a for loop there to iterate through the branch points, but I do not know what to add to actually make it grow or shrink.

#include <math.h>
#include <windows.h>
#include <GL/gl.h>
#include <glut.h>

int treeSeed = 0;
float branchAngle = .2618;

//void GroworShrink()
//{
//
//	if(treeSeed …
NotThereAnymore 8 Light Poster

I recently set up a new account with Comcast. I set up the new cable modem I got and it's currently connected to an old laptop I plan to donate to Goodwill. My roommate and I both have laptops equipped with wireless cards and we want to be able to roam around our apartment while using the Internet. The modem does not come with a wireless router so I am looking into getting one. However, from past experience, the modem is connected to the router with an ethernet cable and the router is connected to a computer, generally a desktop. I will not have a third computer for long. Is it possible to have the wireless router be connected to the modem and still share any internet connection?

NotThereAnymore 8 Light Poster

Yeah, I've been doing that, but it doesn't have borders yet. I would put up the code but it has some of my personal information in it. Could you be a bit more specific as to what I should do?

NotThereAnymore 8 Light Poster

So wouldn't it do the same for html? Extract just the text

No. For some reason, when I copy HTML code into the submission, it formats like it should. I do not understand why they don't just open the file after you upload it like everyone else does.

NotThereAnymore 8 Light Poster

...look like a Word Document. I don't mean using one of those proxy sites which covers up sites you're not supposed to be visiting at work. I literally want this to just look like text on a Word Document. Basically, for some weird reason, I am applying for an internship at a company. I uploaded my resume in a .pdf document, but for some reason the styles (WYSIWYG stuff like font styles and all that) disappeared. After some tinkering around I realized that whatever this company uses to submitt applications only extracts the text from the file, not the styles, tabs, and other important things that come with it. So I have had to spend an hour inserting HTML code to format my document again. I am almost done, but I want to insert borders so that it looks something like this:
http://www.jeff-barr.com/wp-content/uploads/2006/12/blank_word_document.png

I just want the borders to provide a page like that.
I already have the text set up and everything, but I need a border for it so that it is easier to read on a page.

NotThereAnymore 8 Light Poster

I am working on modifying a BankAccount class for a project I'm doing. I am almost finished, but I am stuck on my second constructor. If a user has an existing account (i.e if there is an initial balance), then the BankAccount constructor should call a deposit method to allow the user to add some money if he or she wants to. However, the parameter which passes the value to the deposit method is not available for this constructor and I know that I can not simply add that parameter to the BankAccount constructor. Right now, I have decided to use a separate variable for that constructor exclusively, but I am afraid it my break my partner's code. What would be a better way to go about this?

/*
The variable I am using for the called deposit method in 
this constructor.
*/
private double amount;

   /**
      Constructs a bank account with a given balance
      @param anAccountNumber the account number for this account
      @param initialBalance the initial balance
   */
   public BankAccount(int anAccountNumber, double initialBalance)
   {  
	  
	  status= OPEN_ACCOUNT;
	  transactions= new ArrayList<Double>();
      accountNumber = anAccountNumber;
      balance = initialBalance;
      getStatus();
      if(initialBalance >= 0)
      {
    	  deposit(amount);
      }
   }
/**
      Deposits money into the bank account.
      @param amount the amount to deposit
   */
   public void deposit(double amount)
   {  
	   isOpen();
      if(status.equals(OPEN_ACCOUNT) && amount > 0)
      {
    	  double newBalance = balance + amount;
          balance = newBalance;
          addTransaction(amount);
          
      }
	  
   }
NotThereAnymore 8 Light Poster

I've finally got the program working. Thank you for your help. :)

jasimp commented: Thank you for marking your threlad as soved, so many people never do. +8
NotThereAnymore 8 Light Poster

^Note: I fixed my earlier issue with the value not changing. Now, I'm just looking at another bug in my code.

NotThereAnymore 8 Light Poster

^ I did some further debugging. It seems that the previous entered value does not clear when the method I wrote to check if the value is valid. So, if I enter 90, this method will correctly evaluate it as a valid value. However, when I type -10, it still thinks the value is 90, so it always evaluates as true.

NotThereAnymore 8 Light Poster

stultsuke and javaAddict, I tried both of your suggestions. The program is almost working. The sentinel value closes the window and prints the output as it's supposed to. Unfortunately, now it adds any input to the final value, not just valid input (in this case, integers from 0-110). I wanted to maybe have the program check if Q is pressed before parsing the string into double, but I do not know of a method that automatically closes a JOptionPane when it's showing an informativeMessage.

After debugging the program a few times, it seems that when a correct value is evaluated first, then an incorrect one (or the sentinel value), the result is always true. However, when an incorrect value (either a value less than zero or a value greater than 110) is evaluated first. then a correct value, the result is always false. I'm not sure why this is happening, because the method I wrote to check the entered values to see if they're invalid or not worked fine yesterday.

NotThereAnymore 8 Light Poster

^ I ran my program through the Eclipse debugger. It seems that exception was caused because I typed Q first, but my program is expecting a decimal value (since the Input string is parsed to a double variable). However, when I type in values, the loop seems to run fine until I try to exit. When I look at the program in the debugger, it appears to ignore that I typed Q or q. I'm not sure why this is happening.

NotThereAnymore 8 Light Poster

I tried your suggestion. It worked, but unfortunately it triggered a thread exception error. I just want the loop to stop after the user is done, then take the values and do what I want with them afterwards.


Exception in thread "main" java.lang.NumberFormatException: For input string: "q"
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Double.parseDouble(Unknown Source)
at GradeAnalyzerTester.main(GradeAnalyzerTester.java:13)

However, when I type an integer (ex. 90), then the sentinel value (Q or q), the loop does not break. It's trapped in an infinite loop.

NotThereAnymore 8 Light Poster

I am working on an assignment for a class I'm taking. Currently, I have a while loop which takes data from the user through JOptionPane. I am suppose to use a sentinel value (q or Q) to tell the loop to stop. I have my if statement argument working, but I am not sure whether there is a method to turn off JOptionPane. What would be a good way to do this?

/*
Takes user grades until the user types Q.
This loop takes any integer value.
If the user types Q (or q), the loop
stops.
*/
while(!input.equalsIgnoreCase("Q"))
  {
      grader.addGrade(gradeInput);
      JOptionPane.showInputDialog(informativeMessage);	
 }
/*
If the user types Q (or q), the loop
stops. The dialog then disappears.
*/

if(input.equalsIgnoreCase("Q"))
   {
       //JOptionPane closes
          
   }
NotThereAnymore 8 Light Poster

I understand the errors, I'm just not sure how to fix them.

I don't know why neither the main program nor the formTri method in the Trinagle aren't recognizing the constructor. And I'm not sure how to set up the equation in the formTri method so that it makes the final triangle.

NotThereAnymore 8 Light Poster

I'm trying to practice writing a program which creates an object and does various tasks.
So far the tasks I want to program to do are to take a hypothetical triangle (it doesn't draw a literal triangle on the screen; it just shows the number of triangles there, the area of a triangle, and the perimeter of a triangle). I think I've almost removed the errors from the program, but there are three errors that I have to deal with. I'm not sure how to fix them, so any help is appreciated.


error 1:
TriangleMaker.java:7: cannot find symbol
symbol : constructor Triangle()
location: class Triangle
sample= new Triangle();

error 2:
symbol : constructor Triangle(float)
location: class Triangle
Triangle sTriangle= new Triangle(0.0F);

error 3:
Triangle.java:50: setLeg(float,float,float) in Triangle cannot be applied to (float)
sTriangle.setLeg(t.leftLeg+ t.rightLeg+t.baseLeg+t.height);
^

Here is the code I have worked on:

This is the class.

/*
This class demonstrates a class which
creates an object which takes values for the
left, right, and base legs of a triangle along with
the height of a triangle. This class can also
be used to generate the area and perimeter 
of a triangle when used in a program. It must be noted that this does not
literally draw a triangle, so any program which
uses this class does not need the AWP, SWT, or 
Swing toolkits.
*/


public class Triangle
	{
		private
NotThereAnymore 8 Light Poster

I am trying an example from my CS class. We learned recursion recently, and one of the examples I was given was to reverse a given string. The Java program compiles correctly, but when it is actually executed, instead of getting the intended result, I get this as my outcome.

at RevString.reverse(RevString.java:16)

This repeats itself until the program ends.

Here is the source code.

//demonstrate recursion by reversing a string of characters

public class RevString
	{
		public static void main(String[] args)
			{
				String s= "abcd";// the given string
				System.out.println(reverse(s));//shows the result of reversing the    string

			}
/*
//The reverse method takes a string variable as a parameter.
//It then takes the first character of a string and
//attaches it to the end of the string.
*/
				
		public static String reverse(String s)
			{
				if(s.length()==1)
					return s; //returns the original string only if it is one character
				
				else
					reverse(s.substring(1) + s.charAt(0));//calls the reverse method to take the first character and reverse it
					return s;
			}
	}

What am I doing wrong?

NotThereAnymore 8 Light Poster

I'm trying to help my brother out with his computer. Recently, he put in a Creative SB Audigy 2 Card in a HP Pavilion m7640n Media Center PC. It worked fine for a few weeks, but then it suddenly stopped working. He switched to the onboard Realtek HD Audio sound card and that worked fine until two days ago. He uninstalled the Audigy 2 drivers after some trouble, then he tried this solution (http://tinyurl.com/2u738g). It seemed to work, but he does not get sound from his computer despite having the volume turned all the way and having the speakers properly connected. We're not sure what the problem is, so any help would be much appreciated.

NotThereAnymore 8 Light Poster

It's not finished. I have the code for the gallows whenever the player guesses wrong, but I have not put it in the program yet because I'm trying to let the program check a player's guess and return a response. I also haven't put in an if statement for when the player guesses wrong for that reason.

With the correctLetters array, I am trying to have the CharacterCheck method return the correctLetters array to the main method so that the program will know if the player's guess is correct or not.

NotThereAnymore 8 Light Poster
import java.util.Scanner;
import java.util.Random;

public class Hangman
{
  public static void main (String[] args)
     {
     char userAnswer;    
    String[] dictionary = { "acorn", "actor", "album", "alien",
     "bagel", "basin", "beach", "brick",
     "cable", "chalk", "cloud", "crowd",
     "debug", "ditch", "drill", "drink",
     "eagle", "eight", "elbow", "extra",
     "fable", "feast", "fizzy", "flood",
     "giant", "glass", "gross", "grump",
     "happy", "hoist", "hover", "humor",
     "icing", "ideal", "igloo", "itchy",
     "joker", "jolly", "juice", "jumbo",
     "knack", "knead", "knife", "knock",
     "ledge", "lemon", "lever", "llama",
     "macho", "mango", "meter", "mouth",
     "nasty", "ninja", "noise", "nudge",
     "oasis", "offer", "olive", "organ",
     "paint", "party", "paste", "pizza",
     "quack", "quail", "queen", "quirk",
     "radio", "relax", "rhyme", "rival",
     "smoke", "snail", "space", "syrup",
     "table", "throw", "train", "tulip",
     "ulcer", "union", "unite", "untie",
     "valid", "video", "viper", "vowel",
     "wagon", "water", "weird", "write",
     "yeast", "young", "yours", "yummy",
     "zesty", "zippy", "zoned"};
    
    Random index= new Random();
         
         System.out.print("Welcome to CS7 Hangman! \n");
         System.out.println("Try to guess" + " the word " +
                            "one letter " + "at a time.");
         System.out.println("You are allowed 6 misses.");
         System.out.println(" _____");
         System.out.println("|    |");
         System.out.println("|");
         System.out.println("|");
         System.out.println("|");
         System.out.println("|");
         System.out.println("|");
         System.out.println("|");
         System.out.println("|_______");
         
         String hidden_word;
    
    hidden_word= dictionary[index.nextInt(dictionary.length)].toLowerCase();
    for (int line=0; line < hidden_word.length(); line++)
        {
             System.out.print("_ ");
        }
    
    Scanner keyboard= new Scanner(System.in);
    userAnswer= keyboard.nextLine().toLowerCase().charAt(0);
         
         
     }
  
  public static char[] CharacterCheck(char userAnswer, String[] dictionary, String hidden_word)
     {
       char[] correctLetters;
       //int mistakeCounter;
       String answer_check; 
       answer_check= correctLetters.charAt();
       
       for(int i= 0; i < hidden_word.length; i++)
       {
         if(hidden_word.charAt(i)== userAnswer)
         {
           correctLetters[i]=userAnswer;
         }
         
       }
       
       return correctLetters;
     }
}

I am trying to write a simple Hangman game for some practice. Currently, the program can display the hangman gallow's and the hidden word dashes through the use of a …

NotThereAnymore 8 Light Poster

Thank you so much! I tried pushing it in at a slight angle and it worked. It's a little crooked, but it works. :)

NotThereAnymore 8 Light Poster

The membrane is in place too. I just need to put the key itself back on.

NotThereAnymore 8 Light Poster

I can't remove the case; I do not have a screwdriver & I'm in a college dorm with three people & a carpet floor. Can I fix it without taking the case off? I know the plastic white hinge is still on the back of the key.

NotThereAnymore 8 Light Poster

I have a Gateway MP6954 Platinum Edition laptop. In a rush to go to the bathroom, I dropped my book on the keyboard. The "a" key fell out & I have been struggling to put it back in. How can I put my "a" key back?

NotThereAnymore 8 Light Poster

Try reinstalling the soundcarddrivers after you've done the windowsupdates.

So if I have a Gatway laptop, how can I reinstall the drivers?

NotThereAnymore 8 Light Poster

Hi, I'm DaMoogle and I'm here with an odd problem. Today, Windows Update got some updates for Excel 2003, IE7, and Outlook. I've tried to download them multiple times, but they will not install properly. In fact, when I clicked install, the yellow icon disappeared from the taskbar (i.e it did not hide itself), but the computer appeared normal until I clicked on volume control. Then, I got a message saying "There are no active mixer devices available." I got this message in the past, so I simply restarted the computer. Everything worked fine, but somehow Windows XP forgot that I already tried to install the updates. So I tried two more times, but on the third time something really weird happened. I went through the usual steps(install, wait, check volume control), but this time I was on Youtube while using Firefox. I wanted to adjust the volume settings, so I went to Volume Control and got the "no active mixer devices" message, yet my laptop volume settings worked (i.e the external volume buttons on the keyboard) and I still got sound from the sound card. This has never happened to me before. So, how can I install the updates without messing up Volume Control?

NotThereAnymore 8 Light Poster

Are you wiping the drive (or partition) and doing a fresh install or are you trying to write over the old Windows installation?

Here's what happened. I tried to fix the MBR to get Windows XP back by putting in my Windows XP SP1 CD and going into the Recovery Console. It fixed the base files, but I needed to log in order to run the fixmbr command. However, I did not remember the administrator's password and my user name and password (despite having full administrator access) could not be used to log in. So, I tried using the suggestion in this link to regain access, but when I restarted the computer and took out the CD, GRUB blocked it from finishing the install. That led to me using GAG to get access to my hard drive and finish the installation. So I guess that the drive was trying a fresh install, but I'm not sure.

NotThereAnymore 8 Light Poster

Im guessing you could copy the contents of the cd and add that file and reburn it. Also is the _ in the filename on the cd?

On the CD, _ is in the file type when I check properties, so I think the full filename is LICWMI.dl_

NotThereAnymore 8 Light Poster

Recently, I messed up my MBR on a dual-boot computer with Windows XP SP1 on the primary drive and Kubuntu Dapper Drake (v. 6.06) on the second drive. After some trouble, I eventually searched around and decided to use the GAG Boot Manager to get access to Windows XP. After I was able to access the drive, I decided to continue to reinstall my system. Everything went smoothly until Windows XP started to copy the necessary files to the hard drive. At that point, I got this error message:
Copy Error
Setup cannot copy the file licwmi.dl_

I clicked on Browse and the file appeared to be on the CD, but the installer does not recognize it. Would it be possible for me to get a copy of that file, put it on CD or a USB drive, and let the installer use that file instead?

NotThereAnymore 8 Light Poster

My adapter is keyed so I can not plug it in backwards. I Believe though, that pin one does go towards the jumpers.

DaMoogle - How old is your laptop? Is it under warrenty? My thinking would be to send it back to them and see if they could do it. Unfortunatly if it's not it would probably cost a lot of money. Even if they did restore windows, I highly doubt that they would get your data of your hard drive which still leaves you with a problem.

I remember getting my laptop near the end of August in 2004. I would send it back to Compaq, but from what I have seen from their prices, it would cost just as much to fix it as it would to pay for a new one. I'm thinking of perhaps sending it to CompUSA, but I don't know if their services would fix a laptop and manage to save its data.

NotThereAnymore 8 Light Poster

How much computer experience do you have? When I get a laptop in my shop I usually take the hard drive out and use a special plug I have that allows me to plug the hard drive into my desktop computer and retrieve the data. Unfortunatly, If you do not have much experience with computers or laptops it's kind of out of the picture for now. The other option would be to download a copy of Knoppix (free Linux live on cd), burn it on a cd, and put it in your cd rom drive. Then boot the machine and you should be able to see any files on your hard drive and possibly back them up to a thumbdrive or some other means of media. It could also be that you corrupted a file when you removed the virtual CD drive Daemon Tools, Can you boot the laptop into safe mode? To do this, turn the machine completly off, turn it back on, at the windows xp screen press the F8 button. There is also an option to "restore windows to the last known working configuration" which would restore windows to the last configuration that worked. These are the only options I can think of right now short of doing a full reload/restore of windows. Good Luck.

I remembered that I had a copy of Knoppix (v. 3.6) in my CD book and I decided to use it in an attempt to get access to my hard drive. Unfortunately, …

NotThereAnymore 8 Light Poster

Since yesterday, I have been having some serious problems with my Compaq Presario 2100 laptop (AMD Athlon XP version). Whenever I used this laptop it would run fine for about thirty minutes, then it would display the Blue Screen of Death with a message mentioning the atapi.sys driver. At first, I thought it was a virus but the virus scanners I have did not come up with any viruses. I ran sfc/scannow to see if there were any corrupted files in the system, but it turned up with no response of any problems. Then, I uninstalled a virtual CD driver program called Daemon Tools as a suggestion from a friend of mine. This temporarily solved the problem, but when I turned on my laptop today, it could not load into Windows (Windows XP Home Edition SP2). Instead, it now shows the usual loading screen, then it displays the Blue Screen of Death with a new message which I can not read because it quickly flashes off to reboot the laptop again. I do not know what is causing this and I am afraid to reformat my hard drive because I have some important documents on my laptop. If anyone could help me, it would be much appreciated.