Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now 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 615,532 points

David G

Favorite Answers54%
Answers1,826

Just some dude with a few degrees and three decades playing with computers

  • Mathematica - partition string into chunks?

    I want to split a string in Mathematica into substrings of a given length so that, say, "ABCDEF" -> {"AB","CD","EF"}. I cannot think of a simple way to do this. Obviously I can write chunk[s_, n_] := StringJoin[#] & /@ Partition[Characters[s], n] but this seems unnecessarily long-winded. I'm sure there's an obvious and simple technique, but I can't spot it.

    1 AnswerEngineering9 years ago
  • MacOS X special file device drivers?

    I love my Mac, and I love that it is UNIX underneath its sexy dress. But it's BSD, basically, and that means it's not Linux, and Linux is where I cut my teeth kernel hacking. I can write a device driver in Linux (both 2.4 and 2.6 kernel), and I have done. But I'm all at sea when it comes to doing the same for MacOS X. Where do I start? What is the Mac equivalent of the O'Reilly book Linux Device Drivers?

    I ask specifically because I would love there to be a BSD equivalent of the /dev/full special file device driver (reads return ASCII zero, seeks always work and, crucially, writes always return ENOSPC, which is POSIX errno code for 'sorry, ran out of room'.) It is very useful for testing code that writes to backing store (and if your code doesn't write to backing store at some point it's probably either really lame or broken.)

    I want major/minor 1/7 on my Mac to do the right thing. How?

    2 AnswersProgramming & Design1 decade ago
  • Relativistic velocity of a body under constant acceleration?

    Relativistic momentum, p = γ m_0 v, where γ is Lorentz factor 1/√(1 - v²/c²) and m_0 is rest mass of the body in question

    Newton's 2nd, which still holds, is F= dp/dt

    Assuming body starts at rest, change in momentum is still impulse thus if a force F acts on mass m_0 for t then γ m_0 v = F t

    All correct so far?

    Thus, for velocity as function of time (in the unaccelerated reference frame) I get

    v(t) = (c F t)/√(m_0² c² + F² t²)

    Is this correct?

    1 AnswerPhysics1 decade ago
  • How well does Arduino work with Mac OS?

    I want to get an Arduino Duemilanove external microcontroller board (or perhaps its more expandable Wiring equivalent) to play with. What are readers' experiences (good or bad) with development for this platform under Mac OS? I am using Mac OS 10.5 Leopard on a stock Macbook with a 2.1 GHz Core 2 Duo and 4 GB of RAM. Does the IDE function well? Are there any pitfalls I should be aware of?

    1 AnswerProgramming & Design1 decade ago
  • Is there a base-4 prime repunit for n > 2?

    Consider (4^n - 1)/3. For n= 1, 2, 3, … this is 1, 5, 21, …. Written base 4 this is 1, 11, 111, … i.e. the n-repunit base 4. Are all the members of this sequence n > 2 composite, or is there n such that (4^n - 1)/3 is prime? If so, in either case, why? It is easy to show that for n even the result must be composite (it is divisible by 5), but for odd n I'm stuck.

    I'm sure this is embarrassingly trivial.

    4 AnswersMathematics1 decade ago
  • triangular square pentagonal numbers?

    Triangular numbers: n(n + 1)/2

    1, 3, 6, 10, 15, 21, 28, 36 …

    Square numbers: n²

    1, 4, 9, 16, 25, 36

    Pentagonal numbers: n(3 n - 1)/2

    1, 5, 12, 22, 35, 51, 70 …

    Lots of triangular squares (e.g. 36)

    Lots of square pentagonals (e.g.9801, 94109401)

    I conjecture there are no triangular square pentagonal numbers. Machine search out to around 10^16 puts a lower bound on such a number (and that took a LONG runtime). Can anyone give me a proof, though? I think this would need some quite deep mathematics and would actually be a significant result, if that's any incentive.

    Figurate numbers: http://mathworld.wolfram.com/FigurateNumber.html

    3 AnswersMathematics1 decade ago
  • What is the most beautiful piece of music ever written?

    I don't know ALL music but I do know that the Mozart Flute and Harp Concerto (K299) is for me the most staggeringly complete parcel of what I am looking for in a piece that transports me to musical heaven. What could possibly top it (and remember I am not looking for technique, but beauty and joy?)

    6 AnswersPolls & Surveys1 decade ago
  • Math tutor salaries in SoCal?

    What would a K-12 Math tutor cost per hour in the San Diego area? What about K-14?

    Assume, if not degrees in mathematics per se then at least undergrad honors + master's from serious universities in math-oriented disciplines like physics, electronic engineering, computer science etc.

    3 AnswersTeaching1 decade ago
  • integral of x cot(x)?

    I want to find ∫ x cot(x) dx

    I know WHAT the answer is: it is x ln(1 - exp(2 i x)) - i/2 (x² + Li_2(exp(2 i x)))

    But HOW do I get there?

    Li_2 is the dilogarithm function

    1 AnswerMathematics1 decade ago
  • Please translate: pa que te voles?

    Papa John's advert: tagline: "pa que te volés". "Drive you crazy," right? Or not? Thought my Spanish was pretty good, including my pachuco, but this one's new

    3 AnswersLanguages1 decade ago
  • Was I seriously ill or just mildly?

    I had an attack of gastroenteritis. When I arrived at the hospital my BP was 180/70, my pulse was 120, and I was shivering so violently I could not walk. I lost feeling in my hands and feet. Is this a normal progression? They put me on a drip immediately and put a liter of Ringer's lactate and two of saline into me, along with 2mg of Kytril (Granisetron), dramamine, omeprazole and Nexium to stop gastric erosion of my oesophagus. I rapidly stabilised, but five days later I am still sick and weak and tire very easily. I've never taken this long to recover from food poisoning and it's worrying me. I have lost almost 5kg and am now borderline underweight, but food nauseates me.

    1 AnswerInfectious Diseases1 decade ago
  • Diabetic neuropathy pain management?

    I have Type II diabetes. It is well controlled and my fasting blood sugar is 90 - 95 mg/dl (~5 - 5.25 mmol/l). I am on a severely restricted low carb diet (less than 50g/day typically). I am 173 cm and 66 kg for a BMI of 22. My body fat percentage is ~17%. But I suffer from severe pain from diabetic neuropathy. I have pins and needles all over, but especially in my hands and feet. I have glove-stocking numbness in one of my calves. I'm not dying. It's what it is. It's not getting any worse, but it's not getting any better. I can't, realistically, do anything differently from a dietary or medicinal perspective. But I would like to alleviate the pain. What is the best course of treatment (and please don't say homeopathy or some such brand of voodoo - it's going to take a lot more than sugar pills and the placebo effect to fix this). Ideally I'd be on a time-release opioid like Oycontin but I can't get it where I live, and there are of course addiction/tolerance factors to consider. There's only so much my doctor can do. I do not want pain to dominate my life.

    15 AnswersDiabetes1 decade ago
  • Implicit differentiation - geometric form of solution?

    Let dy/dx satisfy (x² - 1)(dy/dx)² - 2 x y (dy/dx) + y² - 1 = 0

    Demonstrate that y(x) has one of two forms, either linear or quadratic; in each case specify its geometric interpretation.

    This is quite a pretty problem. I want to see if Answers aficionados get the same answer as me.

    2 AnswersMathematics1 decade ago
  • New York strip in the UK?

    One of my favourite steak cuts is the New York strip. It's basically a boneless top loin. What would I tell a butcher in the UK to get this cut?

    2 AnswersCooking & Recipes1 decade ago
  • How rigorously does Yahoo Answers enforce the age cut-off?

    I know the Yahoo gerbils are not cops, and if people pledge they're over the age limit to post here then that's the best they can do, but either some of the questions here are coming from 7 year-olds or a wave of inexplicable head trauma has swept the world since I was at school.

    4 AnswersMathematics1 decade ago
  • Why don't I get a second AppleScript aevtodoc event when my app is open?

    I am adding scripting to my Cocoa app. I support the Standard suite via the aevtodoc command selector in my sdef. On the first execution, this calls my app delegate's openFiles: method as expected. I can then call my app-specific event to process the file. But if I re-run the script, or drag a different file's icon onto my app in the dock, the open event is not resent, so I end up processing the same file as I originally opened. How do I force a reload of the file on each invocation of my script?

    1 AnswerProgramming & Design1 decade ago
  • Matrix proof of Binet's formula?

    I know how to derive Binet's closed form solution for the Fibonacci numbers via diagonalising the generating matrix {{1,1},{1,0}} through eigendecomposition. It's an elementary result in linear algebra (I've seen it in a pset for Harvard Math 25, for example, and we covered it as a toy proof in first year physics lo these many years ago). But I need a cite for the book proof. I don't have access to a university-level Maths library any more, but I'd like a reference to a text with a relatively straightforward exposition.

    1 AnswerMathematics1 decade ago
  • Which modern philosopher said...?

    (in a qualification of the Golden Rule) that the only law one was morally permitted to advocate was one under which one would be willingly agnostic a priori as to one's eventual societal place under the application of the law? In other words, if you're not willing to exempt yourself from the provisions of a a law, do not support it.

    8 AnswersPhilosophy1 decade ago
  • Haydn Erdődy quartets - pronunciation?

    I was listening to Haydn's String Quartets Op. 76 (the Erdődy quartets) and I realised I wasn't sure how to pronounce 'Erdődy'. I have a feeling it's something like AIR-did- she, but I'm not certain. Can any Hungarian speakers help?

    2 AnswersClassical1 decade ago
  • Can I substitute yuca flour for potato starch?

    I have a recipe which calls for potato starch. Unfortunately that seems to be an ingredient that is unobtainable in Central America. I have ready access to yuca flour (harina de yuca). Would this be a suitable substitute for potato starch?

    1 AnswerCooking & Recipes1 decade ago