Assuming there's merit in this, I think it would make an excellent article for someone with the know-how. Let's say you are writing a recipe program that can be used by people in various countries who use differing units of measurement. Converting gallons to liters or fahrenheit to celsius on the fly for displaying a recipe is easy enough that it's probably not worth worrying about performance, but what if someone wants to export a list of 100,000 recipes for someone using other units of measurement? With several ingredients and temperatures in each recipe, that results in a lot of conversions, and performance can become an issue. (The recipe list is just the first example that came to mind... There could be other situations with billions of such conversions.) I wonder if there is a way to pre-calculate a generic unit of, e.g., weight, which can then be used to extremely quickly find ounces, pounds, grams, troy ounces, grains, etc. without resorting to floating-point division, etc. I imagine this would fall under the umbrella of NP-complete problems, but since we're only dealing with a limited number of units it seems like it should be possible to find an optimal unit without waiting for a trillion years. :) Can this be done or has it been done? Or am I on the wrong track here?
NatLang
Posts
-
Universal Units -
I want peace on earthI know one way that would at least be partially effective. But even then, destroying all life would still leave volcanoes and hurricanes and such to disrupt the peaceful setting. At least there would be nobody to whine about it. That will be $0.02 please. Cash or charge?
-
Plain English question1. Incentive A promotion is usually a temporary advertising campaign. In your promotion, you would draw attention to those incentives. "Amenities" might also be useful, but not in the context of your example. Free coffee while you wait, television in the lobby, etc. would be amenities. 2. Plan or Package It looks like you already decided on "member plan". Sounds good. Package would also sound fine.
-
Two questionsDaniel R Ferguson wrote:
So you're telling me that laws against murder are a bad thing?
Having "a law against murder" is a circular statement because murder is a legally-defined term for certain types of killing. By definition, all murder is illegal. On the other hand, not all forms of killing are illegal. If someone is attacking you, it should certainly not be illegal to kill the attacker during a reasonable attempt to defend yourself. (Yes, "reasonable" is subjective.) So... laws against murder aren't necessarily bad, but a total ban of all killing would be. Laws would ideally only apply to damage inflicted on others. The problem is that nearly everything can be overzealously shown to have some degree of effect on others. Alcohol-related laws are a prime example. The odds are overwhelmingly against you ever harming anyone by drinking and driving, but they can use statistics to show that you're "more likely" to harm someone, which means they're preventing some percentage of harm by throwing you in jail. Of course, they ignore the harm caused by the taxes used to pay for it all. :) Using the same logic behind drunk driving laws, we should ban the practice of shaving. You're far more likely to transmit blood-related diseases to others if you shave, because people who shave are more likely to get cut and bleed. So by shaving, you're contributing to the prevalence of AIDS and hepatitis, just like how all drunk drivers (most of whom never get into an accident or harm anyone) are a danger to society. That will be $0.02 please. Cash or charge?
-
this forum software sucksI don't know what errors you're talking about. The only issue I have with the forums is that my "back" button doesn't expand the previous post in the thread like one would expect. That will be $0.02 please. Cash or charge?
-
Do you have this experience?Was the proect manager's name, by chance, Zeno? That will be $0.02 please. Cash or charge?
-
NameValueCollection or HashTableI'm a newbie so take my advice with a grain of salt, but it seems like NameValueCollection was designed with exactly that in mind. The alternative would be a HashTable with arrays of strings for the values, but NameValueCollection takes care of some of the dirty work there -- although it does get a little messy when you only want to access one of the many values stored under a key. That will be $0.02 please. Cash or charge?