What is the right way to implemet a function with this declaration:  void variadicFunction(int (*someFunction)(), ...)   such that it will call the function:  someFunction(...)   where ...are the variadic parameters given to variadicFunction. Thank you.
In C, is it possible to forward the invocation of a variadic function? As in,  int my_printf(char *fmt, ...) {     fprintf(stderr, "Calling printf with fmt %s", fmt);     return SOMEHOW_INVOKE_LIBC_PRINTF; }   Forwarding the invocation in the manner above obviously isn't strictly necessary in this case (since you could log invocations in other ways, or use vfprintf), but the codebase I'm working on requires the wrapper to do some actual work, and doesn't have (and can't have added) a helper function akin to vfprintf.  [Update: there seems to be some confusion based on the answers that have been supplied so far. To phrase the question another way: in general, can you wrap some arbitrary variadic function without modifying that function's definition.]
Proxying fake domain to a localhost port I'd like to do much the same thing described at  for web app development purposes, but with the twist that I'd like requests to fakedomain.com:80 to be routed to localhost:8080, say, so that I don't have to actually use my development machine's port 80.  I'd welcome answers that take the form of:   Small changes to configuration files like /etc/hosts, and/or An easy-to-configure proxy server I could run   Note:  takes the approach of setting a firewall rule to forward all incoming traffic on port 80 to port 20559. That may be an acceptable solution, but ideally, I'd like to forward only a specific domain + port combination. How to call a parent class function from derived class function? Can I use an "if" clause without "then"? Is it possible to have multiple bevel objects along a curve? I'm wondering if it's possible to define multiple bevel objects along a curve and have Blender interpolate between the bevels like keyframes. I can enter U+0008 (backspace character) into a chat message I typed . I believe I tab-completed @rumtscho and fully typed @MarthaF (since she doesn't tab complete). However, other people tell me that a Unicode character was inserted into the message; I can't see it:  Originally, I abandoned this bug report for a lack of reproducibility. But on another machine, I can see the character and managed to reproduce it: press tab, then press backspace. It works anywhere in a message, not just in a @-ping. (Actually, it seems that you just need to un-focus the input box; clicking elsewhere then hitting backspace works, too)  First machine is Firefox 12 (Iceweasel) on Debian GNU/Linux AMD64, testing+unstable. No user scripts. Greasemonkey is installed, but disabled in the extension manager Second machine is Firefox 10 (Iceweasel) on Debian GNU/Linux AMD64, testing+unstable. No user scripts, Greasemonkey not even installed Third machine (just tested) is Firefox 11 (Iceweasel) on Debian GNU/Linux AMD64. Greasemonkey installed and enabled, and there is a global userscript. Does not happen on Chromium 18.0.1025.151, running on machine #3.  So far, that's all the machines I've tested on, and it happens on all of them. It only happens in chat. Easiest way to produce it is to click on the page background, somewhere outside the text box, to un-focus the text box. Then press backspace. Note that not all browsers will display the character, even if its there (check  to see if yours does) This is a pretty well known quote from the Star Wars movies. But isn't it a bit paradoxical?   It in itself is an absolute, and it was said by a Jedi (Obi-Wan if I recall correctly?). If this holds true, then is he leaning towards the Sith himself? If it isn't true, then both Jedi and Sith can deal in absolutes and the statement is pointless.  Surely it should be phased along the lines of "Jedi's should avoid dealing in absolutes" or something similar? Why didn't Voldemort murder the Dursleys? Voldemort couldn't kill Harry as long as he called the Dursleys home. Why didn't he just murder the Dursleys? This would prevent Harry from being able to live there. What is the result of $ \lim_{n \to \infty} \frac{ \sum^n_{i=1} i^k}{n^{k+1}},\ k \in \mathbb{R} $ and why? Execute a Java program from our Java program I used   Runtime.getRuntime().exec("_____")   but it throws a IOException as below:  java.io.IOException: CreateProcess: c:/ error=5   at java.lang.Win32Process.create(Native Method)   at java.lang.Win32Process.&lt;init&gt;(Win32Process.java:63)   at java.lang.Runtime.execInternal(Native Method   I don't know whether I have the problem with specifying the path or something else. Can anyone please help me with the code. Find the maximum value of $ f(x) = \int^{x}_{0} \sqrt{(x^2-x)^2+y^4}~dy$ Creating a byte array from a stream What is the prefered method for creating a byte array from an input stream?   Here is my current solution with .NET 3.5.   Stream s; byte[] b;  using (BinaryReader br = new BinaryReader(s)) {     b = br.ReadBytes((int)s.Length); }   Is it still a better idea to read and write chunks of the stream? Can we use CAPITAL LETTERS to indicate actions? While designing for the web or the mobile applications, a natural free flowing text can be used for the general content, but when it comes to actions... can we use CAPITAL LETTERS. What is the difference between a "proof by contradiction" and "proving the contrapositive"? Intuitive, it feels like doing the exact same thing. And when I compare an exercise, one person proves by contradiction, and the other proves the contrapositive, the proofs look almost exactly the same.  For example, say I want to prove: $P \implies Q$ When I want to prove by contradiction, I would say assume this is not true. Assume $Q$ is not true, and $P$ is true. Blabla, but this implies $P$ is not true, which is a contradiction.  When I want to prove the contrapositive, I say. Assume $Q$ is not true. Blabla, this implies $P$ is not true.  The only difference in the proof is that I assume $P$ is true in the beginning, when I want to prove by contradiction. But this feels almost redundant, as in the end I always get that this is not true. The only other way that I could get a contradiction is by proving that $Q$ is true. But this would be the exact same things as a direct proof.   Can somebody enlighten me a little bit here ? For example: Are there proofs that can be proven by contradiction but not proven by proving the contrapositve? Robot tank run amok, its trainer trapped in cave on the Moon Another dim memory from my sci-fi reading binges in the 1980s... this one almost definitely in one of the big hardback collections full of late Golden Age short stories.  The story is told from the perspective of a robot (maybe cyborg?) tank that has stopped responding to control signals and is aggressively "defending" some portion of the Moon, to which it was previously assigned. Maybe a war had ended, or maybe it became confused about an exercise that it thought was real?  There was a person trapped in a cave trying to communicate with the tank. The tank mostly ignores him, so the main purpose of what he says is exposition for the reader. I think this person was an expert on this type of robot/cyborg sent to "talk it down", but the tank had attacked, and this guy was the only survivor. The expert was badly wounded -- I think he mentions his suit had to amputate his leg to seal a hole -- or maybe flood it with water which would freeze to seal the hole but mean that his leg had to be amputated later. He keeps trying to convince the tank to stand down, at one point saying that he knew it "back when it was just a two-wheeler an autocyber in boot camp" or something along that line. (Edit: I must have been reading too fast and/or distracted back then, since per the quote below I seem to have misread "motorcycle" for "autocyber"!)  One detail of the attack stands out -- the tank was low on ammunition, I think, so it used a kind of bomb with an electric/magnetic "catapult" (aka "magnapult") to hit the expert's transport. The tank was proud of itself for figuring out a way to hit it far out of the normal range by 1) using its own top speed to add velocity to the projectile, and 2) building up the catapult's energy past its normal operating range, which caused it pain but made the bomb go much further. It catches the transport by surprise, since they thought they were safely out of range of the armaments it had left.  The premise sounds a lot like a Keith Laumer "Bolo" story, but I'm fairly sure that it's not actually one of them. It had a somewhat grimmer feel to it. I could be wrong, though, since it's been 30 years. How do I install Java? What's the simplest way to list conflicted files in Git? Dynamic date range query I'm trying to create two cells that will update my query: A >= date"A1" and A &lt;= date "B1".  My goal is to create a search page for the data, where the end user could insert a date or the =today() function and it would update the query. I am currently getting a formula parse error from:  =QUERY(Data!6:1397,"SELECT A,B,C,D,E,F,G,H,I,J,K,L WHERE A &gt;= date"A1"and  A &lt;= date"B1"") Running junit tests in parallel in a Maven build? I'm using JUnit 4.4 and Maven and I have a large number of long-running integration tests.  When it comes to parallelizing test suites there are a few solutions that allow me to run each test method in a single test-class in parallel. But all of these require that I change the tests in one way or another.  I really think it would be a much cleaner solution to run X different test classes in X threads in parallel. I have hundreds of tests so I don't really care about threading individual test-classes.  Is there any way to do this? Removing empty lines in Notepad++ Kaplansky's theorem of infinitely many right inverses in monoids? There's a theorem of Kaplansky that states that if an element $u$ of a ring has more than one right inverse, then it in fact has infinitely many. I could prove this by assuming $v$ is a right inverse, and then showing that the elements $v+(1-vu)u^n$ are right inverses for all $n$ and distinct.  To see they're distinct, I suppose $v+(1-vu)u^n=v+(1-vu)u^m$ for distinct $n$ and $m$. I suppose $n&gt;m$. Since $u$ is cancellable on the right, this implies $(1-vu)u^{n-m}=1-vu$. Then $(1-vu)u^{n-m-1}u+vu=((1-vu)u^{n-m-1}+v)u=1$, so $u$ has a left inverse, but then $u$ would be a unit, and hence have only one right inverse.  Does the same theorem hold in monoids, or is there some counterexample?