> The name of the drink 'Coke' was not chosen for its dark color, almost like the mineral. That is correct, actually. "Coke" is an abbreviation of "Coca Cola", which derives from its original recipe that included cocaine and kola. Coca-Cola - Wikipedia[^] Coca wine - Wikipedia[^]
twhall
Posts
-
Edge -
A gentle puzzle I was just asked.The algebraic symbol > is usually pronounced (in English) "greater than", rather than "larger than", and I think some of the ambiguity of the question and its interpretation lies in the specific words used. If the question had specified "greatest negative number" rather than "largest negative number", it might have elicited different answers. -1 > -∞, but is -1 "larger" than -∞ ? How many bits does it take to encode each "value"? Rich Leyshon's proposition of speeding a car in reverse to avoid a ticket, and the likely outcome, seems apt.
-
I would like to conduct a survey....If I'm reading the history of this correctly, Dave Kreskowiak gave a simple, direct, one-line answer to 14968771's question. However, Dave's generic signature block -- "Asking questions is a skill" etc. -- is four lines and looks like the bulk of the answer. My guess is that 14968771 didn't recognize that as a signature block, but as a direct specific reply challenging the quality of his particular question, and it went downhill from there. Misunderstanding.
-
Zero Knowledge of Zero Gravity> What happens when an object hits the ground is that non-gravitational forces (electrostatic repulsion between atoms) start acting. It is then that the object will perceive acceleration Yes. And since all mechanical and chemical interactions are ultimately due to the Electromagnetic Interaction, that's the only interaction the body can sense. The presence or absence of a Gravitational Field is irrelevant to the sensation of weight. "Weightiness" is entirely due to an unbalanced electrostatic repulsion. (An equal-and-opposite vice-like compression doesn't provide any sense of self-weight or any up-down reference; it doesn't orient the vestibular system.)
-
My plea to all DevelopersA few years ago I was writing a model importer for GIS data (geographic information systems), and that turned out to be an education in measurement systems. Prior to that, I thought that the USA had, in a sense, already "gone metric" since 1 foot is defined as precisely 0.3048 meters. That's not a rounded-off approximation, that's a precise definition. But it turns out that that's merely the "international foot." In contrast, the "US survey foot" is defined as precisely 12/39.37 meters (1 US survey inch defined as precisely 1/39.37 meters). The conversion factors are almost but not quite equal, and the differences accumulate when measuring the Earth. There are several other definitions of "foot" around the world. The other things I learned (I knew them before, but then I learned them) are: 1) The Earth isn't a sphere; it's an ellipsoid. 2) The Earth isn't an ellipsoid; it's a geoid. 3) Latitude is defined by the normal vector at the surface, not the central vector to the surface. 4) Double-precision coordinates are essential everywhere. 5) Defining a meter as a precise fraction of the distance between the equator and a pole was bound to fail at some point. 6) We're still left with arbitrary-looking conversion factors from "natural units" (such as the speed of light) to MKS units (meters and seconds) -- but with many more digits due to the greater precision.
-
[solved] Mrs or Ms, sorry if it is a LeslieTraditionally (in American English, at least), "Mrs." implies married, and "Miss" implies unmarried. "Ms." (pronounced more like "Mizz") avoids that distinction. It is an appropriate professional address for a female regardless of marital status. Marital status is irrelevant. * * * Unfortunately, there's no gender-neutral address, which is a problem when one can't tell from the name whether someone is a "Mr." or a "Ms." -- e.g., native English speakers trying to decode Chinese or Indian names. In those cases, I usually just avoid the "Mr." or "Ms." pronoun and simply use the person's full name. "Dear , ..."
-
Plugging Gaps - a QueryMy introduction to programming was a year of FORTRAN in high school, 1973-1974. Taught at the local community collage, but for high school students. Coding forms and punch cards. Got to see the computer once, on the first day of class. Liked it, but didn't do it again until Fall 1978. One semester of FORTRAN was required in the undergrad program in the College of Architecture and Urban Planning. Teletype terminals connected over 300-baud serial lines to the mainframe computer in the Computing Center. Relearned what I'd learned in two semesters of high school, and more. For the final project, I wrote my first computer graphic program: drawing shear, bending moment, and deflection diagrams for a simply-supported beam with a uniform load and up to 10 point loads. Output to a pen plotter in the Computing Center. There was a well-worn trail in the snow between the Art & Architecture Building and the Computing Center. Followed that in Winter 1980 with an elective course in computer graphics, in the Master of Architecture program, still in FORTRAN. Working on Tektronix storage-tube graphics terminals. Couldn't erase a line without erasing the whole screen and redrawing all of the lines except the one to be erased. Also, for a sesmster project in an advanced lighting design course, I wrote a program to intercept a temporary data file from a FORTRAN batch lighting analysis program (LUMEN II) to draw perspective views of room surfaces with shaded luminance contours. (LUMEN II itself "drew" surface contours with ASCII art on the line printer.) I used a lot of dense cross-hatching on the pen plotter (which invoked the ire of some), and on the storage tube terminals. Then we got a Chromatics color raster terminal. Wow -- 4 bits per pixel: red, green, blue, and blink! So I changed my program to support that. This continued through two additional semesters as an independent study project. And that's where the REAL learning happens ... In the spring of 1980, with one year of architecture school remaining, I took a job in the Architecture and Planning Research Laboratory, working on software for a Computer Aided Engineering and Architectural Design System (CAEADS), for a project sponsored by the Corps of Engineers. In the spring of 1981, I graduated from the professional program in architecture as a professional computer programmer. I've been doing it ever since. Self-taught in C (and combining C and FORTRAN libraries, with function-calling in both directions), C++, a bit of JavaScript, occasi
-
Is Software career for extroverts?May I suggest: UM School of Music, Theatre & Dance - Department of Performing Arts Technology[^] The department is populated by theatrical, tech-savy, creative extroverts.
-
How old were you when you first wrote a line of code ?16 in 1973; FORTRAN IV on punch cards, in a high-school-level class taught at the community college. Finding prime numbers, finding the zeros of polynomials, computing the minimum number of coins to equal some number of cents -- as hundredths of a dollar $0.01 -- and learning about the imperfection of REAL numbers: SHOCKING! My typing skills were non-existent, and it took me a looong time to plonk out a 30-card stack, after having already composed everything on a coding sheet. No backspace key on a key punch.
-
OSX Lion [modified]John Siracusa's Epic Review. Ars Technica: http://www.codeproject.com/News.aspx?ntag=56683757346774266 http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars/1[^]
-
GetProcAddress fro member functionThis works for me in Visual Studio 2008 / C++ for a static member function of a class, if there's only one class in the DLL: * Define the class .h and .cpp files in the usual way. __declspec(dllexport) seems neither necessary nor helpful. For example:
class MyClass
{
public:
static int func (int argc, char * argv []);
};* Create a .def file for the DLL project: Project | Add New Item... | Module-Definition File (.def) * In the .def file, export the name(s) of the static member function(s) that you want to find through GetProcAddress(). For example:
LIBRARY "DLLProjectName"
EXPORTS func* Note that the .def file doesn't declare any MyClass:: scope. I get linker "undefined symbol" errors if I try to include the class scope. I get linker ambiguity errors if there are multiple definitions of func in the library, even if they're at different class or namespace scopes. * Set the project properties to use the .def file: Project | Properties | Linker | Input | Module Definition File * In the program that will use this library, load the DLL with LoadLibrary(). Note that the DLL file name needs to be passed as a wchar_t* (not just char*). * Get the function pointer with GetProcAddress with the un-scoped name you put in the .def file:
HINSTANCE lib = LoadLibrary (...);
typedef int (* FuncT) (int, char * []);
FuncT func = FuncT (GetProcAddress (lib, "func"));
func (argc, argv);* I don't know why this works without a class scope on func, or why it fails if I try to include the scope. * The .def file seems to handle the C++ name decoration issues; it's not necessary to know the decorated name. * I couldn't get this to work with only __declspec(dllexport) and no .def file. * With the .def file, __declspec(dllexport) doesn't seem to make any difference. * I haven't yet tried to create an instance of the class and invoke it's non-static functions from the loading program (outside of the DLL itself). I guess that's next on the agenda. Maybe I'll need to __declspec(dllexport) the class for that ...
-
WMG's latest crime against humanityWell said, Christopher. I absolutely agree.