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.
Linkdead
Java: determine class type?
I have a java function that takes a "customer" object, which could either be a customer or a "preferredCustomer" which is extended from customer.
what I want is... if it is a preferredCustomer then to set a checkbox to checked
is there a way I can programatically determine if it's a customer or a preferred customer? or will i need to add a flag variable in each class and set it in the constructor?
1 AnswerProgramming & Design1 decade agoTimestamps in C++ (visual c++ 2008)?
I am trying to write an app which uses timestamps to store dates.
I have been using time_t so far but when tried to enter dates before the epoch (1/1/1970) I get a -1 rather than the usual negative timestamp I'm used to getting writing in PHP
is there a workaround for this or some other timestamp system i can use that will work with negative timestamps and/or timestamps before 1/1/1970?
1 AnswerProgramming & Design1 decade agoHow do I integrate this?
How do I integrate this?
1
--------------------------
(sin x)^2 + 4(cos x)^2
1 AnswerMathematics1 decade agowind-up battery charger?
I'm thinking about going camping for an extended period of time. I want to bring my camera but I won't be near an electrical outlet to recharge it's AA batteries.
From what I've read solar powered rechargers are impractical because they can take up to a week just to fully charge a couple AA's
I've heard of wind-up powered radios, flash lights, and things of that nature so I'm wondering if anyone has had any experience with wind-up AA battery chargers?
I've done a few google searches but havn't found anything practical. There were some 'wind up batteries' where you wind the battery itself for 20 min, but was extremely expensive and because my camera uses two batteries I'd have to wind for 40 min unless i found a way to wind them both at the same time.
if anyone's had any real experience with these batteries or wind-up chargers tell me about it. I want to know what's worth buying and what's just going to be unreliable junk to carry around in my backpack.
3 AnswersOther - Electronics1 decade agohtml - problems with tables (with code)?
thank you all for responding so quickly.
Yes I did try multiple <br>'s, but all that did was give me multiple new lines to the right of my first table
I can't past the whole page, it's far too much code, but here's the two tables
<table border=0 align=left cellpadding=0 cellspacing=0>
<tr>
<td colspan=6><a href="/" title="Return to Lobby (Home Page)"><img src="images/logo01.jpg" alt="Divarin`s Silver Screen" border=0></a></td>
</tr><tr>
<td><img src="images/logo02.jpg"></td>
<td><a href="/" title="Return to Lobby"><img src="images/logo03.jpg" alt="Lobby" border=0></a></td>
<td><a href="/theater" title="Enter the Theater"><img src="images/logo04.jpg" alt="Theater" border=0></a></td>
<td><a href="/review.php" title="View film ratings & reviews"><img src="images/logo05.jpg" alt="Ratings" border=0></a></td>
<td><a href="/store" title="Purchase DVDs"><img src="images/logo06.jpg" alt="Store" border=0></a></td>
<td><img src="images/logo07.jpg"></td>
</tr>
</table>
<table border=0 align=left cellspacing=2 cellpadding=2>
<tr>
<td>Lobby (you are here)</td>
</tr><tr>
<td><a href="/theater">Theater</a></td>
</tr><tr>
<td><a href="/review.php">Ratings & Reviews</a></td>
</tr><tr>
<td><a href="/store">Store</a></td>
</tr>
</table>
the second table should appear below the first, but it doesn't, it appears to the right of it.
1 AnswerProgramming & Design1 decade agohtml - problems with tables?
I have a simple web page with a problem
I have two tables. I want table 2 to be below table 1. it should be this way by default
but for some reason table 2 is always to the side (on the right) of table 1
i tried enclosing the tables in <p> (paragraphs), i tried enclosing them in <div>'s, i tried <br>, i tried <br clear=all> i even tried <hr>, nothing I've tried works. any content I put after the closing of the first table goes to the right of it. whether it's a table, a div, a paragraph, or a single line of text.
4 AnswersProgramming & Design1 decade agoSurface area to Volume relationship?
this isn't a homework problem it's just something I'm curious about
a classmate of mine recently pointed out that the surface area of a sphere is the derivative of the volume of a sphere
volume being 4/3 π r ^ 3
and the surface area being
4 π r ^ 2
this relationship also seems to hold true for a cylinder
however I can't generalize and say it's true for all shapes, take the cube for example:
the volume is x^3, the derivative of which is 3x^2
and the surface area is 6x^2
my question is, has anyone else noticed other 3 dimensional shapes where this relationship holds true and can give me some intuition for why it is with some and not with others?
1 AnswerMathematics1 decade agoDownloadable word list for my program?
I am making a game which will use an algorithm to generate items rather than a finite database of items. I need to invent the names of items. I have found many word list files which I could use but none of them make the distinction between physical tangible objects and abstract nouns.
For example: one file will define both biophysics and bioscope as nouns. but you can't go to the store and buy a box of biophysics.
I'm pretty sure I'm going to end up having to manually parse one of these lists myself but I thought I'd see if anyone else out there has a better word list that might work first.
2 AnswersProgramming & Design1 decade agoNot quite an anagram?
what is the nmae of the efefct, werhe if you rearragne all of the ltteers in wdros but keep the fisrt and lsat in palce it's stlil raadeble?
1 AnswerWords & Wordplay1 decade agoMulti-Field search algorithm?
I'm looking for a search algorithm/data structure that'll let me quickly (not linear) search through records by any one of multiple fields
It's a simple inventory program that has the following fields: date, description, quantity, wholesale cost, and retail cost.
I thought about using a tree, and just build the tree as the data is being loaded, or creating index arrays and sorting them
the problem is I would have to have multiple trees, or index arrays for each field and that would take up a lot of memory. especially if there are a lot of records
The data is being read from a random access (binary) file where you can jump straight to the record if you know the record number.
is there a way I can put the data into memory (or store it in the file) where I can easily search by any field?
1 AnswerProgramming & Design1 decade agoDerivative or a rational (fractional) function?
I'm trying to figure out how to apply the Chain Rule to a function that has the variable in both the numerator and denominator:
x^3-3x^2+4
----------------
x^2
I'm not concerned with the answer, the book says it's 8x+3 I just can't seem to figure out how to do it
I tried splitting it up into something like this:
(x^3-3x^2+4)(x^-2)
but couldn't seem to apply the chain rule to that in a way that resulted in an answer consistent with the book's
2 AnswersMathematics1 decade ago