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.

jaysonx998
Me.
Ruby, help with classes and pointing to methods?
So, I'm fairly new to ruby. I have done all online tutorials and I understand all the basic concepts and aspects of the language. My problem is, I'm trying to write this code. I've had this problem trying different codes as well, here it is
class Battles
def initialize
@hp = 10
end
def start
puts 'Type 1 to attack:'
input = gets
if input == 1
dmg
end
end
def showing
puts @hp
end
def dmg
@hp = @hp - rand(5)
puts @hp
end
def attack
if input == 1
@hp = @hp - @dmg
end
end
end
battle = Battles.new
battle.start
Everything starts up and such, but when I type 1 to attack, it doesn't go to the method dmg it just ends. I have also tried to do 1 as a 'string'. Any help?
2 AnswersProgramming & Design1 decade agoAre email bounces worth money?
Do you think, if I were to compile a list of let's say like 50 million email addresses that seem valid but are actually bounces, do you think I could sell this data to companies so they could scrub against there database?
2 AnswersSmall Business1 decade agoMysql Not replacing whole string with a wildcard?
I am trying to remove junk after .com and .net in a huge list of emails I have so its just an email address with nothing after it. Example, an email is "abc@yahoo.com 19.45.16.20" I need to remove those numbers so I tried writing this query to replace anything after the m in .com to see if it would work,
mysql> update email set email = '%m ' where email not like '%.com' and email not
like '%.edu' and email not like '%.org' and email not like '%.gov';
The problem is, its replacing the whole email address with %m and not just getting rid of junk after the m in .com! Any ideas how I can just replace till the m in .com and the n in .net etc? Thank you!
1 AnswerProgramming & Design1 decade agoMysql command that should work does not?
I have written this command so I can pull a bunch of emails that are bad the don't end in .com, .net. etc. this is the command
"select emails from emz where emails is not like '%.com';"
It should work, can someone explain to me why it doesn't?
1 AnswerProgramming & Design1 decade agoMysql Trimming numbers at end of email?
Hey, I know a bit about sql but now I have to write a query that will remove all numbers after an email address, looking like this biotech1@atlantic.net #5.7.1 or like this oglesby@blueridge.net l6YDv7150556530900. Also some with ip's at the end. The file has to be stripped of this info before we send it out. So far, all I have is
Select emails
From emails
And then I was thinking doing trim where(wild card any number after .com, .org, etc) but I can't get it to work right. Help please, what should the code look like?
1 AnswerProgramming & Design1 decade agoIs any version of MS SQL free?
I just downloaded the 2005 express edition, its installing, but I'm not totally sure if it's free yet.
3 AnswersSoftware1 decade agoFormat a new Hard Drive when windows does not recognize it?
Hey
I bought a new 80 GB Hard Drive today because my 40 GB wasn't enough space. I opened the siding, hooked it to the power supply and motherboard. I went into the bios and it recognizes it's there/ When I started windows it did an add new hardware thing and said it was all set. When I go into my computer the only drive that is there is the C drive. Apparently the drive needs to be formatted when I examined it further. I do not have a windows install disk or anything. What can I do to format the Hard Drive?(I can't do it in dos because it does not recognize it as D drive.
So what do I do? Thanks
4 AnswersOther - Hardware1 decade agoCombining power of Intel Core 2 Duo?
I was wondering.....when you have a Dual core instead of them each running their own tasks for multitasking power.....could you like somehow program them to work together as 1? Example if its a 2.0 GHZ Dual Core processor(s) could you like direct them to work as the same unti giving it 4.0 GHZ of processing power?
1 AnswerDesktops1 decade agoAMD 64 BIT X2 Running windows 2000, and how much supported RAM?
Well I have an AMD 64 bit processer(X2) and 4GB of RAM. I am running on windows XP professional 64 bit.
I really liked windows 2000, for the extra performance it gives to your PC.
My question is how much RAM will 2000 support, and will it support these processors?
Thanks!
1 AnswerLaptops & Notebooks1 decade agoDownloaded sims aren't in sims bin!? Tried everything...
I have the Sims 2, Sims OFB, and University.
I have donwloaded like 30 sims, from the official site with an auto downloader.
All the files go to downloads.
I Also leave the installer pakage file in Savedsims folder.
They are not in the sims bin.
I have tried multiple things to no avil.
I removed all of my custom content, tried to do only sims, and it still didnt' work lol.
Help?
2 AnswersVideo & Online Games1 decade agoSims 2 Downloaded Characters. Where are they?
Alright I downloaded like 15 different sims from the Official site, and it just had an auto installer unlike mod the sims2, etc.
So I installed all of them, but I don't know where to find them in the game.
Help?
3 AnswersVideo & Online Games1 decade agoSims 2 Can't Shut Down Business
Hi, I have the Sims2 OFB. I had a business, made a bit of money on it and waqnt to shut it down now.
The problem is, when I call to shut down business my sim runs around blowing whistles and shaking his hands.
He did it for 3 days lol.(Sim days)
I fired all employees, and delted all objects, but I still cant shut it down?
Help?
Thanks.
2 AnswersVideo & Online Games1 decade agoDual boot Win XP and 2K?
Hi I was wondering if I could keep windows XP and install windows 2K as well, being able to choose operating systems at startup. I just didn't know if this was possible with XP. If it is, could someone give me an idea how to do it without messing up my XP partition? Thanks.
2 AnswersSoftware1 decade agoPsp slim with custom firmware....how much would you pay with 6GB of SD card as well?
I have a PSP slim, or lite, and I have custom firmware 3.9 m33-3. It can play nearly all homebrew games and applications. You can copy games from the UMD to the PC then put them on your memory stick and play them. It plays PS1 games off the mem stick, and it can emulate SNES and GBA perfectly. It can do many other things as well, you just have to look up psp homebrew from qj net is the best place. I also have a 2GB mem stick and A 4 GB mem stick, that has psp games and homebrew applications. For all of this, how much would you guys pay out of curiosity? Kaythanksbye.
2 AnswersVideo & Online Games1 decade agoWireless router deconnect back to regular modem help?
So I have a LINKSYS 54 MBPS wireless router. The net works fine with the router plugged in, but now when I try to unplug the router and just switch back to my regular ethernet cable straight to the modem, it does not work. I have tried disabling and then enabling the network after this change, as well as trying to renew my IP adress. Is there some kind of fix for this? Thanks.
1 AnswerComputer Networking1 decade agoUse a zune dock without plugging it in? Like Batteries somehow?
Alright well I have a first gen Zune. It had some kind of power malfunction and the regular headphone slot doesn't work. I bought the zune dock, it fixed my problem I can listen to it now, but is there somehow I can wire it up so I power it by batteries without having to throw it into the computer? Would be nice to use on the go. Thanks.
1 AnswerOther - Electronics1 decade ago