Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 2993 points

Destroyer of Worlds

Favorite Answers20%
Answers199
  • CSS: combobox entry text color?

    I have a gtk3 theme created by malys from gnome-look.org. I do not know CSS and I would like to use it with a white text color for combo box entries. I seem to have found the CSS file that controls the color and I uploaded it here:

    http://pastebin.com/Q79iYgcE

    Could somebody list the alteration that needs to be made, make another entry on pastebin, or upload the edited file so that I could make the text white? I know I am asking a lot, but I do not have the slightest clue how CSS works.

    PS: This file is slightly edited. I tried to change a few things myself and it did not go well.

    post PS: This is definitely not the type of question where an answer will go unrewarded. It is a difficult task and 10 points will be awarded to the person able to fix the issue.

    2 AnswersProgramming & Design9 years ago
  • C++ function not returning properly?

    I am setting up the basis for a small game with interactable items (text based), but I cannot get a function to return properly. I want it to return statistics from struct wood as well as Item which it inherits from. This is the function in question.

    /**

    *Returns information regarding the status of the wood.

    *@param the wood to retrieve.

    *@return A string representing the stats.

    */

    string getStats(wood toGet)

    {

    string toReturn;

    //Substruct specific variables.

    toReturn+="Type: ";

    toReturn+=toGet.type;

    toReturn+="\nAge: ";

    toReturn+=toGet.age;

    //Superstruct variables.

    toReturn+="\nHeight: ";

    toReturn+=toGet.height;

    toReturn+="\nWidth: ";

    toReturn+=toGet.width;

    toReturn+="\nWeight: ";

    toReturn+=toGet.weight;

    toReturn+="\nGeneric name: ";

    toReturn+=toGet.name;

    toReturn+="\nState of Matter: ";

    toReturn+=toGet.stateOfMatter;

    toReturn+="\nFlammable: ";

    toReturn+=toGet.flammable;

    toReturn+="\n";

    return toReturn;

    }

    And this is what it returns:

    Type: Birch

    Age:

    Height:

    Width: 

    Weight: d

    Generic name:

    State of Matter: solid

    Flammable: 

    The full source is here: http://pastebin.com/UawrwYj7

    I know I am not doing this in the most efficiant way. I want to make an array of property names for getStats to process in a for loop. However, I would like to know why this is not working.

    1 AnswerProgramming & Design9 years ago
  • Pointers in C++. Seem to not grasp the concept.?

    I have been teaching myself C++ and am struggling with pointers. I understand the concepts okay. & means the address of, and * means the value of. I am trying to make a simple function to swap the value of two integers using pointers. The code is listed below with comments describing what I think should happen.

    #include <cstdlib>

    #include <iostream>

    using namespace std;

    void swap(int num1, int num2)

    {

    int*pointer1;//Declaration

    int*pointer2;//Declaration

    pointer1=&num1;//Assignment of the address of num1 to pointer1

    pointer2=&num2;//Assignment of the address of num2 to pointer 2

    int placeHolder=num1;//Initialization of placeHolder to the value of num1.

    pointer1=pointer2;//The copying of the memory address of pointer 2 into pointer1. This should change the values.

    pointer2=&placeHolder;//The copying of the memory address of placeHolder into pointer two. Placeholder is num1 that SHOULD have already been overwritten.

    }

    int main() {

    int a=2;//Dec&init

    int b=3;//Dec&init

    swap(a, b);//The two values should be swapped.

    cout << "A: "<< a<< " B: "<<b<<endl;//This should output A: 3 B: 2

    return 0;

    }

    The output of the program is exactly the opposite of what I think it should be.:

    A: 2 B: 3

    I have consulted multiple online resources about pointers, but I still have no clue why this is working. Can someone explain where I went wrong and why. I need to understand pointers to be able to progress in C++.

    3 AnswersProgramming & Design9 years ago
  • Beginners C++ question. Trash characters are being returned.?

    I have just started learning C++ this week and I am still incredibly new. I am trying to rewrite one of my functions that I made in Java, but it is outputting a few unwanted characters every time I run it. The characters vary, but here is sample output: (It should output acbe) acbe�

    I could use substring to weed it out, but I would prefer knowing how to prevent it. Here is the code.

    I have a function called condenseArray that just adds the characters in a character array to a string, then output the string.This is the code to the function condenseArray:

    string condenseArray(char array[])

    {

    int index=0;

    string condensed="";

    while(index<arrayLength(array))

    {

    condensed+=array[index];

    index++;

    }

    return condensed;

    }

    Here is the code for main, where the extra characters are output:

    int main() {

    char array[] = {'a', 'c', 'b', 'e' };

    cout << condenseArray(array)<<endl;

    //cout << subString("DebugTesting", 1, 3);

    return 0;

    }

    However, the most peculiar thing happens. See the commented code in main: "//cout << subString("DebugTesting", 1, 3);"? When I uncomment that, the letters from above do not appear. Does this have something to do with memory? Below is some information in case it is relevant. Like I mentioned, I am still new so I do not know what will be helpful.

    Yes, it is using namespace std.

    I have iostream included.

    My compiler is g++

    I made this in eclipse IDE, but copied it over into emacs and compiled it there and still got the same errors.

    2 AnswersProgramming & Design9 years ago
  • Extracting words from a String to a String[] (Java)?

    I have been trying for about a day now to extract words from a String and place them in a String array. When I say words, I mean groups of characters on either end of whitespace. My code is listed below, but it needs some explaining. This my class for editing text, and in the code when you see "this.numberOf(' ', sentence) it's just looking for the amount of spaces in the sentence. I apologize for the messy code and random variables, I was just testing a lot of things out to get this working.

    public String[] getWords(String sentence)

    {

    String newSentence=sentence;

    String[] words= new String[this.numberOf(' ', sentence)];

    int oldIndex=0;

    int placeHolder=0;

    System.out.println("Length: "+words.length);

    newSentence.trim();

    for(int index=0; index<words.length; index++)

    {

    if(newSentence.indexOf(" ")!=-1)

    placeHolder=newSentence.indexOf(" "); //Assigns the index of space to placeHolder, and if it isn't there exits the loop.

    else

    break;

    if(index==0)

    {

    words[index]=newSentence.substring(0, placeHolder);

    oldIndex=placeHolder;

    }

    if(index!=0)

    {

    words[index]=newSentence.substring(oldIndex, placeHolder);

    }

    oldIndex=placeHolder;

    newSentence.replaceFirst(" ", "");

    }

    return words;

    When I try to make oldIndex equal to sentence.indexOf(" ")+1 I get an array index out of bounds exception. So if anyone could explain to me what to do with either pseudocode, real code, or just explain where I'm going wrong I would appreciate it.

    2 AnswersProgramming & Design9 years ago
  • Java graphical interface halting without Thread suspension?

    I have been programming in Java for about 6 months now, and the whole time I have been using the Netbeans IDE. However, I wanted to start making graphical applications (I had been sticking to textual ones before.) I've been using the Mitesse GUI builder since I don't know where to begin making graphical interfaces through code, but I run into one issue.

    In this particular instance I'm trying to increment the value of a progress bar every second, and the code I am using is:

    for(int seconds=0; seconds<100; seconds++)

    {

    progressBar.setValue(seconds);

    Thread.sleep(1000)

    }

    Now, this type of code works when you aren't working with graphics, however when I run the program the graphics (the program itself executes fine, I tested that with printing) freezes for the entire minute where Thread.sleep() is being called.

    I even tried making a new Thread other than the main one for the graphics and I still get the same symptoms.

    Is there any way around this?

    2 AnswersProgramming & Design9 years ago
  • Simple java question involving return statements?

    In netbeans I keep getting an error with my .play() method. Here is the source code

    package craps;

    import java.util.Random;

    /** Simulates a game of craps

    *

    *

    */

    public class Crasp

    { <-----------------------------------------What gives the error

    Random r = new Random();

    int roll=0;

    int win=0;

    int lose=0;

    private int shootingFor=0;;

    boolean wonSecond=false;

    boolean continueGame=true;

    /** Plays a game of craps once

    *

    */

    public int play()

    {

    roll=0;

    shootingFor=0;

    roll = 1+r.nextInt(12);

    if(roll == 7||roll == 11)

    {

    win++;

    continueGame=false; //This boolean tells the program whether or not it should continue.

    }

    if(roll == 2 || roll==3 || roll==12)

    {

    lose++;

    continueGame=false;

    }

    shootingFor = roll; // The old value of roll is assigned to shootingFor to test whether or not the two are equal.

    if(continueGame==true)

    {

    do{

    do

    {

    roll=1+r.nextInt(12);

    if(roll==7)

    {lose++;

    continueGame=false;

    }

    if(roll==shootingFor)

    { win++;

    wonSecond=true;

    continueGame=false;

    }

    }while(shootingFor !=roll && continueGame==true);

    }while(roll != 7 && roll != shootingFor && wonSecond==false && continueGame==true);

    }

    if(win==1)--------------------------------< MY return statements

    return 1;

    if(lose==1)

    return -1;

    }

    public int getlose()

    {

    return lose;

    }

    }

    That is the source code for my Craps.java file. It is giving me the error that I have a missing return statement, when I obviously have one included. I even tried putting a return statement under the first bracket of .play() and it still does nothing. How can I fix this?

    I do NOT want code revisions as this is a school project, I just want to know what is wrong. However you can make your own code as an example if you wish.

    This is urgent because it is due next week.

    1 AnswerProgramming & Design10 years ago
  • Would anyone invite me to google+?

    I'm a die-hard Google fan and have been for a long time. I heard about this whole G+ thing a little late and was extremely disappointed I didn't get in on time.

    Does anyone have an extra invite they could give me please? It would be greatly appreciated.

    dominantshoe@gmail.com

    2 AnswersGoogle10 years ago
  • How can I install Flash for Linux to be used in Chrome? Also... permissions?

    I recently downloaded Ubuntu 10.10 (a Linux based operating system). I have spent a bit of time setting it up and I got it to a point where I thought that it was working pretty well. Today I wanted to follow a link that one of my friends gave me to watch a video. It informed me that I needed to have the latest version of Flash installed and it provided me a link for where I could download it. I followed the link and downloaded the 64-bit Linux tar.gz version.It automatically saved the file to the Downloads library rather than in the file system where it was supposed to go. Now I am unable to move it to File System (Where my Chrome plugins folder is) to activate flash due to inadequate permissions.

    I heard rumors that Chrome recently came out with a linux version that had Flash installed by default. Is that the unstable beta version they are talking about there? If it isn't, how can I activate flash?

    2 AnswersComputer Networking1 decade ago
  • Would it be safe to delete C:\Users\user\Appdata\Roaming\logs.dat?

    Like the title says, I was considering deleting this specific location on my computer. I scanned with Malawarebytes to see if I had any harmful software on my computer. 4 things came up. 3 Were in the temp section of the App data folder and one was in the roaming section. I read that it is safe to delete temp, but I am not sure if deleting that specific "logs.dat" part of my folder would screw anything up?

    2 AnswersSecurity1 decade ago
  • Would it be safe to delete C:\Users\user\Appdata\Roaming\logs.dat?

    Exactly as the question says. I scanned with malawarebytes and it detected traces of malaware located at that specific filepath. Would it be safe to delete that specific file?

    1 AnswerSecurity1 decade ago
  • How do I install windows 7 without losing saved programs?

    I heard there was a risk of this. I have Windows Vista 32-bit and I plan to upgrade to windows 7 via disk. What should I know?

    3 AnswersSoftware1 decade ago
  • Free Downlodable Music?

    Is there a website where you can download free music onto a memmory of some type? Also, this must be legal.

    4 AnswersOther - Music1 decade ago
  • Anyone know of any chatrooms?

    I am looking for a chat room of any variety. Does anyone know of any that are A) Virus Free B) Do not require and download.

    Also, a short description of the link you send me will help. Thanks.

    2 AnswersOther - Internet1 decade ago
  • Wondering about this law (Child Pornography)?

    Is a video showing a child doing something sexual okay if there is no nudity?

    6 AnswersLaw & Ethics1 decade ago
  • Best answer recieves 10 points. Trouble passing urine?

    WARNING: THE DESCRIPTIONS DESCRIBED BELOW MAY BE DISGUSTING TO SOME READERS.

    So I admit to it... I have a urine fetish. I got a large list of urine-based activities earlier and I tried a few.

    First I drank my own urine directly from the top of my penis. Then I tightly closed the foreskin of my penis so the urine couldn't pass through it. Then I drank around 25% of a water bottle filled with urine (throughout the course of the night). I masturbated once (while I was drinking the water bottle of urine) and now I am having trouble passing urine. When it does come out it shoots sideways (not in a straight line),

    Which of the above mentioned activities could have caused this and why. Also do I just have to wait it out or is there something I can do (I am not going to drink more water... I drank 4 bottles in around 25 minutes for preparation)

    Any answers appreciated.

    5 AnswersMen's Health1 decade ago
  • Another question about Rainmeter?

    About an hour ago I asked a question

    (http://answers.yahoo.com/question/index;_ylt=ArpcU...

    about a program called Rainmeter. Well I have found the answer to this but I have another. How do I download and install a plugin... and from where can I do this? 10 points to someone who actually answers the question... Not someone who tells me to look at their forums.

    2 AnswersSoftware1 decade ago
  • How can trojans and other malaware get onto my computer?

    So do I have to manually download something from the site to get it onto my computer or is it able to access it just by visiting the site? I got a link from here and a "find, Save, Run, Or cancel" box showed up immediately upon visiting the site. I don't trust that. I closed that tab and came back here to ask if my computer is now at any risk. I was running a scan AS it happened so this one may not pick it up.

    4 AnswersSecurity1 decade ago
  • What would have caused this? Reason for concern?

    So I recently went camping around 3 days ago. I came back. Perfectly normal. Yesterday I had baby back ribs from a good source of food. But today I ate a small bowl of homemade spaghetti and it basically destroyed my stomach. Im not sure where it could have come from. And I know about all the possible parasites you CAN get (not likely where I live) so is there a reason to be concerned? This is the 1st night of this. i could definately drop a hulking @*%& if I wanted to.

    Also.... Anything I can do to stop it in it's tracks? I am just drinking a lot of diant canada dry ginger ale

    2 AnswersInfectious Diseases1 decade ago